Esempio n. 1
0
        private void ClearDatabase()
        {
            using (Transaction tx = _master.beginTx())
            {
                foreach (IndexDefinition index in _master.schema().Indexes)
                {
                    index.Drop();
                }
                tx.Success();
            }

            using (Transaction tx = _master.beginTx())
            {
                foreach (Node node in _master.AllNodes)
                {
                    foreach (Relationship relationship in node.Relationships)
                    {
                        relationship.Delete();
                    }
                    node.Delete();
                }
                tx.Success();
            }
            _cluster.sync();
        }