Class: ROM::RethinkDB::Commands::Delete

Inherits:
Commands::Delete
  • Object
show all
Defined in:
lib/rom/rethinkdb/commands/delete.rb

Instance Method Summary collapse

Instance Method Details

#datasetObject



16
17
18
# File 'lib/rom/rethinkdb/commands/delete.rb', line 16

def dataset
  relation.dataset
end

#executeObject



10
11
12
13
14
# File 'lib/rom/rethinkdb/commands/delete.rb', line 10

def execute
  deleted = dataset.to_a
  dataset.scope.delete.run(dataset.connection)
  deleted
end