class Jennifer::QueryBuilder::Criteria
Overview
Basic class describing filterable/selectable database atom. By default it is table column.
Direct Known Subclasses
- Jennifer::QueryBuilder::Function
- Jennifer::QueryBuilder::JSONSelector
- Jennifer::QueryBuilder::RawSql
- Jennifer::QueryBuilder::Star
Defined in:
jennifer/adapter/postgres/criteria.crjennifer/query_builder.cr
jennifer/query_builder/criteria.cr
Constructors
Instance Method Summary
- #!=(value : Symbol)
- #!=(value : Rightable)
- #&(other : LogicOperator::Operandable)
- #*(value : Rightable)
- #+(value : Rightable)
- #-(value : Rightable)
- #/(value : Rightable)
- #<(value : Rightable)
- #<=(value : Rightable)
- #==(value : Symbol)
- #==(value : Rightable)
- #=~(value : String)
- #>(value : Rightable)
- #>=(value : Rightable)
- #[](key)
-
#alias(name : String?)
Specifies identifier alias
- #alias : String?
- #alias_tables(aliases : Hash(String, String))
-
#as_sql(generator) : String
Converts node to SQL using sql_generator SQLGenerator.
- #asc
- #between(left : Rightable, right : Rightable)
- #change_table(old_name : String, new_name : String)
-
#clone
Returns a copy of
self
with all instance variables cloned. -
#contain(value : Rightable)
Presents :contain operator.
-
#contained(value : Rightable)
Presents :contained operator.
- #definition(sql_generator)
- #definition
- #desc
- #eql?(other : Criteria)
- #equal(value : Rightable)
- #field : String
-
#filterable?
Returns whether node has an argument to be added to SQL statement arguments.
-
#hash(hasher)
See
Object#hash(hasher)
- #identifier(sql_generator)
- #identifier : String
- #ilike(value : Rightable)
- #in(arr : Array)
- #in(arr : SQLNode)
- #is(value : Symbol | Bool | Nil)
- #like(value : Rightable)
- #not(value : Symbol | Bool | Nil)
- #not
- #not_equal(value)
- #not_like(value : Rightable)
- #not_regexp(value : Rightable)
- #order(direction : String | Symbol)
-
#overlap(value : Rightable)
Presents :overlap operator.
- #path(elements : String)
- #regexp(value : Rightable)
- #relation : String?
- #set_relation(table : String, name : String)
-
#sql_args : Array(DBAny)
Returns array of SQL query arguments.
- #table : String
- #take(key : String | Number)
-
#to_s(io : IO)
Appends a short String representation of this object which includes its class name and its object address.
- #xor(other : LogicOperator::Operandable)
- #|(other : LogicOperator::Operandable)
Instance methods inherited from class Jennifer::QueryBuilder::SQLNode
alias_tables(aliases)
alias_tables,
as_sql
as_sql,
change_table(old_name, new_name)
change_table,
eql?(other)
eql?,
set_relation(table, name)
set_relation,
to_condition
to_condition
Instance methods inherited from module Jennifer::QueryBuilder::Statement
as_sql(sql_generator)
as_sql,
filterable?
filterable?,
sql_args : Array(DBAny)
sql_args
Constructor Detail
Instance Method Detail
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>