Versions in this module Expand all Collapse all v1 v1.0.0 Nov 10, 2026 Changes in this version + var ErrTableNotFound = errors.New("table not found") + type Affinity int + const AffinityBlob + const AffinityInteger + const AffinityNumeric + const AffinityReal + const AffinityText + type Column struct + DefaultValue sql.NullString + Name string + NotNull bool + PKIndex int + Type string + func (c Column) Affinity() Affinity + func (c Column) IsPrimaryKey() bool + func (c Column) Nullable() bool + type Introspector interface + Table func(ctx context.Context, name string) (*Table, error) + Tables func(ctx context.Context) ([]Table, error) + type Querier interface + QueryContext func(ctx context.Context, query string, args ...any) (*sql.Rows, error) + type SQLIntrospector struct + func NewSQLIntrospector(db Querier) *SQLIntrospector + func (s *SQLIntrospector) Table(ctx context.Context, name string) (*Table, error) + func (s *SQLIntrospector) Tables(ctx context.Context) ([]Table, error) + type Table struct + Columns []Column + Name string + Type string + func (t *Table) Column(name string) (Column, bool) + func (t *Table) ColumnNames() []string + func (t *Table) HasColumn(name string) bool + func (t *Table) IsView() bool + func (t *Table) PrimaryKey() []Column + func (t *Table) RowKey() (Column, bool)