Test getting all notes

This commit is contained in:
Micheal Wilkinson
2026-03-17 23:21:26 +00:00
parent f86bca9323
commit a8b7b8e71b
2 changed files with 100 additions and 2 deletions

View File

@@ -128,6 +128,10 @@ func (s *SQLiteStore) GetNoteByID(ctx context.Context, id int) (models.Note, err
return note, nil
}
func (s *SQLiteStore) GetAllNotes(ctx context.Context) ([]models.Note, error) {
return nil, fmt.Errorf("not implemented")
}
func (s *SQLiteStore) validateSchema(ctx context.Context) error {
_, err := s.write.ExecContext(ctx, `
CREATE TABLE IF NOT EXISTS notes (
@@ -154,4 +158,4 @@ func (s *SQLiteStore) scanNote(results *sql.Row) (models.Note, error) {
return models.Note{}, fmt.Errorf("failed to scan note: %w", err)
}
return note, nil
}
}