class Marten::DB::Query::SQL::Query(Model)

Direct Known Subclasses

Defined in:

marten/db/query/sql/query.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(default_ordering : Bool, distinct : Bool, distinct_columns : Array(String), joins : Array(Join), limit : Int64 | Nil, offset : Int64 | Nil, order_clauses : Array(Tuple(String, Bool)), parent_model_joins : Array(Join) | Nil, predicate_node : PredicateNode | Nil, using : String | Nil) #

[View source]
def self.new #

[View source]

Instance Method Detail

def add_query_node(query_node) #

[View source]
def add_selected_join(relation : String) : Nil #

[View source]
def average(raw_field : String) #

[View source]
def clone #

[View source]
def combine(other : Query(Model), connector : PredicateConnector) : Nil #

[View source]
def connection #

[View source]
def count(raw_field : String | Nil = nil) #

[View source]
def default_ordering #

[View source]
def default_ordering=(default_ordering : Bool) #

[View source]
def distinct #

[View source]
def distinct=(distinct : Bool) #

[View source]
def distinct_columns #

[View source]
def execute : Array(Model) #

[View source]
def exists? : Bool #

[View source]
def joins #

[View source]
def joins? #

[View source]
def limit #

[View source]
def maximum(raw_field : String) #

[View source]
def minimum(raw_field : String) #

[View source]
def offset #

[View source]
def order(fields : Array(String | Symbol)) : Nil #

[View source]
def order(*fields : String) : Nil #

[View source]
def order_clauses #

[View source]
def ordered? #

[View source]
def parent_model_joins #

[View source]
def pluck(fields : Array(String)) : Array(Array(Field::Any)) #

[View source]
def predicate_node #

[View source]
def quote(*args, **options) #

[View source]
def quote(*args, **options, &) #

[View source]
def raw_delete #

[View source]
def setup_distinct_clause(fields : Array(String) | Nil = nil) : Nil #

[View source]
def slice(from, size = nil) #

[View source]
def sliced? #

[View source]
def sum(raw_field : String) #

[View source]
def to_empty #

[View source]
def to_sql : String #

[View source]
def update_with(values : Hash(String | Symbol, Field::Any | DB::Model)) #

[View source]
def using #

[View source]
def using=(using : Nil | String) #

[View source]