Search in sources :

Example 11 with FulltextSchemaDescriptor

use of org.neo4j.internal.schema.FulltextSchemaDescriptor in project neo4j by neo4j.

the class SchemaCacheTest method removeSchemaWithRepeatedRelType.

@Test
void removeSchemaWithRepeatedRelType() {
    final SchemaCache cache = newSchemaCache();
    final int id = 1;
    final int[] repeatedRelTypes = { 0, 1, 0 };
    final FulltextSchemaDescriptor schema = fulltext(RELATIONSHIP, repeatedRelTypes, new int[] { 1 });
    IndexDescriptor index = newIndexRule(schema, id);
    cache.addSchemaRule(index);
    cache.removeSchemaRule(id);
}
Also used : FulltextSchemaDescriptor(org.neo4j.internal.schema.FulltextSchemaDescriptor) IndexDescriptor(org.neo4j.internal.schema.IndexDescriptor) Test(org.junit.jupiter.api.Test)

Example 12 with FulltextSchemaDescriptor

use of org.neo4j.internal.schema.FulltextSchemaDescriptor in project neo4j by neo4j.

the class SchemaCacheTest method removeSchemaWithRepeatedLabel.

@Test
void removeSchemaWithRepeatedLabel() {
    final SchemaCache cache = newSchemaCache();
    final int id = 1;
    final int[] repeatedLabels = { 0, 1, 0 };
    final FulltextSchemaDescriptor schema = fulltext(NODE, repeatedLabels, new int[] { 1 });
    IndexDescriptor index = newIndexRule(schema, id);
    cache.addSchemaRule(index);
    cache.removeSchemaRule(id);
}
Also used : FulltextSchemaDescriptor(org.neo4j.internal.schema.FulltextSchemaDescriptor) IndexDescriptor(org.neo4j.internal.schema.IndexDescriptor) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)12 FulltextSchemaDescriptor (org.neo4j.internal.schema.FulltextSchemaDescriptor)12 IndexDescriptor (org.neo4j.internal.schema.IndexDescriptor)9 IndexProviderDescriptor (org.neo4j.internal.schema.IndexProviderDescriptor)5 SchemaWrite (org.neo4j.internal.kernel.api.SchemaWrite)3 TokenWrite (org.neo4j.internal.kernel.api.TokenWrite)3 KernelIntegrationTest (org.neo4j.kernel.impl.api.integrationtest.KernelIntegrationTest)3 IndexConfig (org.neo4j.internal.schema.IndexConfig)2 Value (org.neo4j.values.storable.Value)2 Transaction (org.neo4j.graphdb.Transaction)1 NodeCommand (org.neo4j.internal.recordstorage.Command.NodeCommand)1 PropertyCommand (org.neo4j.internal.recordstorage.Command.PropertyCommand)1 IndexCapability (org.neo4j.internal.schema.IndexCapability)1 KernelTransaction (org.neo4j.kernel.api.KernelTransaction)1 KernelTransactionImplementation (org.neo4j.kernel.impl.api.KernelTransactionImplementation)1 NodeRecord (org.neo4j.kernel.impl.store.record.NodeRecord)1 PropertyRecord (org.neo4j.kernel.impl.store.record.PropertyRecord)1 RelationshipRecord (org.neo4j.kernel.impl.store.record.RelationshipRecord)1 ValueCategory (org.neo4j.values.storable.ValueCategory)1