storage

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package storage defines the database abstraction used throughout AgentStore. All query code depends on this interface so the underlying backend (SQLite today, PostgreSQL later) can be swapped without rewriting query logic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB interface {
	Querier
	BeginTx(ctx context.Context, opts *sql.TxOptions) (*sql.Tx, error)
	PingContext(ctx context.Context) error
	Close() error
}

DB is the full database handle — supports Querier plus transaction control.

type Querier

type Querier interface {
	ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error)
	QueryContext(ctx context.Context, query string, args ...any) (*sql.Rows, error)
	QueryRowContext(ctx context.Context, query string, args ...any) *sql.Row
}

Querier covers the query methods shared by *sql.DB and *sql.Tx. Pass a Querier to any function that must work inside or outside a transaction.

Directories

Path Synopsis
Package sqlite provides a storage.DB backed by a pure-Go SQLite driver.
Package sqlite provides a storage.DB backed by a pure-Go SQLite driver.

Jump to

Keyboard shortcuts

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