Class: JDBCHelper::SQL::ScalarExpression

Inherits:
Expression
  • Object
show all
Defined in:
lib/jdbc-helper/sql/expression.rb

Overview

Since:

  • 0.7.0

Instance Method Summary collapse

Methods inherited from Expression

#==, #eql?, #hash

Constructor Details

#initialize(sql) ⇒ ScalarExpression

Returns a new instance of ScalarExpression.

Since:

  • 0.7.0



97
98
99
# File 'lib/jdbc-helper/sql/expression.rb', line 97

def initialize sql
  @sql = SQL.check sql.to_s
end

Instance Method Details

#to_bindObject

Since:

  • 0.7.0



105
106
107
# File 'lib/jdbc-helper/sql/expression.rb', line 105

def to_bind
  [@to_s, []]
end

#to_sObject

Since:

  • 0.7.0



101
102
103
# File 'lib/jdbc-helper/sql/expression.rb', line 101

def to_s
  @sql
end