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
- func Spec(o Options, dl queryengine.Dialect) queryengine.KindSpec
- type Engine
- func (e *Engine) Cancel(context.Context, queryengine.QueryHandle) error
- func (e *Engine) Capabilities() queryengine.Capabilities
- func (e *Engine) Class() queryengine.Class
- func (e *Engine) Close() error
- func (e *Engine) Dialect() queryengine.Dialect
- func (e *Engine) ID() string
- func (e *Engine) Introspector() queryengine.Introspector
- func (e *Engine) Kind() string
- func (e *Engine) OpenSession(ctx context.Context, spec queryengine.SessionSpec) (queryengine.Session, error)
- func (e *Engine) Ping(ctx context.Context) error
- type Options
Constants ¶
const Catalog = "main"
Catalog is the only catalog of a SQLite database.
const Kind = "sqlite"
Kind is the registered engine kind.
Variables ¶
This section is empty.
Functions ¶
func Spec ¶
func Spec(o Options, dl queryengine.Dialect) queryengine.KindSpec
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 ¶
func (e *Engine) Cancel(context.Context, queryengine.QueryHandle) error
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) Dialect ¶
func (e *Engine) Dialect() queryengine.Dialect
func (*Engine) Introspector ¶
func (e *Engine) Introspector() queryengine.Introspector
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.