Class: Rooq::FunctionCall

Inherits:
Expression show all
Extended by:
T::Sig
Defined in:
lib/rooq/expression.rb

Overview

Function call expression

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Expression

#%, #*, #+, #-, #/, #as, #asc, #between, #desc, #eq, #gt, #gte, #in, #is_not_null, #is_null, #like, #lt, #lte, #ne, #to_sql

Constructor Details

#initialize(name, *arguments, distinct: false) ⇒ void

Parameters:

  • name (Symbol)
  • arguments (T.untyped)
  • distinct (Boolean) (defaults to: false)


180
181
182
183
184
185
# File 'lib/rooq/expression.rb', line 180

def initialize(name, *arguments, distinct: false)
  @name = name
  @arguments = T.let(arguments.flatten.freeze, T::Array[T.untyped])
  @distinct = distinct
  freeze
end

Instance Attribute Details

#argumentsArray<T.untyped> (readonly)

Returns:

  • (Array<T.untyped>)


174
175
176
# File 'lib/rooq/expression.rb', line 174

def arguments
  @arguments
end

#distinctBoolean (readonly)

Returns:

  • (Boolean)


177
178
179
# File 'lib/rooq/expression.rb', line 177

def distinct
  @distinct
end

#nameSymbol (readonly)

Returns:

  • (Symbol)


171
172
173
# File 'lib/rooq/expression.rb', line 171

def name
  @name
end