Skip to main content

Module clusters

Module clusters 

Source
Expand description

Cluster definition loading and validation.

Loads cluster definitions from <root>/clusters/ directory. Each .sql file defines a single cluster with a required CREATE CLUSTER statement and optional GRANT and COMMENT statements.

Structs§

ClusterDefinition ðŸ”’
A parsed cluster definition from a .sql file in the clusters/ directory.

Functions§

apply_cluster_suffix ðŸ”’
Apply a suffix to all cluster name references within a ClusterDefinition.
classify_cluster_statements ðŸ”’
Classify parsed statements into a ClusterDefinition, returning validation errors.
extract_replication_factor ðŸ”’
Extract the desired REPLICATION FACTOR from a CreateClusterStatement’s options.
extract_size ðŸ”’
Extract the desired SIZE from a CreateClusterStatement’s options.
load_clusters ðŸ”’
Load all cluster definitions from <root>/clusters/.
suffixed_ident ðŸ”’
Append a suffix to an Ident, returning a new Ident.