mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-30 19:46:48 +00:00
Currently, the WHERE clause grammar is constrained to a conjunction of relations: `WHERE a = ? AND b = ? AND c > ?`. The restriction happens in three places: 1. the grammar will refuse to parse anything else 2. our filtering code isn't prepared for generic expressions 3. the interface between the grammar and the rest of the cql3 layer is via a vector of terms rather than an expression While most of the work will be in extending the filtering code, this series tackles the interface; it changes the `whereClause` production to return an expression rather than a vector. Since much of cql3 layer is interested in terms, a new boolean_factors() function is introduced to convert an expression to its boolean terms. Closes #11105 * github.com:scylladb/scylla: cql3: grammar: make where clause return an expression cql3: util: deinline where clause utilities cql3: util: change where clause utilities to accept a single expression rather than a vector of terms cql3: statement_restrictions: accept a single expression rather than a vector cql3: statement_restrictions: merge `if` and `for` cql3: select_statement: remove wrong but harmless std::move() in prepare_restrictions cql3: expr: add boolean_factors() function to factorize an expression cql3: expression: define operator==() for expressions cql3: values: add operator==() for raw_value