duckdb

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultLibPath = "/opt/homebrew/lib/libduckdb.dylib"

DefaultLibPath is where a Homebrew install puts libduckdb on macOS, the usual development setup; SQLFLOW_DUCKDB_LIB overrides it.

View Source
const DefaultLinuxLibPath = "/usr/local/lib/libduckdb.so"

DefaultLinuxLibPath is where scripts/install-libduckdb.sh and the container image put the library. The pinned version lives in the DUCKDB_VERSION file, not here: nothing in the Go build cares which release is installed, only where it landed.

Variables

This section is empty.

Functions

func LibPath

func LibPath() string

LibPath resolves the DuckDB shared library the ADBC driver manager loads.

func Open

func Open(ctx context.Context) (adbc.Connection, error)

Open returns a single in-memory DuckDB connection, for callers that need no handle of their own.

Types

type DB added in v1.0.5

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

DB is an open DuckDB database. It exists to hold the ADBC database handle, which is what allows more than one connection against the same file.

That matters twice over. A file-backed database is how pipeline state survives a crash, and a second connection is how that state can be read -- by the stats endpoint -- without disturbing the writer: connections have independent transaction state, so a reader sees committed rows only and never blocks the pipeline.

func OpenPath added in v1.0.5

func OpenPath(ctx context.Context, path string) (*DB, error)

OpenPath opens a DuckDB database over ADBC. A non-empty path is a file, so tables created on it outlive the process; an empty path is in-memory.

func (*DB) Close added in v1.0.5

func (d *DB) Close() error

func (*DB) Connect added in v1.0.5

func (d *DB) Connect(ctx context.Context) (adbc.Connection, error)

Connect opens one connection to the database. Each connection carries its own transaction state.

func (*DB) Path added in v1.0.5

func (d *DB) Path() string

Path is the file backing the database, empty when it is in-memory.

Jump to

Keyboard shortcuts

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