Documentation ¶
Index ¶
- func GetEngineParams(engineFull string) []string
- func GetOrderBy(engineFull string) []string
- func ResourceTable() *schema.Resource
- func ValidateOnClusterEngine(inValue any, p hashicorpcty.Path) diag.Diagnostics
- type CHColumn
- type CHIndex
- type CHTable
- type CHTableService
- func (ts *CHTableService) CreateTable(ctx context.Context, tableResource TableResource) error
- func (ts *CHTableService) DeleteTable(ctx context.Context, tableResource TableResource) error
- func (ts *CHTableService) GetDBTables(ctx context.Context, database string) ([]CHTable, error)
- func (ts *CHTableService) GetTable(ctx context.Context, database string, table string) (*CHTable, error)
- func (ts *CHTableService) UpdateColumns(ctx context.Context, addColumns []interface{}, dropColumns []interface{}) error
- func (ts *CHTableService) UpdateTable(ctx context.Context, table TableResource, resourceData *schema.ResourceData) error
- type ColumnDefinition
- type IndexDefinition
- type PartitionByResource
- type TableResource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEngineParams ¶ added in v1.0.8
func GetOrderBy ¶ added in v1.0.8
func ResourceTable ¶
func ValidateOnClusterEngine ¶
func ValidateOnClusterEngine(inValue any, p hashicorpcty.Path) diag.Diagnostics
Types ¶
type CHTable ¶
type CHTable struct { Database string `ch:"database"` Name string `ch:"name"` EngineFull string `ch:"engine_full"` Engine string `ch:"engine"` Comment string `ch:"comment"` Columns []CHColumn `ch:"columns"` Indexes []CHIndex `ch:"indexes"` }
-- begin DB read() types --
func (*CHTable) ColumnsToResource ¶
func (t *CHTable) ColumnsToResource() []ColumnDefinition
func (*CHTable) IndexesToResource ¶ added in v1.0.8
func (t *CHTable) IndexesToResource() []IndexDefinition
func (*CHTable) ToResource ¶
func (t *CHTable) ToResource() (*TableResource, error)
type CHTableService ¶
func (*CHTableService) CreateTable ¶
func (ts *CHTableService) CreateTable(ctx context.Context, tableResource TableResource) error
func (*CHTableService) DeleteTable ¶
func (ts *CHTableService) DeleteTable(ctx context.Context, tableResource TableResource) error
func (*CHTableService) GetDBTables ¶
func (*CHTableService) UpdateColumns ¶ added in v1.0.28
func (ts *CHTableService) UpdateColumns(ctx context.Context, addColumns []interface{}, dropColumns []interface{}) error
func (*CHTableService) UpdateTable ¶ added in v1.0.28
func (ts *CHTableService) UpdateTable(ctx context.Context, table TableResource, resourceData *schema.ResourceData) error
type ColumnDefinition ¶ added in v1.0.6
type IndexDefinition ¶ added in v1.0.8
type PartitionByResource ¶
type TableResource ¶
type TableResource struct { Database string Name string EngineFull string Engine string Cluster string Comment string EngineParams []string OrderBy []string Columns []ColumnDefinition PartitionBy []PartitionByResource Indexes []IndexDefinition Settings map[string]string }
-- built from DB read, and from tf definition code --
func (*TableResource) GetColumnsResourceList ¶
func (t *TableResource) GetColumnsResourceList() []ColumnDefinition
func (*TableResource) HasColumn ¶
func (t *TableResource) HasColumn(columnName string) bool
func (*TableResource) SetPartitionBy ¶
func (t *TableResource) SetPartitionBy(partitionBy []interface{})
func (*TableResource) Validate ¶
func (t *TableResource) Validate(diags diag.Diagnostics)
Click to show internal directories.
Click to hide internal directories.