// TODO test that creation and dropping of fulltext indexes is applied through incremental backup. // TODO test that custom analyzer configurations are applied through incremental backup. // TODO test that the eventually_consistent setting is transferred through incremental backup. private void InitializeTestData() { using (Transaction tx = _db.beginTx()) { Node node1 = _db.createNode(_label); node1.SetProperty(PROP, "This is an integration test."); Node node2 = _db.createNode(_label); node2.SetProperty(PROP, "This is a related integration test."); Relationship relationship = node1.CreateRelationshipTo(node2, _rel); relationship.SetProperty(PROP, "They relate"); _nodeId1 = node1.Id; _nodeId2 = node2.Id; _relId1 = relationship.Id; tx.Success(); } using (Transaction tx = _db.beginTx()) { _db.execute(format(NODE_CREATE, NODE_INDEX, array(_label.name()), array(PROP))).close(); _db.execute(format(RELATIONSHIP_CREATE, REL_INDEX, array(_rel.name()), array(PROP))).close(); tx.Success(); } AwaitPopulation(_db); }
private string Execute(LoginContext subject, string query, System.Action <ResourceIterator <IDictionary <string, object> > > resultConsumer) { try { using (Transaction tx = Db.beginTransaction(KernelTransaction.Type.@implicit, subject)) { resultConsumer(Db.execute(query)); tx.Success(); return(""); } } catch (Exception e) { return(e.Message); } }
public override string ListTransactions() { string res; try { using (Transaction tx = GraphDatabaseAPI.beginTx()) { res = GraphDatabaseAPI.execute("CALL dbms.listTransactions()").resultAsString(); tx.Success(); } } catch (QueryExecutionException) { res = "dbms.listTransactions() is not available"; } return(res); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public org.neo4j.graphdb.Result execute(String query, java.util.Map<String,Object> parameters, long timeout, java.util.concurrent.TimeUnit unit) throws org.neo4j.graphdb.QueryExecutionException public override Result Execute(string query, IDictionary <string, object> parameters, long timeout, TimeUnit unit) { return(GraphDatabaseAPI.execute(query, parameters, timeout, unit)); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public org.neo4j.graphdb.Result execute(String query, java.util.Map<String, Object> parameters) throws org.neo4j.graphdb.QueryExecutionException public override Result Execute(string query, IDictionary <string, object> parameters) { return(GraphDatabaseAPI.execute(query, parameters)); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public org.neo4j.graphdb.Result execute(String query, long timeout, java.util.concurrent.TimeUnit unit) throws org.neo4j.graphdb.QueryExecutionException public override Result Execute(string query, long timeout, TimeUnit unit) { return(GraphDatabaseAPI.execute(query, timeout, unit)); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public org.neo4j.graphdb.Result execute(String query) throws org.neo4j.graphdb.QueryExecutionException public override Result Execute(string query) { return(GraphDatabaseAPI.execute(query)); }