class Marten::DB::Query::SQL::Join

Overview

Represents an SQL join used in the context of a specific query.

SQL joins are managed as a tree, which means that each join can be associated with a list of underlying children joins (for the joins following the considered relationship). SQL joins are "flattened" when the raw SQL queries are generated.

Defined in:

marten/db/query/sql/join.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(id : Int32, type : JoinType, from_model : Model.class, from_common_field : Field::Base, to_model : Model.class, to_common_field : Field::Base, selected : Bool) #

[View source]

Instance Method Detail

def add_child(child : self) : Nil #

[View source]
def children : Array(Marten::DB::Query::SQL::Join) #

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

[View source]
def columns : Array(String) #

[View source]
def from_common_field : Marten::DB::Field::Base #

[View source]
def from_model : Marten::DB::Model.class #

[View source]
def id : Int32 #

[View source]

[View source]
def selected? : Bool #

[View source]
def table_alias : String #

[View source]
def to_a : Array(self) #

[View source]
def to_common_field : Marten::DB::Field::Base #

[View source]
def to_model : Marten::DB::Model.class #

[View source]
def to_sql : String #

[View source]

[View source]