Sha256: f3997a06408bba81767f45c7bbdab42bad69c3220c87c8dfd1f06c729233f5d3

Contents?: true

Size: 506 Bytes

Versions: 1

Compression:

Stored size: 506 Bytes

Contents

module StaticRecord
  # Contains ActiveRecord-like query interface methods
  module QueryInterface
    # Contains search modifiers
    module SearchModifiers
      private
    
      def limit(amount)
        @sql_limit = amount
        self
      end

      def offset(amount)
        @sql_offset = amount
        self
      end

      def order(ord)
        @order_by << ord
        self
      end

      def count
        @columns = 'COUNT(*)'
        exec_request(:integer)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
static-record-1.0.1 lib/static_record/models/query_interface/search_modifiers.rb