class AlgebraDB::Build::Join
Syntax for a join.
Constants
- JOIN_EXPRS
- TYPES
Public Class Methods
new(type, table, condition)
click to toggle source
Calls superclass method
# File lib/algebra_db/build/join.rb, line 17 def initialize(type, table, condition) super(type, table, condition) raise ArgumentError, "unrecognized join type #{type}" unless TYPES.include?(type) end
Public Instance Methods
join_expr()
click to toggle source
# File lib/algebra_db/build/join.rb, line 30 def join_expr JOIN_EXPRS[type] end
render_syntax(builder)
click to toggle source
# File lib/algebra_db/build/join.rb, line 23 def render_syntax(builder) builder.text(join_expr) table.render_syntax(builder) builder.text('ON') condition.render_syntax(builder) end