sqlite

package module
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package sqlite is the embedded SQLite store driver. Since ADR-0019 S1 it is a THIN DRIVER over the queue/v4-backed adapter (internal/queue/sqlitev4): the hand-rolled engine is retired and the upstream go-cqrs-lite queue engine owns the task/fact semantics, with token-fenced finalizes (upstream ADR-0134) replacing the legacy owner-string fence. The tq Store contract is unchanged for callers.

Open is also the BACKWARD AUTO-UPGRADE seam (ADR-0019 endgame P1): a pre-flip hand-rolled database is probed, snapshotted, converged in place, and projection-verified before the store serves — the deployed binary upgrades the production journal transparently on first open. Refuse with TQ_NO_AUTO_UPGRADE=1 (the replay CLI remains the manual path). Direct sqlitev4.Open callers bypass the shim deliberately.

Index

Constants

This section is empty.

Variables

View Source
var WithProjectExclusivity = v4.WithProjectExclusivity

WithProjectExclusivity turns on store-level per-project serialization: ClaimDue will not claim a task whose project already has another running task — across ALL pools and processes sharing the same database file, not just within one pool. This is the per-repo guarantee for agent pools: two agents never work the same repo simultaneously. Every pool sharing the DB must opt in; pools that do not opt in ignore the guard. Tasks with an empty project are exempt (they are not tied to a repo).

Functions

This section is empty.

Types

type ArchiveStats

type ArchiveStats = v4.ArchiveStats

ArchiveStats reports hot vs archived fact counts and the compaction watermark (highest archived seq; -1 when nothing was archived yet).

type Store

type Store = v4.Store

Store is the durable store; one queue per database file.

func Open

func Open(path string, opts ...StoreOption) (*Store, error)

Open opens (creating if needed) the queue database at path. A legacy pre-flip database at path is auto-upgraded first (see the package doc).

type StoreOption

type StoreOption = v4.StoreOption

StoreOption configures optional Store behavior.

Jump to

Keyboard shortcuts

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