Adding save tests

This commit is contained in:
Micheal Wilkinson
2026-03-17 23:09:18 +00:00
parent 89853e3582
commit 6b2badd036
2 changed files with 99 additions and 0 deletions

View File

@@ -7,6 +7,8 @@ import (
"time"
"modernc.org/sqlite"
"git.hrafn.xyz/aether/notes/internal/models"
)
const sqlSet = `
@@ -71,6 +73,10 @@ func (s *SQLiteStore) Close() error {
return nil
}
func (s *SQLiteStore) SaveNote(ctx context.Context, note models.Note) (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 (