class Jennifer::QueryBuilder::Query(T)
Overview
generating hash with options
Included Modules
- Enumerable(T)
Defined in:
jennifer/query_builder/query.crConstructors
Instance Method Summary
- #body_section
- #c(name : String, table_name : String)
- #c(name : String)
- #count : Int32
- #delete
- #destroy
- #distinct(column, _table)
- #distinct(column : String)
-
#each(&)
Must yield this collection's elements to the block.
- #each_result_set(&)
-
#empty?
Returns
true
ifself
is empty,false
otherwise. - #exists?
-
#first
Returns the first element in the collection.
- #first!
- #from_clause
- #group(column : String)
- #group(*columns)
- #group(**columns)
- #group_clause
- #having(&)
- #having_clause
- #id
- #includes(name : String | Symbol)
- #includes(*names)
- #join(klass : Class, type = :inner, &)
- #join(_table : String, type = :inner, &)
- #join_clause
- #left_join(klass : Class, &)
- #left_join(_table : String, &)
- #limit(count : Int32 | Nil)
- #limit_clause
- #offset(count : Int32 | Nil)
- #order(opts : Hash(String | Symbol, String | Symbol))
- #order(**opts)
- #order_clause
-
#pluck(*fields)
don't properly works if using "with"
- #relation(name, type = :inner)
- #right_join(klass : Class, &)
- #select_args
- #select_clause
- #select_query
- #set_tree(other : Criteria | LogicOperator | IQuery)
- #set_tree(other : Nil)
- #sql(query : String, args = [] of DB::Any)
- #sql_args
- #table
-
#to_a
Returns an
Array
with all the elements in the collection. -
#to_s
Returns a nicely readable and concise string representation of this object, typically intended for users.
- #to_sql
- #tree
- #tree=(tree : Jennifer::QueryBuilder::Criteria | Jennifer::QueryBuilder::LogicOperator | Nil)
- #update(options : Hash)
- #update(**options)
- #version
- #where(&)
- #where_clause
- #with(*arr)
Constructor Detail
Instance Method Detail
Must yield this collection's elements to the block.
Returns true
if self
is empty, false
otherwise.
([] of Int32).empty? # => true
([1]).empty? # => false
Returns the first element in the collection. Raises Enumerable::EmptyError
if the collection is empty.
([1, 2, 3]).first # => 1
([] of Int32).first # raises Enumerable::EmptyError
Returns an Array
with all the elements in the collection.
(1..5).to_a # => [1, 2, 3, 4, 5]
Returns a nicely readable and concise string representation of this object, typically intended for users.
This method should usually not be overridden. It delegates to
#to_s(IO)
which can be overridden for custom implementations.
Also see #inspect
.