tables

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: Apache-2.0 Imports: 4 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) (sql.RowIter, error)
	// Schema returns the table's schema.
	Schema() sql.PrimaryKeySchema
}

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

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) *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) DebugString

func (tbl *VirtualTable) DebugString() string

DebugString implements the interface sql.DebugStringer.

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) 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