mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-05 14:33:08 +00:00
cql3: statement_restrictions: use functional style
Instead of a constructor, use a new function analyze_statement_restrictions() as the entry point. It returns an immutable statement_restrictions object. This opens the door to returning a variant, with each arm of the variant corresponding to a different query plan.
This commit is contained in:
@@ -30,7 +30,7 @@ query::clustering_row_ranges slice(
|
||||
const std::vector<expr::expression>& where_clause, cql_test_env& env,
|
||||
const sstring& table_name = "t", const sstring& keyspace_name = "ks") {
|
||||
prepare_context ctx;
|
||||
return restrictions::statement_restrictions(
|
||||
return restrictions::analyze_statement_restrictions(
|
||||
env.data_dictionary(),
|
||||
env.local_db().find_schema(keyspace_name, table_name),
|
||||
statements::statement_type::SELECT,
|
||||
|
||||
Reference in New Issue
Block a user