Documentation ¶
Index ¶
- Constants
- func DescribeTable(db *sql.DB, database, table string, knownPrimaryKeys []string) (*abstract.TableSchema, error)
- func GetBaseEngineType(engine string) (string, error)
- func GetReplicatedEngineType(engine string) (string, error)
- func GetReplicatedFromSharedEngineType(engine string) (string, error)
- func IsDistributedDDL(sql string) bool
- func IsMergeTreeFamily(engine string) bool
- func IsReplicatedEngineType(engine string) bool
- func IsSharedEngineType(engine string) bool
- func MakeDistributedDDL(sql, cluster string) string
- func ReplaceCluster(sql, cluster string) string
- func SetAltName(ddl string, targetDB string, names map[string]string) string
- func SetIfNotExists(sql string) string
- func SetReplicatedEngine(sql, baseEngine, db, table string) (string, error)
- func SetTargetDatabase(ddl string, sourceDB, targetDB string) string
- func TryFindNextStatement(sql string, from int) int
- type DDLBatch
- type DDLLoaders
- type DDLSource
- type Engine
- type EngineType
- type MergeTreeFamilyEngine
- type ReplicatedEngine
- type ReplicatedEngineParams
- type TableDDL
Constants ¶
View Source
const ( // ClickhouseDDLTimeout is default value of distributed_ddl_task_timeout CH setting, used as fallback ClickhouseDDLTimeout = 180 // DDLTimeoutCorrection is added to DDL query timeout to have a chance to catch CH error, instead of ContextDeadlineExceeded DDLTimeoutCorrection = 2 ClickhouseReadTimeout = 30 * time.Second )
View Source
const ( MaterializedView = EngineType("MaterializedView") MergeTree = EngineType("MergeTree") ReplacingMergeTree = EngineType("ReplacingMergeTree") SummingMergeTree = EngineType("SummingMergeTree") AggregatingMergeTree = EngineType("AggregatingMergeTree") CollapsingMergeTree = EngineType("CollapsingMergeTree") VersionedCollapsingMergeTree = EngineType("VersionedCollapsingMergeTree") GraphiteMergeTree = EngineType("GraphiteMergeTree") ReplicatedMergeTree = EngineType("ReplicatedMergeTree") ReplicatedReplacingMergeTree = EngineType("ReplicatedReplacingMergeTree") ReplicatedSummingMergeTree = EngineType("ReplicatedSummingMergeTree") ReplicatedAggregatingMergeTree = EngineType("ReplicatedAggregatingMergeTree") ReplicatedCollapsingMergeTree = EngineType("ReplicatedCollapsingMergeTree") ReplicatedVersionedCollapsingMergeTree = EngineType("ReplicatedVersionedCollapsingMergeTree") ReplicatedGraphiteMergeTree = EngineType("ReplicatedGraphiteMergeTree") // SharedMergeTree family is available on ch.inc exclusively )
Variables ¶
This section is empty.
Functions ¶
func DescribeTable ¶
func GetBaseEngineType ¶
func GetReplicatedEngineType ¶
func IsDistributedDDL ¶
func IsMergeTreeFamily ¶
func IsReplicatedEngineType ¶
func IsSharedEngineType ¶
func MakeDistributedDDL ¶
func ReplaceCluster ¶
func SetIfNotExists ¶
func SetReplicatedEngine ¶
func SetTargetDatabase ¶
func TryFindNextStatement ¶
Types ¶
type DDLBatch ¶
type DDLBatch struct { DDLs []TableDDL // contains filtered or unexported fields }
func NewDDLBatch ¶
type DDLLoaders ¶
type DDLSource ¶
type DDLSource struct {
// contains filtered or unexported fields
}
func NewDDLSource ¶
type EngineType ¶
type EngineType string
type MergeTreeFamilyEngine ¶
type MergeTreeFamilyEngine struct { Type EngineType Params []string }
func GetEngine ¶
func GetEngine(engineStrSQL string) (engine *MergeTreeFamilyEngine, engineStr string, err error)
func ParseMergeTreeFamilyEngine ¶
func ParseMergeTreeFamilyEngine(sql string) (*MergeTreeFamilyEngine, string, error)
func (*MergeTreeFamilyEngine) IsEngine ¶
func (mt *MergeTreeFamilyEngine) IsEngine()
func (*MergeTreeFamilyEngine) String ¶
func (mt *MergeTreeFamilyEngine) String() string
type ReplicatedEngine ¶
type ReplicatedEngine struct { BaseEngine MergeTreeFamilyEngine Type EngineType Params ReplicatedEngineParams }
func ConvertToReplicated ¶
func ConvertToReplicated(engine *MergeTreeFamilyEngine) (ReplicatedEngine, error)
func NewReplicatedEngine ¶
func NewReplicatedEngine(baseEngine *MergeTreeFamilyEngine, db, table string) (ReplicatedEngine, error)
func (*ReplicatedEngine) IsEngine ¶
func (re *ReplicatedEngine) IsEngine()
func (*ReplicatedEngine) String ¶
func (re *ReplicatedEngine) String() string
type ReplicatedEngineParams ¶
func ParseReplicatedEngineParams ¶
func ParseReplicatedEngineParams(zooPathArg, replicaArg string) (ReplicatedEngineParams, error)
type TableDDL ¶
type TableDDL struct {
// contains filtered or unexported fields
}
func (TableDDL) ToChangeItem ¶
func (t TableDDL) ToChangeItem() abstract.ChangeItem
Click to show internal directories.
Click to hide internal directories.