internal virtual void DeleteAllIndexRules() { foreach (IndexDefinition index in Db.schema().Indexes) { if (!index.ConstraintIndex) { index.Drop(); } } }
private void CreateIndex(Label label, string key) { using (Transaction tx = _db.beginTx()) { _db.schema().indexFor(label).on(key).create(); tx.Success(); } using (Transaction tx = _db.beginTx()) { _db.schema().awaitIndexesOnline(10, SECONDS); tx.Success(); } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldRecoverCreationOfUniquenessConstraintFollowedByDeletionOfThatSameConstraint() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldRecoverCreationOfUniquenessConstraintFollowedByDeletionOfThatSameConstraint() { // given CreateUniqueConstraint(); DropConstraints(); // when - perform recovery Restart(Snapshot(StoreDir.absolutePath())); // then - just make sure the constraint is gone using (Transaction tx = _db.beginTx()) { assertFalse(_db.schema().getConstraints(_label).GetEnumerator().hasNext()); tx.Success(); } }
private void CreatePropertyIndex() { using (Transaction tx = _graphDb.beginTx()) { _graphDb.schema().indexFor(Label).on(PROP_NAME).create(); tx.Success(); } }
public override Schema Schema() { return(GraphDatabaseAPI.schema()); }