Class: DatabaseCleaner::Neo4j::Deletion

Inherits:
Object
  • Object
show all
Includes:
Base
Defined in:
lib/database_cleaner/neo4j/deletion.rb

Direct Known Subclasses

Truncation

Instance Method Summary collapse

Methods included from Base

#database, #db, #db=, #start

Methods included from Generic::Base

#cleaning, #db, included

Instance Method Details

#cleanObject



9
10
11
12
13
# File 'lib/database_cleaner/neo4j/deletion.rb', line 9

def clean
  ::Neo4j::Transaction.run do
    session._query('MATCH (n) OPTIONAL MATCH (n)-[r]-() DELETE n,r')
  end
end