struct Interro::JoinClause
- Interro::JoinClause
- Struct
- Value
- Object
Defined in:
join_clause.crConstructors
-
.new(other_table : String, as relation : Nil | String, on condition : String, join_type : String = "INNER")
Represent a SQL JOIN with the given arguments.
Instance Method Summary
- #condition : String
- #join_type : String
- #other_table : String
- #relation : String | Nil
-
#to_sql(io)
Output this JOIN clause to the given
IO
as SQL.
Constructor Detail
def self.new(other_table : String, as relation : Nil | String, on condition : String, join_type : String = "INNER")
#
Represent a SQL JOIN with the given arguments.
JoinClause.new("my_table", as: "m", on: "m.foo_id = foo.id")