Class: SQLStatement::Function
Overview
This class is used to represent complex SQL expressions, so that queries can return expressions. This is also meant to be used for conditions in a WHERE clause. There are no utility classes for generating these (even though they’ll probably include field names and other kinds of values), but for convenience, they can be generated with SQLHelpers#string_func
.
Instance Attribute Summary collapse
-
#placeheld ⇒ Object
you need to manually keep this list of values for placeholders in sync with the actual string contained in this expression.
Instance Method Summary collapse
-
#initialize(val = "", placeheld = []) ⇒ Function
constructor
A new instance of Function.
- #to_sqlpart ⇒ Object
Methods inherited from String
Constructor Details
#initialize(val = "", placeheld = []) ⇒ Function
Returns a new instance of Function.
74 75 76 77 |
# File 'lib/sql/statement.rb', line 74 def initialize(val="",placeheld=[]) super val @placeheld=placeheld end |
Instance Attribute Details
#placeheld ⇒ Object
you need to manually keep this list of values for placeholders in sync with the actual string contained in this expression.
81 82 83 |
# File 'lib/sql/statement.rb', line 81 def placeheld @placeheld end |
Instance Method Details
#to_sqlpart ⇒ Object
83 84 85 |
# File 'lib/sql/statement.rb', line 83 def to_sqlpart self end |