class ROM::RethinkDB::Dataset

Dataset for RethinkDB

@api public

Attributes

connection[R]
rql[R]
scope[R]

Public Class Methods

new(scope, rql, connection) click to toggle source
# File lib/rom/rethinkdb/dataset.rb, line 9
def initialize(scope, rql, connection)
  @scope = scope
  @rql = rql
  @connection = connection
end

Public Instance Methods

count() click to toggle source
# File lib/rom/rethinkdb/dataset.rb, line 23
def count
  scope.count.run(connection)
end
each(&block) click to toggle source
# File lib/rom/rethinkdb/dataset.rb, line 19
def each(&block)
  to_a.each(&block)
end
to_a() click to toggle source
# File lib/rom/rethinkdb/dataset.rb, line 15
def to_a
  scope.run(connection)
end