class Avram::QueryBuilder
- Avram::QueryBuilder
- Reference
- Object
Defined in:
avram/query_builder.crConstructors
Instance Method Summary
- #args
- #args_for_update(params)
-
#clone(query_to_merge : Avram::QueryBuilder)
Similar to
#merge
, but includes ALL query parts - #delete
- #distinct
- #distinct?
- #distinct_on(column : ColumnName)
- #distinct_on : ColumnName | Nil
- #group_by(column : ColumnName)
- #group_sql
- #grouped?
- #groups : Array(String | Symbol)
- #has_distinct_on?
- #join(join_clause : Avram::Join::SqlClause)
- #joins
- #limit(limit : Int32 | Nil)
- #limit : Int32?
-
#merge(query_to_merge : Avram::QueryBuilder)
Merges the wheres, raw wheres, joins, and orders from the passed in query
- #offset(offset : Int32 | Nil)
- #offset : Int32?
- #order_by(order : OrderBy)
- #order_sql
- #ordered?
- #orders
- #raw_where(where_clause : Avram::Where::Raw)
- #raw_wheres
- #reset_order
- #reset_where(column : ColumnName)
- #reverse_order
- #select(selection : Array(ColumnName))
- #select_average(column : ColumnName)
- #select_count
- #select_max(column : ColumnName)
- #select_min(column : ColumnName)
- #select_sum(column : ColumnName)
- #selects
- #statement
- #statement_for_update(params, return_columns returning? : Bool = true)
- #table : Symbol
-
#to_prepared_sql : String
Prepares the SQL statement by combining the
#args
and#statement
in to a singleString
- #to_sql
- #where(where_clause : Avram::Where::SqlClause)
- #wheres
Instance methods inherited from class Object
blank_for_validates_required? : Bool
blank_for_validates_required?
Constructor Detail
Instance Method Detail
def merge(query_to_merge : Avram::QueryBuilder)
#
Merges the wheres, raw wheres, joins, and orders from the passed in query
Prepares the SQL statement by combining the #args
and #statement
in to a single String