//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Before public void setup() public virtual void Setup() { _db = DbRule.GraphDatabaseAPI; if (WithIndex) { using (Org.Neo4j.Graphdb.Transaction tx = _db.beginTx()) { _db.schema().indexFor(_label).on(Keys[0]).create(); IndexCreator indexCreator = _db.schema().indexFor(_label); foreach (string key in Keys) { indexCreator = indexCreator.On(key); } indexCreator.Create(); tx.Success(); } using (Org.Neo4j.Graphdb.Transaction tx = _db.beginTx()) { _db.schema().awaitIndexesOnline(5, TimeUnit.MINUTES); tx.Success(); } } }
private void CreateIndex(params string[] propKeys) { using (Transaction tx = Db.beginTx()) { IndexCreator indexCreator = Db.schema().indexFor(LABEL_ONE); foreach (string propKey in propKeys) { indexCreator = indexCreator.On(propKey); } indexCreator.Create(); tx.Success(); } using (Transaction tx = Db.beginTx()) { Db.schema().awaitIndexesOnline(1, TimeUnit.MINUTES); tx.Success(); } }
private void CreateIndex(params string[] keys) { using (Transaction tx = Db.beginTx()) { IndexCreator indexCreator = Db.schema().indexFor(LABEL); foreach (string key in keys) { indexCreator = indexCreator.On(key); } indexCreator.Create(); tx.Success(); } using (Transaction tx = Db.beginTx()) { Db.schema().awaitIndexesOnline(10, SECONDS); tx.Success(); } }