Class: Ronin::SQL::BinaryExpr

Inherits:
Struct
  • Object
show all
Includes:
Emittable, Operators
Defined in:
lib/ronin/sql/binary_expr.rb

Overview

Represents a binary expression in SQL.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Emittable

#emitter, #inspect, #to_s

Methods included from Operators

#!, #!=, #%, #&, #*, #+, #+@, #-, #-@, #/, #<, #<<, #<=, #==, #>, #>=, #>>, #and, #as, #glob, #in, #is, #is_not, #like, #match, #not, #or, #regexp, #|, #~

Instance Attribute Details

#leftObject

Returns the value of attribute left

Returns:

  • (Object)

    the current value of left



33
34
35
# File 'lib/ronin/sql/binary_expr.rb', line 33

def left
  @left
end

#operatorObject

Returns the value of attribute operator

Returns:

  • (Object)

    the current value of operator



33
34
35
# File 'lib/ronin/sql/binary_expr.rb', line 33

def operator
  @operator
end

#rightObject

Returns the value of attribute right

Returns:

  • (Object)

    the current value of right



33
34
35
# File 'lib/ronin/sql/binary_expr.rb', line 33

def right
  @right
end

Instance Method Details

#to_sql(options = {}) ⇒ String

Converts the binary expression to SQL.

Parameters:

Returns:

  • (String)

    The emitted SQL expression.



47
48
49
# File 'lib/ronin/sql/binary_expr.rb', line 47

def to_sql(options={})
  emitter(options).emit_expression(self)
end