sqlite

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: LGPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package sqlite adapts the pure-Go glebarez SQLite driver to gormdb, so the binary builds without CGO. Importing it registers the database/sql driver "sqlite", the name modernc.org/sqlite registers too: a binary that links both panics at init.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver struct{}

Driver implements gormdb.SqliteDriver with glebarez.

func (Driver) Dialector

func (Driver) Dialector(conn gorm.ConnPool) gorm.Dialector

Dialector wraps an open connection pool.

func (Driver) OpenDB

func (Driver) OpenDB(dsn string) (*sql.DB, error)

OpenDB returns a connection pool for dsn with the database/sql driver glebarez registers, "sqlite".

func (Driver) PragmaParams

func (Driver) PragmaParams(pragmas map[string]string) url.Values

PragmaParams returns the pragmas as glebarez's _pragma=name(value) parameters, sorted by name.

func (Driver) ReaderParams

func (Driver) ReaderParams(busyTimeout time.Duration) url.Values

ReaderParams returns a reader's DSN query parameters in glebarez's format.

func (Driver) WriterParams

func (Driver) WriterParams(busyTimeout time.Duration) url.Values

WriterParams returns the writer's DSN query parameters in glebarez's format.

Jump to

Keyboard shortcuts

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