Documentation ¶
Index ¶
- func AddHandler(schemaName string, tableName string, handler Handler)
- func Init()
- type Database
- type Handler
- type VirtualTable
- func (tbl *VirtualTable) Collation() sql.CollationID
- func (tbl *VirtualTable) DebugString() string
- func (tbl *VirtualTable) Name() string
- func (tbl *VirtualTable) PartitionRows(ctx *sql.Context, partition sql.Partition) (sql.RowIter, error)
- func (tbl *VirtualTable) Partitions(ctx *sql.Context) (sql.PartitionIter, error)
- func (tbl *VirtualTable) PrimaryKeySchema() sql.PrimaryKeySchema
- func (tbl *VirtualTable) Schema() sql.Schema
- func (tbl *VirtualTable) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddHandler ¶
AddHandler adds the given handler to the handler set.
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 ¶
GetTableInsensitive implements the interface sql.DatabaseSchema.
func (Database) GetTableNames ¶
GetTableNames implements the interface sql.DatabaseSchema.
func (Database) SchemaName ¶
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.