Documentation
¶
Index ¶
- Variables
- func ConvertPartitionsToIdsMapAndNamesList(ctx context.Context, ch *clickhouse.ClickHouse, ...) (map[metadata.TableTitle]common.EmptyMap, map[metadata.TableTitle][]string, ...)
- func ExtractPartitionByExpr(createQuery string) string
- func GetPartitionIdAndName(ctx context.Context, ch *clickhouse.ClickHouse, ...) (string, string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var FieldsNamesRE = regexp.MustCompile("(?i)\\w+|`[^`]+`\\.`[^`]+`|\"[^\"]+\"")
View Source
var FunctionsRE = regexp.MustCompile(`(?i)\w+\(`)
View Source
var OrderByRE = regexp.MustCompile(`(?mi)\s*ORDER BY.*`)
View Source
var PartitionByRE = regexp.MustCompile(`(?mi)\s*PARTITION BY\s*(.+)`)
View Source
var SettingsRE = regexp.MustCompile(`(?mi)\s*SETTINGS.*`)
View Source
var SpecialCharsRE = regexp.MustCompile(`(?i)[)(*+\-/\\,]+`)
View Source
var StringsRE = regexp.MustCompile(`(?i)'[^']+'`)
Functions ¶
func ConvertPartitionsToIdsMapAndNamesList ¶
func ConvertPartitionsToIdsMapAndNamesList(ctx context.Context, ch *clickhouse.ClickHouse, tablesFromClickHouse []clickhouse.Table, tablesFromMetadata []*metadata.TableMetadata, partitions []string) (map[metadata.TableTitle]common.EmptyMap, map[metadata.TableTitle][]string, error)
ConvertPartitionsToIdsMapAndNamesList - get partitions from CLI/API params and convert it for NameList and IdMap for each table
func ExtractPartitionByExpr ¶ added in v2.8.1
ExtractPartitionByExpr returns PARTITION BY expression from CREATE TABLE query without trailing ORDER BY / SETTINGS, empty string if not found
func GetPartitionIdAndName ¶
func GetPartitionIdAndName(ctx context.Context, ch *clickhouse.ClickHouse, database, table, createQuery, partition string) (string, string, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.