Class: SmqlToAR::ConditionTypes::Functions::Limit

Inherits:
Function
  • Object
show all
Defined in:
lib/smql_to_ar/condition_types.rb

Constant Summary collapse

Name =
:limit
Expected =
[Fixnum]

Instance Attribute Summary

Attributes inherited from Function

#args, #func, #model

Instance Method Summary collapse

Methods inherited from Function

#initialize, inspect, try_parse

Methods included from Assertion

#raise_if, #raise_unless

Constructor Details

This class inherits a constructor from SmqlToAR::ConditionTypes::Functions::Function

Instance Method Details

#limit_build(builder, table) ⇒ Object Also known as: build



461
462
463
464
# File 'lib/smql_to_ar/condition_types.rb', line 461

def limit_build builder, table
	raise_unless 1 == table.length, RootOnlyFunctionError.new( table)
	builder.limit = Array.wrap(@args).first.to_i
end