abstract class Jennifer::Adapter::BaseSQLGenerator

Extended Modules

Direct Known Subclasses

Defined in:

jennifer/adapter/base_sql_generator.cr

Class Method Summary

Class Method Detail

def self.body_section(io : String::Builder, query) #

[View source]
def self.bulk_insert(table : String, field_names : Array(String), rows : Int32) #

[View source]
def self.bulk_insert(table : String, field_names : Array(String), rows : Array) #

[View source]
def self.cast_expression(expression, type : String) #

Returns CAST expression.


[View source]
def self.count(query) #

[View source]
def self.delete(query) #

[View source]
def self.exists(query) #

[View source]
def self.explain(query) #

[View source]
def self.from_clause(io : String::Builder, from : String) #

FROM clause for quoted table from


[View source]
def self.from_clause(io : String::Builder, query) #

Generates FROM query clause.


[View source]
def self.group_clause(io : String::Builder, query) #

Generates GROUP BY query clause.


[View source]
def self.having_clause(io : String::Builder, query) #

Generates HAVING query clause.


[View source]
def self.insert(table, hash) #

Generates insert query


[View source]
def self.join_clause(io : String::Builder, query) #

Generates JOIN query clause.


[View source]
def self.limit_clause(io : String::Builder, query) #

Generates LIMIT clause.


[View source]
def self.lock_clause(io : String::Builder, query) #

[View source]
def self.modify(q, modifications : Hash) #

[View source]
def self.operator_to_sql(operator : Symbol) #

Converts operator to SQL.


[View source]
def self.order_clause(io : String::Builder, query) #

Generates ORDER BY clause.


[View source]
def self.order_expression(expression : QueryBuilder::OrderExpression) #

[View source]
def self.parse_query(query : String, args : Array(DBAny)) #

[View source]
def self.select(query, exact_fields : Array = [] of String) #

Generates common select SQL request


[View source]
def self.select_clause(io : String::Builder, query, exact_fields : Array = [] of String) #

Generates SELECT query clause.


[View source]
def self.truncate(table : String) #

[View source]
def self.union_clause(io : String::Builder, query) #

[View source]
def self.update(query, options : Hash) #

[View source]
def self.update(obj : Model::Base) #

[View source]
def self.where_clause(io : String::Builder, query : QueryBuilder::Query | QueryBuilder::ModelQuery) #

Generates WHERE query clause.


[View source]
def self.where_clause(io : String::Builder, tree) #

Generates WHERE query clause.


[View source]
def self.with_clause(io : String::Builder, query) #

Generates WITH clause.


[View source]