Help us shape the future of Go! Take the 2026 Go Developer Survey

refsvtab

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RefsModule

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

RefsModule implements vtab.Module. It is a process-wide singleton because modernc.org/sqlite registers modules globally (driver-level, not per-DB).

func Register

func Register() (*RefsModule, error)

Register registers the mache_refs module with the global SQLite driver. Safe to call multiple times — only the first call registers. Returns the singleton so callers can register their DB instances via RegisterDB.

func (*RefsModule) Connect

func (m *RefsModule) Connect(ctx vtab.Context, args []string) (vtab.Table, error)

func (*RefsModule) Create

func (m *RefsModule) Create(ctx vtab.Context, args []string) (vtab.Table, error)

func (*RefsModule) RegisterDB

func (m *RefsModule) RegisterDB(id string, db *sql.DB)

RegisterDB registers a database connection with a unique ID. The ID must be passed to CREATE VIRTUAL TABLE ... USING mache_refs(id).

func (*RefsModule) UnregisterDB

func (m *RefsModule) UnregisterDB(id string)

UnregisterDB removes a database connection from the registry. Should be called when the graph is closed.

Jump to

Keyboard shortcuts

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