neoid-gem/neoid

View on GitHub
lib/neoid/database_cleaner.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Neoid
  class NeoDatabaseCleaner
    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
  end
end