db fix and new update request

This commit is contained in:
samantha42
2026-03-20 23:02:33 +01:00
parent 6ad5df839b
commit 45f4cca485
8 changed files with 187 additions and 81 deletions

View File

@@ -15,7 +15,7 @@ type DB struct {
// Connect opens (or creates) the SQLite file at path and runs pragmas for
// safe, performant operation. Pass ":memory:" for tests.
func Connect(_ context.Context, path string) (*DB, error) {
func Connect(_ context.Context, path string) (*sql.DB, error) {
db, err := sql.Open("sqlite", path)
if err != nil {
return nil, fmt.Errorf("open sqlite: %w", err)
@@ -38,5 +38,5 @@ func Connect(_ context.Context, path string) (*DB, error) {
return nil, fmt.Errorf("ping sqlite: %w", err)
}
return &DB{db}, nil
return db, nil
}