Esempio n. 1
0
//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();
            }
Esempio n. 2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: ConstraintDescriptor createConstraint(org.neo4j.internal.kernel.api.SchemaWrite writeOps, org.neo4j.kernel.api.schema.LabelSchemaDescriptor descriptor) throws Exception
        internal override ConstraintDescriptor CreateConstraint(SchemaWrite writeOps, LabelSchemaDescriptor descriptor)
        {
            return(writeOps.NodeKeyConstraintCreate(descriptor));
        }