Socket
Socket
Sign inDemoInstall

github.com/uptrace/bun/driver/sqliteshim

Package Overview
Dependencies
25
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    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: Otherwise registers a driver that returns an error on unsupported platforms.


Version published

Readme

Source

sqliteshim

PkgGoDev

sqliteshim automatically imports modernc.org/sqlite or mattn/go-sqlite3 depending on your platform.

Currently sqliteshim uses packages in the following order:

Otherwise it registers a driver that returns an error on unsupported platforms.

You can install sqliteshim with:

go get github.com/uptrace/bun/driver/sqliteshim

And then create a sql.DB:

sqldb, err := sql.Open(sqliteshim.ShimName, "file::memory:?cache=shared")

Alternatively you can also use sqliteshim.DriverName:

if sqliteshim.HasDriver() {
	sqldb, err := sql.Open(sqliteshim.DriverName(), "file::memory:?cache=shared")
}

FAQs

Last updated on 11 Jan 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc