tables

package
v0.52.3 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddHandler

func AddHandler(schemaName string, tableName string, handler Handler)

AddHandler adds the given handler to the handler set.

func Init

func Init()

Init handles initialization of all Postgres-specific and Doltgres-specific tables.

Types

type Database

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

Database is a wrapper around Dolt's database object, allowing for functionality specific to Doltgres (such as system tables).

func (Database) GetTableInsensitive

func (d Database) GetTableInsensitive(ctx *sql.Context, tblName string) (sql.Table, bool, error)

GetTableInsensitive implements the interface sql.DatabaseSchema.

func (Database) GetTableNames

func (d Database) GetTableNames(ctx *sql.Context) ([]string, error)

GetTableNames implements the interface sql.DatabaseSchema.

func (Database) Name

func (d Database) Name() string

Name implements the interface sql.DatabaseSchema.

func (Database) SchemaName

func (d Database) SchemaName() string

type Handler

type Handler interface {
	// Name returns the name of the table.
	Name() string
	// RowIter returns a sql.RowIter that returns the rows of the table.
	RowIter(ctx *sql.Context, partition sql.Partition) (sql.RowIter, error)
	// PkSchema returns the table's schema.
	PkSchema() sql.PrimaryKeySchema
}

Handler is an interface that controls how data is represented for some table.

type IndexedTableHandler added in v0.52.0

type IndexedTableHandler interface {
	Handler
	// Indexes returns the table's indexes.
	Indexes() ([]sql.Index, error)
	// LookupPartitions returns a sql.PartitionIter that can be used to look up rows in the table using the given lookup
	LookupPartitions(context *sql.Context, lookup sql.IndexLookup) (sql.PartitionIter, error)
}

type VirtualTable

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

VirtualTable represents a table that does not enforce any particular storage of its data.

func NewVirtualTable

func NewVirtualTable(handler Handler, schema sql.DatabaseSchema) *VirtualTable

NewVirtualTable creates a new *VirtualTable from the given Handler.

func (*VirtualTable) Collation

func (tbl *VirtualTable) Collation() sql.CollationID

Collation implements the interface sql.Table.

func (*VirtualTable) DatabaseSchema added in v0.51.0

func (tbl *VirtualTable) DatabaseSchema() sql.DatabaseSchema

func (*VirtualTable) DebugString

func (tbl *VirtualTable) DebugString() string

DebugString implements the interface sql.DebugStringer.

func (*VirtualTable) GetIndexes added in v0.52.0

func (tbl *VirtualTable) GetIndexes(ctx *sql.Context) ([]sql.Index, error)

GetIndexes implements the interface sql.IndexedTable.

func (*VirtualTable) IndexedAccess added in v0.52.0

func (tbl *VirtualTable) IndexedAccess(ctx *sql.Context, lookup sql.IndexLookup) sql.IndexedTable

IndexedAccess implements the interface sql.IndexAddressableTable.

func (*VirtualTable) LookupPartitions added in v0.52.0

func (tbl *VirtualTable) LookupPartitions(ctx *sql.Context, lookup sql.IndexLookup) (sql.PartitionIter, error)

LookupPartitions implements the interface sql.IndexedTable.

func (*VirtualTable) Name

func (tbl *VirtualTable) Name() string

Name implements the interface sql.Table.

func (*VirtualTable) PartitionRows

func (tbl *VirtualTable) PartitionRows(ctx *sql.Context, partition sql.Partition) (sql.RowIter, error)

PartitionRows implements the interface sql.Table.

func (*VirtualTable) Partitions

func (tbl *VirtualTable) Partitions(ctx *sql.Context) (sql.PartitionIter, error)

Partitions implements the interface sql.Table.

func (*VirtualTable) PreciseMatch added in v0.52.0

func (tbl *VirtualTable) PreciseMatch() bool

GetIndexLookup implements the interface sql.IndexAddressableTable.

func (*VirtualTable) PrimaryKeySchema

func (tbl *VirtualTable) PrimaryKeySchema() sql.PrimaryKeySchema

PrimaryKeySchema implements the interface sql.PrimaryKeyTable.

func (*VirtualTable) Schema

func (tbl *VirtualTable) Schema() sql.Schema

Schema implements the interface sql.Table.

func (*VirtualTable) String

func (tbl *VirtualTable) String() string

String implements the interface sql.Table.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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