Source File
sqliteshim.go
Belonging Package
github.com/uptrace/bun/driver/sqliteshim
// Package sqliteshim is a shim package that imports an appropriate sqlite// driver for the build target and registers it under ShimName.//// Currently it uses packages in the following order:// • modernc.org/sqlite on supported platforms,// • github.com/mattn/go-sqlite3 if Cgo is enabled,// Otherwise registers a driver that returns an error on unsupported platforms.//package sqliteshimimport ()func () {sql.Register(ShimName, shimDriver)}// ShimName is the name of the shim database/sql driver registration.const ShimName = "sqliteshim"// UnsupportedError is returned from driver on unsupported platforms.type UnsupportedError struct{}func ( *UnsupportedError) () string {return "sqlite driver is not available on the current platform"}// HasDriver indicates that SQLite driver implementation is available.func () bool {return hasDriver}// Driver returns the shim driver registered under ShimName name.func () driver.Driver {return shimDriver}// DriverName is the name of the database/sql driver. Note that unlike ShimName// the value depends on the build target. That is, DriverName returns the name// of the underlying database driver.func () string {return driverName}
![]() |
The pages are generated with Golds v0.3.6. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |