Module: ActiveRecord::ConnectionAdapters::SQLServer::CoreExt::Calculations
- Defined in:
- lib/active_record/connection_adapters/sqlserver/core_ext/calculations.rb
Instance Method Summary collapse
-
#bound_attributes ⇒ Object
If we are ordering a subquery for a count, we have to artificially add the offset bind parameter.
Instance Method Details
#bound_attributes ⇒ Object
If we are ordering a subquery for a count, we have to artificially add the offset bind parameter
12 13 14 15 16 17 18 19 |
# File 'lib/active_record/connection_adapters/sqlserver/core_ext/calculations.rb', line 12 def bound_attributes attrs = super if @_setting_offset_for_count @_setting_offset_for_count = false attrs << Attribute.with_cast_value('OFFSET'.freeze, 0, ::ActiveRecord::Type.default_value) end attrs end |