Class: Babik::QuerySet::Update::Assignment::Function
- Inherits:
-
Object
- Object
- Babik::QuerySet::Update::Assignment::Function
- Defined in:
- lib/babik/queryset/lib/update/assignment.rb
Overview
Represents a function operator that can be used in an UPDATE For example:
UPDATE SET stars = ABS(stars)
Instance Method Summary collapse
-
#initialize(field, function_call) ⇒ Function
constructor
A new instance of Function.
-
#sql_value ⇒ String
Return the right part of the assignment of the UPDATE statement.
Constructor Details
#initialize(field, function_call) ⇒ Function
Returns a new instance of Function.
48 49 50 51 |
# File 'lib/babik/queryset/lib/update/assignment.rb', line 48 def initialize(field, function_call) @field = field @function_call = function_call end |
Instance Method Details
#sql_value ⇒ String
Return the right part of the assignment of the UPDATE statement.
55 56 57 |
# File 'lib/babik/queryset/lib/update/assignment.rb', line 55 def sql_value @function_call end |