Class: Veritas::SQL::Generator::Relation::Binary
- Inherits:
-
Veritas::SQL::Generator::Relation
- Object
- Visitor
- Veritas::SQL::Generator::Relation
- Veritas::SQL::Generator::Relation::Binary
- Defined in:
- lib/veritas/sql/generator/relation/binary.rb
Overview
Generates an SQL statement for a Binary relation
Direct Known Subclasses
Defined Under Namespace
Classes: Base
Constant Summary collapse
- JOIN =
'NATURAL JOIN'.freeze
- PRODUCT =
'CROSS JOIN'.freeze
- LEFT_NAME =
'left'.freeze
- RIGHT_NAME =
'right'.freeze
Constants inherited from Veritas::SQL::Generator::Relation
EMPTY_HASH, EMPTY_STRING, SEPARATOR, STAR
Constants included from Identifier
Identifier::ESCAPED_QUOTE, Identifier::QUOTE
Constants inherited from Visitor
Visitor::DOUBLE_COLON, Visitor::NAME_REP, Visitor::NAME_SEP_REGEXP, Visitor::UNDERSCORE
Instance Attribute Summary
Attributes inherited from Veritas::SQL::Generator::Relation
Instance Method Summary collapse
-
#visit_veritas_algebra_join(join) ⇒ self
private
Visit an Join.
-
#visit_veritas_algebra_product(product) ⇒ self
private
Visit an Product.
Methods inherited from Veritas::SQL::Generator::Relation
#initialize, #to_s, #to_sql, #to_subquery, visit, #visit, #visited?
Methods included from Identifier
Methods included from Attribute
Methods inherited from Visitor
handler_for, #visit, #visited?
Constructor Details
This class inherits a constructor from Veritas::SQL::Generator::Relation
Instance Method Details
#visit_veritas_algebra_join(join) ⇒ self
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Visit an Join
23 24 25 26 27 28 29 30 |
# File 'lib/veritas/sql/generator/relation/binary.rb', line 23 def visit_veritas_algebra_join(join) @header = join.header set_operation(JOIN) set_columns(join) set_operands(join) set_name self end |
#visit_veritas_algebra_product(product) ⇒ self
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Visit an Product
39 40 41 42 43 44 45 46 |
# File 'lib/veritas/sql/generator/relation/binary.rb', line 39 def visit_veritas_algebra_product(product) @header = product.header set_operation(PRODUCT) set_columns(product) set_operands(product) set_name self end |