class Jennifer::Postgres::SQLGenerator
Extended Modules
Defined in:
jennifer/adapter/postgres/sql_generator.crClass Method Summary
- .escape(value : Nil)
- .escape(value : Bool)
- .escape(value : Int32 | Int16 | Float64 | Float32)
- .insert(obj : Model::Base, with_primary_field = true)
- .insert_on_duplicate(table, fields, rows : Int32, unique_fields, on_conflict)
- .json_path(path : QueryBuilder::JSONSelector)
- .operator_to_sql(operator : Symbol)
- .order_expression(expression : QueryBuilder::OrderExpression)
- .parse_query(query, args : Array(DBAny))
-
.update(query, options : Hash)
Generates update request depending on given query and hash options.
- .values_expression(field : Symbol)
Class methods inherited from class Jennifer::Adapter::BaseSQLGenerator
body_section(io : String::Builder, query)
body_section,
bulk_insert(table : String, field_names : Array(String), rows : Int32)bulk_insert(table : String, field_names : Array(String), rows : Array) bulk_insert, cast_expression(expression, type : String) cast_expression, count(query) count, delete(query) delete, exists(query) exists, explain(query) explain, from_clause(io : String::Builder, from : String)
from_clause(io : String::Builder, query) from_clause, group_clause(io : String::Builder, query) group_clause, having_clause(io : String::Builder, query) having_clause, insert(table, hash) insert, join_clause(io : String::Builder, query) join_clause, limit_clause(io : String::Builder, query) limit_clause, lock_clause(io : String::Builder, query) lock_clause, modify(q, modifications : Hash) modify, operator_to_sql(operator : Symbol) operator_to_sql, order_clause(io : String::Builder, query) order_clause, order_expression(expression : QueryBuilder::OrderExpression) order_expression, parse_query(query : String, args : Array(DBAny)) parse_query, select(query, exact_fields : Array = [] of String) select, select_clause(io : String::Builder, query, exact_fields : Array = [] of String) select_clause, truncate(table : String) truncate, union_clause(io : String::Builder, query) union_clause, update(query, options : Hash)
update(obj : Model::Base) update, where_clause(io : String::Builder, query : QueryBuilder::Query | QueryBuilder::ModelQuery)
where_clause(io : String::Builder, tree) where_clause, with_clause(io : String::Builder, query) with_clause
Class Method Detail
def self.insert_on_duplicate(table, fields, rows : Int32, unique_fields, on_conflict)
#
def self.update(query, options : Hash)
#
Generates update request depending on given query and hash options.
Allows joins inside of query.