sqlite

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2026 License: Apache-2.0 Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package sqlite is the SQLite direct engine (#83): Baleia runs SQL on a SQLite database file itself, without Trino. SQLite has no network: a session is one dedicated database/sql connection to a file resolved inside BALEIA_SQLITE_ROOT (docs/adr/0011), opened read-only unless both the connection and the server allow writes. Results stream as Arrow, mapped by the declared type affinity of each column (modernc.org/sqlite, pure Go).

Index

Constants

View Source
const Catalog = "main"

Catalog is the only catalog of a SQLite database.

View Source
const Kind = "sqlite"

Kind is the registered engine kind.

Variables

This section is empty.

Functions

func Spec

Spec is the kind's entry for a queryengine.Registry (#364): engines it builds use o, the same confinement the SQLite provider applies.

Types

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

Engine is a SQLite database file reached directly.

func (*Engine) Cancel

Cancel is unsupported by handle: a SQLite statement is interrupted by cancelling its Execute context, in this process (CancelScope in_process).

func (*Engine) Capabilities

func (e *Engine) Capabilities() queryengine.Capabilities

Capabilities of SQLite in v1.

func (*Engine) Class

func (e *Engine) Class() queryengine.Class

func (*Engine) Close

func (e *Engine) Close() error

func (*Engine) Dialect

func (e *Engine) Dialect() queryengine.Dialect

func (*Engine) ID

func (e *Engine) ID() string

func (*Engine) Introspector

func (e *Engine) Introspector() queryengine.Introspector

func (*Engine) Kind

func (e *Engine) Kind() string

func (*Engine) OpenSession

func (e *Engine) OpenSession(ctx context.Context, spec queryengine.SessionSpec) (queryengine.Session, error)

OpenSession takes one dedicated connection; a read-only session uses the read-only pool even on a writable connection.

func (*Engine) Ping

func (e *Engine) Ping(ctx context.Context) error

Ping fails while the file is unreadable.

type Options

type Options struct {
	Root       string
	AllowWrite bool
}

Options are the server-side SQLite settings, mirroring the provider's (docs/adr/0011): Root is BALEIA_SQLITE_ROOT, which confines every database file; AllowWrite is BALEIA_SQLITE_ALLOW_WRITE, which permits writes at all. The composition root passes them to Spec (#364).

Jump to

Keyboard shortcuts

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