Method: Volt::DataStore::SqlAdaptorClient.normalize_query
- Defined in:
- app/sql/lib/sql_adaptor_client.rb
.normalize_query(query) ⇒ Object
In the volt query dsl (and sql), there’s a lot of ways to express the same query. Its better for performance however if queries can be uniquely identified. To make that happen, we normalize queries.
45 46 47 48 49 50 51 52 |
# File 'app/sql/lib/sql_adaptor_client.rb', line 45 def self.normalize_query(query) # query = convert_wheres_to_block(query) query = merge_wheres_and_move_to_front(query) query = reject_offset_zero(query) query end |