Adding tests for getting notes by id

This commit is contained in:
Micheal Wilkinson
2026-03-17 23:14:09 +00:00
parent 48bf71c5ec
commit bdc7b5b1b6
2 changed files with 66 additions and 1 deletions

View File

@@ -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
}
}