db fix and new update request
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user