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)
- #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?
- #reverse_relation : Marten::DB::ReverseRelation?
- #selected? : Bool
- #table_alias : 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")
#