abstract class QueryBuilder::Projection(T)

Direct Known Subclasses

Defined in:

projection/projection.cr

Class Method Summary

Instance Method Summary

Class Method Detail

def self.avg(column : String) : AggregateProjection(T) #

[View source]
def self.avg(projection : Projection) : AggregateProjection(T) #

[View source]
def self.column(table : String, column : String) : ColumnProjection(T) #

[View source]
def self.column(col : String) : ColumnProjection(T) #

simple columns


[View source]
def self.constant(constant : T) : ConstantProjection(T) #

constant


[View source]
def self.count(column : String) : AggregateProjection(T) #

[View source]
def self.count(projection : Projection) : AggregateProjection(T) #

[View source]
def self.count : AggregateProjection(T) #

[View source]
def self.max(column : String) : AggregateProjection(T) #

[View source]
def self.max(projection : Projection) : AggregateProjection(T) #

[View source]
def self.min(column : String) : AggregateProjection(T) #

aggregate functions


[View source]
def self.min(projection : Projection) : AggregateProjection(T) #

[View source]
def self.subquery(subquery : SqlBuilder, _as : String) : AliasedProjection(T) #

[View source]
def self.subquery(subquery : SqlBuilder) : SubqueryProjection(T) #

subquery


[View source]
def self.sum(column : String) : AggregateProjection(T) #

[View source]
def self.sum(projection : Projection) : AggregateProjection(T) #

[View source]

Instance Method Detail

def alias(name : String) : Projection(T) #

Alias and casts


[View source]
abstract def build : String #

[View source]
def cast_date : Projection(T) #

[View source]
def cast_datetime : Projection(T) #

[View source]
def cast_int : Projection(T) #

[View source]
def cast_real : Projection(T) #

[View source]
def cast_string : Projection(T) #

[View source]
abstract def params : Array(T) #

[View source]