module Filterable
Overview
Handles WHERE and HAVING clauses.
Defined in:
query/filtrable.crInstance Method Summary
-
#having(&)
Adds a HAVING condition using a block.
-
#where(hash : Hash(String | Symbol, DB::Any))
Adds a WHERE condition using a Hash.
-
#where(&)
Adds a WHERE condition using a block.
-
#where(**fields)
Adds a WHERE condition using keyword arguments.
Instance Method Detail
def having(&)
#
Adds a HAVING condition using a block.
Example Adding a HAVING condition using a block
query.having { name == "John" && age > 30 }
=> #<CQL::Query:0x00007f8000000000>
def where(hash : Hash(String | Symbol, DB::Any))
#
Adds a WHERE condition using a Hash.
Example Adding a WHERE condition using a Hash
query.where(name: "John", age: 30)
=> #<CQL::Query:0x00007f8000000000>
def where(&)
#
Adds a WHERE condition using a block.
Example Adding a WHERE condition using a block
query.where { name == "John" && age > 30 }
=> #<CQL::Query:0x00007f8000000000>
def where(**fields)
#
Adds a WHERE condition using keyword arguments.
Example Adding a WHERE condition using keyword arguments
query.where(name: "John", age: 30)
=> #<CQL::Query:0x00007f8000000000>