class Avram::QueryBuilder

Defined in:

avram/query_builder.cr

Constructors

Instance Method Summary

Instance methods inherited from class Object

blank_for_validates_required? : Bool blank_for_validates_required?

Constructor Detail

def self.new(table : Symbol) #

[View source]

Instance Method Detail

def args #

[View source]
def args_for_update(params) #

[View source]
def clone(query_to_merge : Avram::QueryBuilder) #

Similar to #merge, but includes ALL query parts


[View source]
def delete #

[View source]
def distinct #

[View source]
def distinct? #

[View source]
def distinct_on(column : ColumnName) #

[View source]
def distinct_on : ColumnName | Nil #

[View source]
def group_by(column : ColumnName) #

[View source]
def group_sql #

[View source]
def grouped? #

[View source]
def groups : Array(String | Symbol) #

[View source]
def has_distinct_on? #

[View source]
def join(join_clause : Avram::Join::SqlClause) #

[View source]
def joins #

[View source]
def limit(limit : Int32 | Nil) #

[View source]
def limit : Int32? #

[View source]
def merge(query_to_merge : Avram::QueryBuilder) #

Merges the wheres, raw wheres, joins, and orders from the passed in query


[View source]
def offset(offset : Int32 | Nil) #

[View source]
def offset : Int32? #

[View source]
def order_by(order : OrderBy) #

[View source]
def order_sql #

[View source]
def ordered? #

[View source]
def orders #

[View source]
def raw_where(where_clause : Avram::Where::Raw) #

[View source]
def raw_wheres #

[View source]
def reset_order #

[View source]
def reset_where(column : ColumnName) #

[View source]
def reverse_order #

[View source]
def select(selection : Array(ColumnName)) #

[View source]
def select_average(column : ColumnName) #

[View source]
def select_count #

[View source]
def select_max(column : ColumnName) #

[View source]
def select_min(column : ColumnName) #

[View source]
def select_sum(column : ColumnName) #

[View source]
def selects #

[View source]
def statement #

[View source]
def statement_for_update(params, return_columns returning? : Bool = true) #

[View source]
def table : Symbol #

[View source]
def to_prepared_sql : String #

Prepares the SQL statement by combining the #args and #statement in to a single String


[View source]
def to_sql #

[View source]
def where(where_clause : Avram::Where::SqlClause) #

[View source]
def wheres #

[View source]