mirror of
https://github.com/ncruces/go-sqlite3.git
synced 2026-01-12 05:59:14 +00:00
Shim modernc.
This commit is contained in:
3
litestream/modernc/go.mod
Normal file
3
litestream/modernc/go.mod
Normal file
@@ -0,0 +1,3 @@
|
||||
module modernc.org/sqlite
|
||||
|
||||
go 1.24.0
|
||||
20
litestream/modernc/sqlite.go
Normal file
20
litestream/modernc/sqlite.go
Normal file
@@ -0,0 +1,20 @@
|
||||
// Package sqlite provides a shim that allows Litestream to work with the ncruces SQLite driver.
|
||||
package sqlite
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"slices"
|
||||
|
||||
"github.com/ncruces/go-sqlite3/driver"
|
||||
_ "github.com/ncruces/go-sqlite3/embed"
|
||||
)
|
||||
|
||||
func init() {
|
||||
if !slices.Contains(sql.Drivers(), "sqlite") {
|
||||
sql.Register("sqlite", &driver.SQLite{})
|
||||
}
|
||||
}
|
||||
|
||||
type FileControl interface {
|
||||
FileControlPersistWAL(string, int) (int, error)
|
||||
}
|
||||
Reference in New Issue
Block a user