Class: Sunspot::Query::FunctionalFunctionQuery

Inherits:
FunctionQuery show all
Defined in:
sunspot/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

- (FunctionalFunctionQuery) initialize(function_name, function_args)

A new instance of FunctionalFunctionQuery



42
43
44
# File 'sunspot/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

- (Object) to_s



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

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