Class: SmqlToAR::ConditionTypes::NotIn

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

Constant Summary collapse

Operator =
'!|='
Where =
"%s NOT IN (%s)"
Expected =
[Array]

Instance Attribute Summary

Attributes inherited from Condition

#cols, #value

Instance Method Summary collapse

Methods inherited from Condition

#condition_build, #initialize, inspect, #inspect, try_parse, #verify, #verify_allowed, #verify_column

Methods included from Assertion

#raise_if, #raise_unless

Constructor Details

This class inherits a constructor from SmqlToAR::ConditionTypes::Condition

Instance Method Details

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



252
253
254
255
256
257
258
259
# File 'lib/smql_to_ar/condition_types.rb', line 252

def not_in_build builder, table
	builder.wobs (v = builder.vid).to_sym => @value
	@cols.each do |col|
		col.joins builder, table
		builder.where self.class::Where % [ builder.column( table+col.path, col.col), v.to_s]
	end
	self
end