driver

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const DriverName = "tinysql"

DriverName is the registered database/sql driver name for tinySQL.

Variables

View Source
var (
	OpenInMemory = id.OpenInMemory
	SetDefaultDB = id.SetDefaultDB
)

Re-export selected symbols from the internal driver package so external consumers can use a stable public API while the implementation remains hidden under `internal/driver`.

Functions

func Open

func Open(dsn string) (*sql.DB, error)

Open is a convenience wrapper around `sql.Open(DriverName, dsn)`.

func OpenFile

func OpenFile(path string) (*sql.DB, error)

OpenFile is a convenience wrapper that opens a file-backed tinySQL database by constructing a `file:` DSN for `sql.Open`.

func OpenWithDB

func OpenWithDB(db *storage.DB) (*sql.DB, error)

OpenWithDB registers the provided storage.DB as the driver's default DB and returns a *sql.DB connected to it. This is useful for embedding or tests.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL