summaryrefslogtreecommitdiff
path: root/internal/storage/sqlite_nocgo.go
blob: 986244073ae1393bdf639e9e42c524d5b932c240 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//go:build !cgo

package storage

import (
	"database/sql"
	"database/sql/driver"

	modernc "modernc.org/sqlite"
)

// Register the modernc pure-Go SQLite driver under the "sqlite3" name so that
// the rest of the codebase can use sql.Open("sqlite3", ...) regardless of
// whether CGO is enabled.
func init() {
	sql.Register("sqlite3", &modernc.Driver{})
}

// modernc.Driver satisfies driver.Driver; this blank-import ensures the
// compiler sees the interface is satisfied.
var _ driver.Driver = (*modernc.Driver)(nil)