partition

package
v2.8.1 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

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

func ExtractPartitionByExpr(createQuery string) string

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.

Jump to

Keyboard shortcuts

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