Closed
Description
The existing SchemaBuilder/statement builders facilites allow for convenient creation of Scylla statements. Unfortunately, many of Scylla-specific extensions are missing from those builders.
For example, it's currently not possible to use SchemaBuilder
to create a CREATE TABLE
statement with per_partition_rate_limit
. Trying it:
Statement stmt = SchemaBuilder.createTable("ks.my_table").addPartitionKey("pk", DataType.cint()).withOptions().freeformOption("per_partition_rate_limit",
"{'max_reads_per_second': 123, 'max_writes_per_second': 456}");
results in creating such a query:
CREATE TABLE [...] WITH per_partition_rate_limit = '{'max_reads_per_second': 123, 'max_writes_per_second': 456}'
And per_partition_rate_limit
value dictionary is unnecessarily escaped with ' '.
We should add convenience methods for all Scylla-specific CQL extensions.
Refs #155