Versions in this module Expand all Collapse all v0 v0.0.2 May 3, 2021 v0.0.1 May 3, 2021 Changes in this version + const AllowNulls + const NoNulls + var DescribeColMap = map[string]int + var DescribeCols = []string + var DescribeFullColMap = map[string]int + var DescribeFullCols = []string + var DescribeFullHeaders = NewDescribeFullHeaders() + var DescribeHeaders = NewDescribeHeaders() + var DisableRecover bool + var EngineFullCols = []string + var ErrNotFound = fmt.Errorf("Not Found") + var ErrNotImplemented = fmt.Errorf("Not Implemented") + var ProdedureFullCols = []string + var SchemaRefreshInterval = -time.Minute * 5 + var ShowDatabasesColumns = []string + var ShowIndexCols = []string + var ShowTableColumnMap = map[string]int + var ShowTableColumns = []string + var ShowVariablesColumns = []string + func CreateDefaultRegistry(applyer Applyer) + func RegisterSchema(schema *Schema) error + func RegisterSourceAsSchema(name string, source Source) error + func RegisterSourceType(sourceType string, source Source) + type Alter interface + DropTable func(table string) error + type Applyer interface + AddOrUpdateOnSchema func(s *Schema, obj interface{}) error + Drop func(s *Schema, obj interface{}) error + Init func(r *Registry) + func NewApplyer(sp SchemaSourceProvider) Applyer + type ConfigNode struct + Address string + Name string + Settings u.JsonHelper + Source string + type ConfigSchema struct + ConfigNode []string + Name string + Sources []string + type ConfigSource struct + Hosts []string + Name string + Nodes []*ConfigNode + PartitionCt uint32 + Partitions []*TablePartition + Schema string + Settings u.JsonHelper + SourceType string + TableAliases map[string]string + TablesToLoad []string + func NewSourceConfig(name, sourceType string) *ConfigSource + func (m *ConfigSource) String() string + type Conn interface + Close func() error + func OpenConn(schemaName, table string) (Conn, error) + type ConnAll interface + Close func() error + type ConnColumns interface + Columns func() []string + type ConnDeletion interface + Delete func(driver.Value) (int, error) + DeleteExpression func(p interface{}, n expr.Node) (int, error) + type ConnMutation interface + CreateMutator func(pc interface{}) (ConnMutator, error) + type ConnMutator interface + type ConnPatchWhere interface + PatchWhere func(ctx context.Context, where expr.Node, patch interface{}) (int64, error) + type ConnScanner interface + type ConnSeeker interface + Get func(key driver.Value) (Message, error) + type ConnUpsert interface + Put func(ctx context.Context, key Key, value interface{}) (Key, error) + PutMulti func(ctx context.Context, keys []Key, src interface{}) ([]Key, error) + type DialectWriter interface + Dialect func() string + FieldType func(t value.ValueType) string + Table func(tbl *Table) string + type Field struct + Context map[string]interface{} + func NewDescribeFullHeaders() []*Field + func NewDescribeHeaders() []*Field + func NewField(name string, valType value.ValueType, size int, allowNulls bool, ...) *Field + func NewFieldBase(name string, valType value.ValueType, size int, desc string) *Field + func (m *Field) AddContext(key string, value interface{}) + func (m *Field) AsRow() []driver.Value + func (m *Field) Body() interface{} + func (m *Field) Id() uint64 + func (m *Field) String() string + func (m *Field) ValueType() value.ValueType + type FieldData []byte + type FieldPb struct + Collation string + ContextJson []byte + Data string + DefLength uint64 + DefVal []byte + Description string + Extra string + Indexed bool + Indexes []*Index + Key string + Length uint32 + Name string + NativeType uint32 + NoNulls bool + Roles []string + Type uint32 + func (*FieldPb) Descriptor() ([]byte, []int) + func (*FieldPb) ProtoMessage() + func (m *FieldPb) GetCollation() string + func (m *FieldPb) GetContextJson() []byte + func (m *FieldPb) GetData() string + func (m *FieldPb) GetDefLength() uint64 + func (m *FieldPb) GetDefVal() []byte + func (m *FieldPb) GetDescription() string + func (m *FieldPb) GetExtra() string + func (m *FieldPb) GetIndexed() bool + func (m *FieldPb) GetIndexes() []*Index + func (m *FieldPb) GetKey() string + func (m *FieldPb) GetLength() uint32 + func (m *FieldPb) GetName() string + func (m *FieldPb) GetNativeType() uint32 + func (m *FieldPb) GetNoNulls() bool + func (m *FieldPb) GetRoles() []string + func (m *FieldPb) GetType() uint32 + func (m *FieldPb) Reset() + func (m *FieldPb) String() string + type InMemApplyer struct + func (m *InMemApplyer) AddOrUpdateOnSchema(s *Schema, v interface{}) error + func (m *InMemApplyer) Drop(s *Schema, v interface{}) error + func (m *InMemApplyer) Init(r *Registry) + type Index struct + Fields []string + HashPartition []string + Name string + PartitionSize int32 + PrimaryKey bool + func (*Index) Descriptor() ([]byte, []int) + func (*Index) ProtoMessage() + func (m *Index) GetFields() []string + func (m *Index) GetHashPartition() []string + func (m *Index) GetName() string + func (m *Index) GetPartitionSize() int32 + func (m *Index) GetPrimaryKey() bool + func (m *Index) Reset() + func (m *Index) String() string + type Iterator interface + Next func() Message + type Key interface + Key func() driver.Value + type KeyUint struct + ID uint64 + func NewKeyUint(key uint64) *KeyUint + func (m *KeyUint) Key() driver.Value + type Message interface + Body func() interface{} + Id func() uint64 + type MessageValues interface + Values func() []driver.Value + type Partition struct + Id string + Left string + Right string + func (*Partition) Descriptor() ([]byte, []int) + func (*Partition) ProtoMessage() + func (m *Partition) GetId() string + func (m *Partition) GetLeft() string + func (m *Partition) GetRight() string + func (m *Partition) Reset() + func (m *Partition) String() string + type Registry struct + func DefaultRegistry() *Registry + func NewRegistry(applyer Applyer) *Registry + func (m *Registry) GetSource(sourceType string) (Source, error) + func (m *Registry) Init() + func (m *Registry) Schema(schemaName string) (*Schema, bool) + func (m *Registry) SchemaAdd(s *Schema) error + func (m *Registry) SchemaAddChild(name string, child *Schema) error + func (m *Registry) SchemaAddFromConfig(conf *ConfigSource) error + func (m *Registry) SchemaDrop(schema, name string, objectType lex.TokenType) error + func (m *Registry) SchemaRefresh(name string) error + func (m *Registry) Schemas() []string + func (m *Registry) String() string + type Schema struct + Conf *ConfigSource + DS Source + InfoSchema *Schema + Name string + SchemaRef *Schema + func NewInfoSchema(schemaName string, s *Schema) *Schema + func NewSchema(schemaName string) *Schema + func NewSchemaSource(schemaName string, ds Source) *Schema + func (m *Schema) Current() bool + func (m *Schema) OpenConn(tableName string) (Conn, error) + func (m *Schema) Schema(schemaName string) (*Schema, error) + func (m *Schema) SchemaForTable(tableName string) (*Schema, error) + func (m *Schema) Since(dur time.Duration) bool + func (m *Schema) Table(tableIn string) (*Table, error) + func (m *Schema) Tables() []string + type SchemaSourceProvider func(s *Schema) Source + type Source interface + Close func() error + Init func() + Open func(source string) (Conn, error) + Setup func(*Schema) error + Table func(table string) (*Table, error) + Tables func() []string + type SourcePartitionable interface + PartitionSource func(p *Partition) (Conn, error) + Partitions func() []*Partition + type SourceTableColumn interface + Column func(col string) (value.ValueType, bool) + type SourceTableSchema interface + Table func(table string) (*Table, error) + type Table struct + Context map[string]interface{} + FieldMap map[string]*Field + FieldPositions map[string]int + Fields []*Field + Schema *Schema + Source Source + func NewTable(table string) *Table + func (m *Table) AddContext(key string, value interface{}) + func (m *Table) AddField(fld *Field) + func (m *Table) AddFieldType(name string, valType value.ValueType) + func (m *Table) AsRows() [][]driver.Value + func (m *Table) Body() interface{} + func (m *Table) Column(col string) (value.ValueType, bool) + func (m *Table) Columns() []string + func (m *Table) Current() bool + func (m *Table) FieldNamesPositions() map[string]int + func (m *Table) FieldsAsMessages() []Message + func (m *Table) HasField(name string) bool + func (m *Table) Id() uint64 + func (m *Table) Marshal() ([]byte, error) + func (m *Table) SetColumns(cols []string) + func (m *Table) SetColumnsFromFields() + func (m *Table) SetRefreshed() + func (m *Table) SetRows(rows [][]driver.Value) + func (m *Table) Since(dur time.Duration) bool + type TablePartition struct + Keys []string + Partitions []*Partition + Table string + func (*TablePartition) Descriptor() ([]byte, []int) + func (*TablePartition) ProtoMessage() + func (m *TablePartition) GetKeys() []string + func (m *TablePartition) GetPartitions() []*Partition + func (m *TablePartition) GetTable() string + func (m *TablePartition) Reset() + func (m *TablePartition) String() string + type TablePb struct + Charset uint32 + ContextJson []byte + Fieldpbs []*FieldPb + Indexes []*Index + Name string + NameOriginal string + Parent string + Partition *TablePartition + PartitionCt uint32 + func (*TablePb) Descriptor() ([]byte, []int) + func (*TablePb) ProtoMessage() + func (m *TablePb) GetCharset() uint32 + func (m *TablePb) GetContextJson() []byte + func (m *TablePb) GetFieldpbs() []*FieldPb + func (m *TablePb) GetIndexes() []*Index + func (m *TablePb) GetName() string + func (m *TablePb) GetNameOriginal() string + func (m *TablePb) GetParent() string + func (m *TablePb) GetPartition() *TablePartition + func (m *TablePb) GetPartitionCt() uint32 + func (m *TablePb) Reset() + func (m *TablePb) String() string + type TimeMessage interface + Ts func() time.Time