class Jennifer::QueryBuilder::Condition
- Jennifer::QueryBuilder::Condition
- Reference
- Object
Overview
Container for any kind of expression/condition.
Included Modules
Defined in:
jennifer/query_builder/condition.crConstant Summary
-
IN_OPERATOR_PATTERN =
"%s IN(%s)"
Constructors
Instance Method Summary
-
#==(other)
Returns
false
(other can only be aValue
here). - #alias_tables(aliases)
-
#as_sql(generator)
Converts node to SQL using sql_generator SQLGenerator.
- #as_sql
- #change_table(old_name, new_name)
-
#clone
Returns a copy of
self
with all instance variables cloned. - #eql?(other : Condition)
- #eql?(other)
-
#filterable?
Returns whether node has an argument to be added to SQL statement arguments.
-
#lhs : SQLNode
Left hand side of condition.
-
#not
Makes condition negative.
-
#operator : Symbol
Condition operator.
-
#rhs : Criteria::Rightable?
Right hand side of condition.
- #set_relation(table, name)
-
#sql_args : Array(DBAny)
Returns array of SQL query arguments.
-
#to_s(io : IO)
Appends a short String representation of this object which includes its class name and its object address.
Instance methods inherited from module Jennifer::QueryBuilder::Statement
as_sql(sql_generator)
as_sql,
filterable?
filterable?,
sql_args : Array(DBAny)
sql_args
Instance methods inherited from module Jennifer::QueryBuilder::LogicOperator::Operators
&(other : Criteria)&(other : Operandable) &, xor(other : Criteria)
xor(other : Operandable) xor, |(other : Criteria)
|(other : Operandable) |
Constructor Detail
Instance Method Detail
Returns false
(other can only be a Value
here).
Converts node to SQL using sql_generator SQLGenerator.
Returns whether node has an argument to be added to SQL statement arguments.
Returns array of SQL query arguments.
Appends a short String representation of this object which includes its class name and its object address.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).to_s # => #<Person:0x10a199f20>