Help us shape the future of Go! Take the 2026 Go Developer Survey

sqlitedriver

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package sqlitedriver owns this project's SQLite driver choice and the few operations that cannot be expressed through database/sql.

The driver is the C library through cgo rather than a pure-Go translation of it. Nothing is given up by that: the tree-sitter grammars already make cgo and a C toolchain mandatory on every release target, so a pure-Go SQLite bought no portability, while its emulated libc cost a measurable share of every indexing run. On the same index rebuild the C library used 15.4s of CPU against 27.9s.

Index

Constants

View Source
const Name = "sqlite"

Name is the driver name every caller opens a graph database with. It is deliberately unchanged by the move to cgo so that no call site has to know which implementation is registered under it.

Variables

This section is empty.

Functions

func Busy

func Busy(err error) bool

Busy reports whether err is SQLite refusing an operation because another connection holds the lock it needs, which callers retry rather than surface.

func Corrupt

func Corrupt(err error) bool

Corrupt reports whether err is SQLite rejecting a file as damaged or as not a database at all, which is a different answer to a caller than a file it simply could not read.

func VariableLimit

func VariableLimit(ctx context.Context, db *sql.DB) (int, error)

VariableLimit reports how many bound parameters one statement may carry on this connection. Batched writes are sized against it, and it is a property of the linked library rather than of the schema, so it is read rather than assumed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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