class Marten::DB::Query::Node

Defined in:

marten/db/query/node.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(filters : Hash | NamedTuple, children : Array(Marten::DB::Query::Node) = [] of self, connector : Marten::DB::Query::SQL::PredicateConnector = SQL::PredicateConnector::AND, negated : Bool = false) #

[View source]
def self.new(raw_predicate : String, params : Array(::DB::Any) | Hash(String, ::DB::Any) = [] of ::DB::Any, children : Array(Marten::DB::Query::Node) = [] of self, connector : Marten::DB::Query::SQL::PredicateConnector = SQL::PredicateConnector::AND, negated : Bool = false) #

[View source]
def self.new(children : Array(self), connector : SQL::PredicateConnector, negated : Bool, expression : Filters | RawPredicate) #

[View source]
def self.new(children : Array(Marten::DB::Query::Node) = [] of self, connector : Marten::DB::Query::SQL::PredicateConnector = SQL::PredicateConnector::AND, negated : Bool = false, **kwargs) #

[View source]

Instance Method Detail

def &(other : Node) #

[View source]
def - : self #

[View source]
def ==(other : self) #
Description copied from class Reference

Returns true if this reference is the same as other. Invokes same?.


[View source]
def ^(other : Node) #

[View source]
def |(other : Node) #

[View source]
def children : Array(Marten::DB::Query::Node) #

[View source]

[View source]
def expression : Hash(String, Array(Bool | File | Float32 | Float64 | Int32 | Int64 | JSON::Any | JSON::Serializable | Marten::DB::Field::File::File | Marten::HTTP::UploadedFile | String | Symbol | Time | Time::Span | UUID | Nil) | Array(Marten::DB::Model) | Bool | File | Float32 | Float64 | Int32 | Int64 | JSON::Any | JSON::Serializable | Marten::DB::Field::File::File | Marten::DB::Model | Marten::HTTP::UploadedFile | String | Symbol | Time | Time::Span | UUID | Nil) | {predicate: String, params: Array(Bool | Float32 | Float64 | Int32 | Int64 | Slice(UInt8) | String | Time | Nil) | Hash(String, Bool | Float32 | Float64 | Int32 | Int64 | Slice(UInt8) | String | Time | Nil)} #

[View source]
def filters : Filters #

[View source]
def filters? : Bool #

[View source]
def negated : Bool #

[View source]
def raw_predicate : RawPredicate #

[View source]
def raw_predicate? : Bool #

[View source]