Class: Sunspot::Query::FunctionalFunctionQuery

Inherits:
FunctionQuery show all
Defined in:
lib/sunspot/query/function_query.rb

Overview

Function query which represents an actual function invocation. Takes a function name and arguments as parameters. Arguments are in turn FunctionQuery objects.

Instance Method Summary collapse

Constructor Details

#initialize(function_name, function_args) ⇒ FunctionalFunctionQuery

Returns a new instance of FunctionalFunctionQuery.


42
43
44
# File 'lib/sunspot/query/function_query.rb', line 42

def initialize(function_name, function_args)
  @function_name, @function_args = function_name, function_args
end

Instance Method Details

#to_sObject


46
47
48
49
# File 'lib/sunspot/query/function_query.rb', line 46

def to_s
  params = @function_args.map { |arg| arg.to_s }.join(",")
  "#{@function_name}(#{params})"
end