class Jennifer::QueryBuilder::Query(T)

Overview

generating hash with options

Included Modules

Defined in:

jennifer/query_builder/query.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(table : String) #

[View source]
def self.new #

[View source]

Instance Method Detail

def body_section #

[View source]
def c(name : String, table_name : String) #

[View source]
def c(name : String) #

[View source]
def count : Int32 #

[View source]
def delete #

[View source]
def destroy #

[View source]
def distinct(column, _table) #

[View source]
def distinct(column : String) #

[View source]
def each(&) #
Description copied from module Enumerable(T)

Must yield this collection's elements to the block.


[View source]
def each_result_set(&) #

[View source]
def empty? #
Description copied from module Enumerable(T)

Returns true if self is empty, false otherwise.

([] of Int32).empty? # => true
([1]).empty?         # => false

[View source]
def exists? #

[View source]
def first #
Description copied from module Enumerable(T)

Returns the first element in the collection. Raises Enumerable::EmptyError if the collection is empty.

([1, 2, 3]).first   # => 1
([] of Int32).first # raises Enumerable::EmptyError

[View source]
def first! #

[View source]
def from_clause #

[View source]
def group(column : String) #

[View source]
def group(*columns) #

[View source]
def group(**columns) #

[View source]
def group_clause #

[View source]
def having(&) #

[View source]
def having_clause #

[View source]
def id #

def includes(name : String | Symbol) #

[View source]
def includes(*names) #

[View source]
def join(klass : Class, type = :inner, &) #

[View source]
def join(_table : String, type = :inner, &) #

[View source]
def join_clause #

[View source]
def left_join(klass : Class, &) #

[View source]
def left_join(_table : String, &) #

[View source]
def limit(count : Int32 | Nil) #

[View source]
def limit_clause #

[View source]
def offset(count : Int32 | Nil) #

[View source]
def order(opts : Hash(String | Symbol, String | Symbol)) #

[View source]
def order(**opts) #

[View source]
def order_clause #

[View source]
def pluck(*fields) #

don't properly works if using "with"


[View source]
def relation(name, type = :inner) #

[View source]
def right_join(klass : Class, &) #

[View source]
def select_args #

[View source]
def select_clause #

[View source]
def select_query #

[View source]
def set_tree(other : Criteria | LogicOperator | IQuery) #

[View source]
def set_tree(other : Nil) #

[View source]
def sql(query : String, args = [] of DB::Any) #

[View source]
def sql_args #

[View source]
def table #

[View source]
def to_a #
Description copied from module Enumerable(T)

Returns an Array with all the elements in the collection.

(1..5).to_a # => [1, 2, 3, 4, 5]

[View source]
def to_s #
Description copied from class Object

Returns a nicely readable and concise string representation of this object, typically intended for users.

This method should usually not be overridden. It delegates to #to_s(IO) which can be overridden for custom implementations.

Also see #inspect.


[View source]
def to_sql #

[View source]
def tree #

[View source]

[View source]
def update(options : Hash) #

[View source]
def update(**options) #

[View source]
def version #

def where(&) #

[View source]
def where_clause #

[View source]
def with(*arr) #

[View source]