Documentation
¶
Index ¶
- Constants
- Variables
- type IndexInfo
- type Indexes
- type IndexesMap
- type Manager
- func (m *Manager) CreateIndex(idxName string, tableName string, idxType indexes.IndexType, fieldName string, ...) error
- func (m *Manager) CreateTable(tableName string, schema records.Schema, trx scan.TRXInt) error
- func (m *Manager) CreateView(viewName string, viewDef string, trx scan.TRXInt) error
- func (m *Manager) ForEachTables(trx scan.TRXInt, call func(tableName string) (stop bool, err error)) error
- func (m *Manager) GetStatInfo(tableName string, layout records.Layout, trx scan.TRXInt) (StatInfo, error)
- func (m *Manager) Layout(tableName string, trx scan.TRXInt) (records.Layout, error)
- func (m *Manager) TableIndexes(tableName string, trx scan.TRXInt) (IndexesMap, error)
- func (m *Manager) ViewDef(viewName string, trx scan.TRXInt) (string, error)
- type StatInfo
- type Stats
- type Tables
- func (t *Tables) CreateTable(tableName string, schema records.Schema, trx scan.TRXInt) error
- func (t *Tables) ForEachTables(trx scan.TRXInt, call func(tableName string) (stop bool, err error)) error
- func (t *Tables) Layout(tableName string, trx scan.TRXInt) (records.Layout, error)
- func (t *Tables) NewCatalogTableScan(trx scan.TRXInt) (*scan.TableScan, *scan.TableScan, error)
- func (t *Tables) NewFieldsCatalogTableScan(trx scan.TRXInt) (*scan.TableScan, error)
- func (t *Tables) NewTableCatalogTableScan(trx scan.TRXInt) (*scan.TableScan, error)
- func (t *Tables) TableExists(tableName string, trx scan.TRXInt) (stop bool, err error)
- type TablesManager
- type Views
Constants ¶
View Source
const ( IndexCatalogTableName = "sdb_indexes" IcatIndexTypeField = "indextype" IcatIndexNameField = "indexname" IcatTableNameField = "tablename" IcatFieldNameField = "fieldname" )
View Source
const ( MaxTableNameLength = 32 TableCatalogTableName = "sdb_tables" TcatTableNameField = "tblname" TcatSlotsizeField = "slotsize" FcatTableNameField = "tblname" FcatFieldNameField = "fldname" FcatTypeField = "type" FcatLengthField = "length" FcatOffsetField = "offset" )
View Source
const ( MaxViewNameLength = MaxTableNameLength MaxViewsDefLength = 200 VcatViewNameField = "viewname" VcatViewDefField = "viewdef" )
View Source
const RefreshStatCalls = 100
Variables ¶
View Source
var ( ErrMetadata = errors.New("metadata error") ErrTablesMetadata = errors.Wrap(ErrMetadata, "tables error") ErrFailedToCreateTable = errors.Wrap(ErrMetadata, "failed to create table") ErrTableNotFound = errors.Wrap(ErrTablesMetadata, "table not found") ErrTableExists = errors.Wrap(ErrTablesMetadata, "table already exists") ErrTableSchemaNotFound = errors.Wrap(ErrTablesMetadata, "table schema not found") ErrViewsMetadata = errors.Wrap(ErrMetadata, "views error") ErrViewNotFound = errors.Wrap(ErrViewsMetadata, "view not found") ErrViewExists = errors.Wrap(ErrViewsMetadata, "view already exists") ErrStatsMetadata = errors.Wrap(ErrMetadata, "stats error") ErrsStatsUnknownFieldType = errors.Wrap(ErrStatsMetadata, "unknown field type") ErrIndexesMetadata = errors.Wrap(ErrMetadata, "indexes error") ErrIndexExists = errors.Wrap(ErrIndexesMetadata, "index already exists") ErrFieldIndexed = errors.Wrap(ErrIndexesMetadata, "field already indexed") ErrFailedToOpenIndex = errors.Wrap(ErrIndexesMetadata, "failed to open index") )
Functions ¶
This section is empty.
Types ¶
type IndexInfo ¶
type IndexInfo struct {
// contains filtered or unexported fields
}
func NewIndexInfo ¶
func (*IndexInfo) BlocksAccessed ¶
func (*IndexInfo) DistinctValues ¶
type Indexes ¶
type Indexes struct {
// contains filtered or unexported fields
}
func NewIndexes ¶
func (*Indexes) CreateIndex ¶
func (*Indexes) NewIndexCatalogTableScan ¶
func (*Indexes) TableIndexes ¶
type IndexesMap ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func (*Manager) CreateIndex ¶
func (*Manager) CreateTable ¶
func (*Manager) CreateView ¶
func (*Manager) ForEachTables ¶
func (*Manager) GetStatInfo ¶
func (*Manager) TableIndexes ¶
type Stats ¶
type Stats struct {
// contains filtered or unexported fields
}
func (*Stats) GetStatInfo ¶
func (*Stats) HasStatInfo ¶
type Tables ¶
type Tables struct { TcatTable string FcatTable string TcatLayout records.Layout FcatLayout records.Layout }
func (*Tables) CreateTable ¶
func (*Tables) ForEachTables ¶
func (*Tables) NewCatalogTableScan ¶
func (*Tables) NewFieldsCatalogTableScan ¶
func (*Tables) NewTableCatalogTableScan ¶
type TablesManager ¶
Click to show internal directories.
Click to hide internal directories.