Adding tests for getting notes by id
This commit is contained in:
@@ -113,6 +113,10 @@ func (s *SQLiteStore) SaveNote(ctx context.Context, note models.Note) (models.No
|
||||
return note, nil
|
||||
}
|
||||
|
||||
func (s *SQLiteStore) GetNoteByID(ctx context.Context, id int) (models.Note, error) {
|
||||
return models.Note{}, fmt.Errorf("not implemented")
|
||||
}
|
||||
|
||||
func (s *SQLiteStore) validateSchema(ctx context.Context) error {
|
||||
_, err := s.write.ExecContext(ctx, `
|
||||
CREATE TABLE IF NOT EXISTS notes (
|
||||
@@ -139,4 +143,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