Object
# File lib/tarantool/record/select.rb, line 57 def auto_shard params = @params.dup params.delte :shard self.class.new(@record, params) end
# File lib/tarantool/record/select.rb, line 37 def call(*args) @record.call(*args) end
# File lib/tarantool/record/select.rb, line 32 def each return to_enum unless block_given? results.each{|a| yield a} end
# File lib/tarantool/record/select.rb, line 67 def first space.select(@params[:where], @params[:offset] || 0, 1).first end
# File lib/tarantool/record/select.rb, line 41 def limit(limit) self.class.new(@record, @params.merge(limit: limit)) end
# File lib/tarantool/record/select.rb, line 45 def offset(offset) self.class.new(@record, @params.merge(offset: offset)) end
# File lib/tarantool/record/select.rb, line 27 def reset! @results = nil self end
# File lib/tarantool/record/select.rb, line 16 def results @results ||= begin raise "Condition is not set" unless @params[:where] @record.auto_space.select( @params[:where], @params[:offset] || 0, @params[:limit] || -1 ) end end
# File lib/tarantool/record/select.rb, line 71 def space space = @record.auto_space @params[:shard] ? space.shard(@params[:shard]) : space end
Generated with the Darkfish Rdoc Generator 2.