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 Kernel#SQLFunc.
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
Constructor Details
#initialize(val = "", placeheld = []) ⇒ Function
120 121 122 123 |
# File 'lib/sql/statement.rb', line 120 def initialize(val="",placeheld=[]) super @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.
127 128 129 |
# File 'lib/sql/statement.rb', line 127 def placeheld @placeheld end |
Instance Method Details
#to_sqlpart ⇒ Object
129 130 131 |
# File 'lib/sql/statement.rb', line 129 def to_sqlpart self end |