sqlite

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package sqlite provides a live schema Loader for SQLite databases. It uses PRAGMA commands (table_info, index_list, index_info, foreign_key_list) to retrieve tables, columns, indexes, and foreign keys. No CGO is required when using modernc.org/sqlite.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Loader

type Loader struct{}

Loader implements db.Loader for SQLite.

func NewLoader

func NewLoader() *Loader

NewLoader returns a new SQLite schema loader.

func (*Loader) Load

func (l *Loader) Load(db *sql.DB, schemaName string) (*dbschema.DatabaseSchema, error)

Load returns the full schema for all user tables. schemaName is recorded in the returned DatabaseSchema but otherwise unused (SQLite does not have named schemas in the PostgreSQL sense; use "main").

func (*Loader) LoadTable

func (l *Loader) LoadTable(db *sql.DB, schemaName, tableName string) (*dbschema.Table, error)

LoadTable returns schema for a single named table.

Jump to

Keyboard shortcuts

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