class

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

Inherits Reference < Object

Constructors

new(annotations : Hash(String, SQL::Annotation::Base), default_ordering : Bool, distinct : Bool, distinct_columns : Array(String), group_by_pk : Bool, joins : Array(Join), having_predicate_node : PredicateNode | Nil, limit : Int64 | Nil, offset : Int64 | Nil, order_clauses : Array(Tuple(String, Bool)), parent_model_joins : Array(Join) | Nil, using : String | Nil, where_predicate_node : PredicateNode | Nil)
Source

Instance methods

add_annotation(ann : DB::Query::Annotation) : Nil
Source
add_query_node(query_node) : Nil
Source
add_selected_join(relation : String) : Nil
Source
annotations
Source
average(raw_field : String)
Source
clone
Source
combine(other : Query(Model), connector : PredicateConnector) : Nil
Source
connection
Source
count(raw_field : String | Nil = nil)
Source
default_ordering=(default_ordering : Bool)
Source
default_ordering?
Source
distinct
Source
distinct=(distinct : Bool)
Source
distinct?
Source
distinct_columns
Source
execute
Source
exists?
Source
group_by_pk?
Source
having_predicate_node
Source
joins
Source
joins?
Source
limit
Source
maximum(raw_field : String)
Source
minimum(raw_field : String)
Source
offset
Source
order(fields : Array(String | Symbol)) : Nil
Source
order(*fields : String) : Nil
Source
order_clauses
Source
ordered?
Source
parent_model_joins
Source
pluck(fields : Array(String)) : Array(Array(Field::Any))
Source
quote(*args, **options)
Source
quote(*args, **options, &)
Source
raw_delete
Source
setup_distinct_clause(fields : Array(String) | Nil = nil) : Nil
Source
slice(from, size = nil)
Source
sliced?
Source
sum(raw_field : String)
Source
to_empty
Source
to_sql
Source
update_with(raw_update : String, params : Array)
Source
update_with(raw_update : String, params : Hash | NamedTuple)
Source
update_with(values : Hash(String | Symbol, Field::Any | DB::Model))
Source
update_with(raw_update : String)
Source
update_with(raw_update : String, *args)
Source
update_with(raw_update : String, **kwargs)
Source
using
Source
using=(using : Nil | String)
Source
where_predicate_node
Source