meta

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TableKindSource           = "source"
	TableKindMaterializedView = "materialized_view"
	TableKindInternal         = "internal"
)
View Source
const (
	// SystemSchemaName is the name of the schema that houses system tables, similar to mysql's information_schema.
	SystemSchemaName = "sys"
	// TableDefTableName is the name of the table that holds all table definitions.
	TableDefTableName = "tables"
	IndexDefTableName = "indexes"
	ProtobufTableName = "protos"
	DummyTableName    = "dummy"
)

Variables

DummyTableInfo - Dummy is a simple table that we execute a query against at startup to ensure all shards are available

ProtobufTableInfo is a static definition of the table schema for the table schema table.

TableDefTableInfo is a static definition of the table schema for the table schema table.

Functions

func DecodeIndexInfoRow

func DecodeIndexInfoRow(row *common.Row) *common.IndexInfo

DecodeIndexInfoRow decodes a database row into a common.IndexInfo.

func DecodeInternalTableInfoRow

func DecodeInternalTableInfoRow(row *common.Row) *common.InternalTableInfo

DecodeInternalTableInfoRow decodes a database row into a common.InternalTableInfo.

func DecodeMaterializedViewInfoRow

func DecodeMaterializedViewInfoRow(row *common.Row) *common.MaterializedViewInfo

DecodeMaterializedViewInfoRow decodes a database row into a common.MaterializedViewInfo.

func DecodeSourceInfoRow

func DecodeSourceInfoRow(row *common.Row) *common.SourceInfo

DecodeSourceInfoRow decodes a database row into a common.SourceInfo.

func EncodeIndexInfoToRow

func EncodeIndexInfoToRow(info *common.IndexInfo) *common.Row

EncodeIndexInfoToRow encodes a common.IndexInfo into a database row.

func EncodeInternalTableInfoToRow

func EncodeInternalTableInfoToRow(info *common.InternalTableInfo) *common.Row

EncodeInternalTableInfoToRow encodes a common.InternalTableInfo into a database row.

func EncodeMaterializedViewInfoToRow

func EncodeMaterializedViewInfoToRow(info *common.MaterializedViewInfo) *common.Row

EncodeMaterializedViewInfoToRow encodes a common.MaterializedViewInfo into a database row.

func EncodeSourceInfoToRow

func EncodeSourceInfoToRow(info *common.SourceInfo) *common.Row

EncodeSourceInfoToRow encodes a common.SourceInfo into a database row.

Types

type Controller

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

func NewController

func NewController(store cluster.Cluster) *Controller

func (*Controller) DeleteEntityWithID

func (c *Controller) DeleteEntityWithID(tableID uint64) error

func (*Controller) DeleteIndex

func (c *Controller) DeleteIndex(indexID uint64) error

func (*Controller) DeleteMaterializedView

func (c *Controller) DeleteMaterializedView(mvInfo *common.MaterializedViewInfo, internalTableIDs []*common.InternalTableInfo) error

func (*Controller) DeleteSchemaIfEmpty

func (c *Controller) DeleteSchemaIfEmpty(schema *common.Schema)

DeleteSchemaIfEmpty - Schema are removed once they have no more tables

func (*Controller) DeleteSource

func (c *Controller) DeleteSource(sourceID uint64) error

func (*Controller) ExistsMvOrSource

func (c *Controller) ExistsMvOrSource(schema *common.Schema, name string) error

func (*Controller) GetIndex

func (c *Controller) GetIndex(schemaName string, tableName string, indexName string) (*common.IndexInfo, bool)

func (*Controller) GetMaterializedView

func (c *Controller) GetMaterializedView(schemaName string, name string) (*common.MaterializedViewInfo, bool)

func (*Controller) GetOrCreateSchema

func (c *Controller) GetOrCreateSchema(schemaName string) *common.Schema

func (*Controller) GetSchema

func (c *Controller) GetSchema(schemaName string) (schema *common.Schema, ok bool)

func (*Controller) GetSchemaNames

func (c *Controller) GetSchemaNames() []string

func (*Controller) GetSource

func (c *Controller) GetSource(schemaName string, name string) (*common.SourceInfo, bool)

func (*Controller) PersistIndex

func (c *Controller) PersistIndex(indexInfo *common.IndexInfo) error

func (*Controller) PersistMaterializedView

func (c *Controller) PersistMaterializedView(mvInfo *common.MaterializedViewInfo, internalTables []*common.InternalTableInfo) error

func (*Controller) PersistSource

func (c *Controller) PersistSource(sourceInfo *common.SourceInfo) error

func (*Controller) RegisterIndex

func (c *Controller) RegisterIndex(indexInfo *common.IndexInfo) error

RegisterIndex adds an index to the metadata controller, making it active. It does not persist it

func (*Controller) RegisterMaterializedView

func (c *Controller) RegisterMaterializedView(mvInfo *common.MaterializedViewInfo, internalTables []*common.InternalTableInfo) error

func (*Controller) RegisterSource

func (c *Controller) RegisterSource(sourceInfo *common.SourceInfo) error

RegisterSource adds a Source to the metadata controller, making it active. It does not persist it

func (*Controller) Start

func (c *Controller) Start() error

func (*Controller) Stop

func (c *Controller) Stop() error

func (*Controller) UnregisterIndex

func (c *Controller) UnregisterIndex(schemaName string, tableName string, indexName string) error

UnregisterIndex removes the index from memory but does not delete it from storage

func (*Controller) UnregisterMaterializedView

func (c *Controller) UnregisterMaterializedView(schemaName string, mvName string, internalTables []string) error

func (*Controller) UnregisterSource

func (c *Controller) UnregisterSource(schemaName string, sourceName string) error

UnregisterSource removes the source from memory but does not delete it from storage

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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