Class: Neoid::NeoDatabaseCleaner

Inherits:
Object
  • Object
show all
Defined in:
lib/neoid/database_cleaner.rb

Class Method Summary collapse

Class Method Details

.clean_dbObject



3
4
5
6
7
8
9
10
# File 'lib/neoid/database_cleaner.rb', line 3

def self.clean_db()
  Neoid.db.execute_script <<-GREMLIN
    g.V.toList().each { if (it.id != 0) g.removeVertex(it) }
    g.indices.each { g.dropIndex(it.indexName); }
  GREMLIN

  true
end