//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private org.neo4j.internal.kernel.api.IndexReference createIndex(org.neo4j.internal.kernel.api.Transaction transaction) throws org.neo4j.internal.kernel.api.exceptions.schema.SchemaKernelException, org.neo4j.internal.kernel.api.exceptions.InvalidTransactionTypeKernelException private IndexReference CreateIndex([email protected] transaction) { TokenWrite tokenWrite = transaction.TokenWrite(); SchemaWrite schemaWrite = transaction.SchemaWrite(); LabelSchemaDescriptor schemaDescriptor = forLabel(tokenWrite.LabelGetOrCreateForName("hello"), tokenWrite.PropertyKeyGetOrCreateForName("hepp")); return(schemaWrite.IndexCreate(schemaDescriptor)); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: void createConstraint(String key, String property) throws org.neo4j.internal.kernel.api.exceptions.KernelException internal override void CreateConstraint(string key, string property) { TokenWrite tokenWrite = TokenWriteInNewTransaction(); int label = tokenWrite.LabelGetOrCreateForName(key); int propertyKey = tokenWrite.PropertyKeyGetOrCreateForName(property); Commit(); SchemaWrite schemaWrite = SchemaWriteInNewTransaction(); schemaWrite.NodeKeyConstraintCreate(forLabel(label, propertyKey)); Commit(); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private void createConstraint(String label, String propertyKey) throws org.neo4j.internal.kernel.api.exceptions.KernelException private void CreateConstraint(string label, string propertyKey) { int labelId; int propertyKeyId; TokenWrite tokenWrite = TokenWriteInNewTransaction(); labelId = tokenWrite.LabelGetOrCreateForName(label); propertyKeyId = tokenWrite.PropertyKeyGetOrCreateForName(propertyKey); Commit(); SchemaWrite schemaWrite = SchemaWriteInNewTransaction(); schemaWrite.UniquePropertyConstraintCreate(forLabel(labelId, propertyKeyId)); Commit(); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: int initializeLabelOrRelType(org.neo4j.internal.kernel.api.TokenWrite tokenWrite, String name) throws org.neo4j.internal.kernel.api.exceptions.KernelException internal override int InitializeLabelOrRelType(TokenWrite tokenWrite, string name) { return(tokenWrite.LabelGetOrCreateForName(name)); }