func cleanupConstraints(t *testing.T, db *neoism.Database) { err := db.CypherBatch([]*neoism.CypherQuery{ &neoism.CypherQuery{ Statement: `DROP CONSTRAINT ON (x:NeoUtilsTest) ASSERT x.name IS UNIQUE`, }, }) if err != nil { t.Fatal(err) } }
func cleanup(t *testing.T, db *neoism.Database) { err := db.CypherBatch([]*neoism.CypherQuery{ &neoism.CypherQuery{ Statement: `MATCH (x:NeoUtilsTest) DETACH DELETE x`, }, }) if err != nil { t.Fatal(err) } }
func cleanup(db *neoism.Database) { qs := []*neoism.CypherQuery{ &neoism.CypherQuery{ Statement: `START r=rel(*) DELETE r`, }, &neoism.CypherQuery{ Statement: `START n=node(*) DELETE n`, }, } err := db.CypherBatch(qs) if err != nil { log.Fatal(err) } }