stead from pg
This commit is contained in:
14
sqlite.go
Normal file
14
sqlite.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package with
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"strings"
|
||||
|
||||
_ "modernc.org/sqlite"
|
||||
)
|
||||
|
||||
func Sqlite(ctx context.Context, conn string, foo func(db *sql.DB) error) error {
|
||||
conn = strings.TrimPrefix(conn, "sqlite://")
|
||||
return _sql(ctx, "sqlite", conn, foo)
|
||||
}
|
||||
Reference in New Issue
Block a user