tinygosqlite

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

README

tinygosqlite

tinygosqlite is Petitweb's small native SQLite driver for TinyGo and force_tinygo_logic builds. It implements database/sql over a statically linked copy of the official SQLite amalgamation; it does not use WebAssembly or load the operating system's SQLite library.

The bundled SQLite is 3.53.3 (sqlite-amalgamation-3530300.zip). Loadable extensions and double-quoted string literals are disabled. URI filenames accept only mode, cache, immutable, and busy_timeout (0–60000 ms).

Import the higher-level database/sql/sqlite package unless a direct test of this backend is required.

TinyGo 0.42.0 is tested natively on macOS arm64, and cross-links clean for linux/arm64 and linux/amd64; the last native Linux run was on 0.41.1. The macOS minimal SDK build uses standard malloc bookkeeping and POSIX locking because the SDK omits the Mach zone-allocator and filesystem-specific locking headers used by full Darwin SDKs.

Documentation

Overview

Package tinygosqlite provides a small database/sql driver backed by the statically linked, official SQLite amalgamation.

Index

Constants

View Source
const (
	// DriverName is the database/sql registration name shared by all Petitweb
	// SQLite backends.
	DriverName = "sqlite"
)

Variables

View Source
var Driver driver.Driver = &sqliteDriver{}

Driver is the registered database/sql driver instance.

Functions

func Version

func Version() string

Version returns the version of the statically linked SQLite library.

Types

type Error

type Error struct {
	Code         int
	ExtendedCode int
	Message      string
}

Error is an SQLite error with both primary and extended result codes.

func (*Error) Error

func (e *Error) Error() string

Jump to

Keyboard shortcuts

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