class Babik::QuerySet::Update::Assignment::Function
Represents a function operator that can be used in an UPDATE For example:
UPDATE SET stars = ABS(stars)
Public Class Methods
new(field, function_call)
click to toggle source
# File lib/babik/queryset/lib/update/assignment.rb, line 48 def initialize(field, function_call) @field = field @function_call = function_call end
Public Instance Methods
sql_value()
click to toggle source
Return the right part of the assignment of the UPDATE statement. @return [String] right part of the assignment with the format defined by the function_call attribute.
# File lib/babik/queryset/lib/update/assignment.rb, line 55 def sql_value @function_call end