Test getting all notes
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user