class Marten::DB::Query::SQL::Join
- Marten::DB::Query::SQL::Join
- Reference
- Object
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.crConstructors
Instance Method Summary
- #add_child(child : self) : Nil
- #children : Array(Marten::DB::Query::SQL::Join)
- #clone : self
- #column_name(name) : String
- #columns : Array(String)
- #from_common_field : Marten::DB::Field::Base
- #from_model : Marten::DB::Model.class
- #id : Int32
- #parent : Marten::DB::Query::SQL::Join?
- #replace_table_alias_prefix(new_table_alias_prefix : String) : Hash(String, String)
- #reverse_relation : Marten::DB::ReverseRelation?
- #selected? : Bool
- #table_alias : String
- #table_alias_prefix : String
- #to_a : Array(self)
- #to_common_field : Marten::DB::Field::Base
- #to_model : Marten::DB::Model.class
- #to_sql : String
- #type : Marten::DB::Query::SQL::JoinType
Constructor Detail
def self.new(id : Int32, type : JoinType, from_model : Model.class, from_common_field : Field::Base, reverse_relation : ReverseRelation | Nil, to_model : Model.class, to_common_field : Field::Base, selected : Bool, table_alias_prefix : String = "t", children : Array(Marten::DB::Query::SQL::Join) = [] of self)
#
Instance Method Detail
def replace_table_alias_prefix(new_table_alias_prefix : String) : Hash(String, String)
#