node

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package node opens durable storage on a native SQLite connection. The driver is Chord's (chord/sqlite/node, Pi's @earendil-works/chord/sqlite/node); this package re-exports it and adds the durable storage opener, as Pi's packages/durable/src/storage/sqlite/node.ts does.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenNodeSqliteStorage

func OpenNodeSqliteStorage(path string, options NodeSqliteStorageOptions) (*durablesqlite.SqliteStorage, error)

OpenNodeSqliteStorage opens or creates file-backed durable storage, optionally under a table prefix. An invalid prefix fails before the database or its directory is created. A store at an older schema version is copied to <path>.schema-<N>.bak before it is upgraded (D188).

Types

type AggregateError

type AggregateError = chordnode.AggregateError

The Chord driver's names, re-exported as Pi's durable node entry point re-exports them.

type DatabaseSync

type DatabaseSync = chordnode.DatabaseSync

The Chord driver's names, re-exported as Pi's durable node entry point re-exports them.

func NewDatabaseSync

func NewDatabaseSync(path string, options DatabaseSyncOptions) (*DatabaseSync, error)

NewDatabaseSync is Chord's NewDatabaseSync.

type DatabaseSyncOptions

type DatabaseSyncOptions = chordnode.DatabaseSyncOptions

The Chord driver's names, re-exported as Pi's durable node entry point re-exports them.

type NodeSqliteDatabase

type NodeSqliteDatabase = chordnode.NodeSqliteDatabase

The Chord driver's names, re-exported as Pi's durable node entry point re-exports them.

func NewNodeSqliteDatabase

func NewNodeSqliteDatabase(database *DatabaseSync) *NodeSqliteDatabase

NewNodeSqliteDatabase is Chord's NewNodeSqliteDatabase.

func OpenNodeSqliteDatabase

func OpenNodeSqliteDatabase(path string, options NodeSqliteDatabaseOptions) (*NodeSqliteDatabase, error)

OpenNodeSqliteDatabase is Chord's OpenNodeSqliteDatabase.

type NodeSqliteDatabaseOptions

type NodeSqliteDatabaseOptions = chordnode.NodeSqliteDatabaseOptions

The Chord driver's names, re-exported as Pi's durable node entry point re-exports them.

type NodeSqliteStorageOptions

type NodeSqliteStorageOptions struct {
	chordnode.NodeSqliteDatabaseOptions
	// Prefix namespaces every table and index of the durable schema; see sqlite.SqliteStorageOptions.Prefix.
	Prefix *string
	// WorkingSetBytes bounds the decoded entries the storage retains so context reads do not decode the stored history
	// again. It defaults to sqlite.DefaultWorkingSetBytes; 0 retains nothing.
	// pig additive (D104): the working set of decoded entries has no Pi counterpart.
	WorkingSetBytes *int64
}

NodeSqliteStorageOptions is the connection settings plus the durable storage options: the table Prefix (Pi's SqliteStorageOptions.prefix) and the working set. A nil field selects its default.

type StatementSync

type StatementSync = chordnode.StatementSync

The Chord driver's names, re-exported as Pi's durable node entry point re-exports them.

Jump to

Keyboard shortcuts

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