Search in sources :

Example 6 with NodePropertyAccessor

use of org.neo4j.storageengine.api.NodePropertyAccessor in project neo4j by neo4j.

the class SimpleUniquenessVerifierTest method updatesVerificationOneDuplicate.

@Test
void updatesVerificationOneDuplicate() throws IOException {
    List<Object> data = asList("foo", "bar", "baz", "100", "200", 'q', 'u', 'x', "aa", "300", 'u', "-100");
    NodePropertyAccessor nodePropertyAccessor = newPropertyAccessor(data);
    insert(data);
    assertDuplicatesCreated(nodePropertyAccessor, valueTupleList("aa", 'u', "-100"));
}
Also used : NodePropertyAccessor(org.neo4j.storageengine.api.NodePropertyAccessor) Test(org.junit.jupiter.api.Test)

Example 7 with NodePropertyAccessor

use of org.neo4j.storageengine.api.NodePropertyAccessor in project neo4j by neo4j.

the class SimpleUniquenessVerifierTest method populationVerificationManyDuplicate.

@Test
void populationVerificationManyDuplicate() throws IOException {
    List<Object> data = asList("dog", "cat", "dog", "dog", "dog", "dog");
    NodePropertyAccessor nodePropertyAccessor = newPropertyAccessor(data);
    insert(data);
    assertHasDuplicates(nodePropertyAccessor);
}
Also used : NodePropertyAccessor(org.neo4j.storageengine.api.NodePropertyAccessor) Test(org.junit.jupiter.api.Test)

Example 8 with NodePropertyAccessor

use of org.neo4j.storageengine.api.NodePropertyAccessor in project neo4j by neo4j.

the class SimpleUniquenessVerifierTest method populationVerificationOneDuplicate.

@Test
void populationVerificationOneDuplicate() throws IOException {
    List<Object> data = asList("cat", "21", "22", "23", "24L", "(byte) 25", "26.0", "22", "dog");
    NodePropertyAccessor nodePropertyAccessor = newPropertyAccessor(data);
    insert(data);
    assertHasDuplicates(nodePropertyAccessor);
}
Also used : NodePropertyAccessor(org.neo4j.storageengine.api.NodePropertyAccessor) Test(org.junit.jupiter.api.Test)

Example 9 with NodePropertyAccessor

use of org.neo4j.storageengine.api.NodePropertyAccessor in project neo4j by neo4j.

the class SimpleUniquenessVerifierTest method updatesVerificationManyDuplicate.

@Test
void updatesVerificationManyDuplicate() throws IOException {
    List<Object> data = asList("-99", 'a', "-10.0", "-99.99999", "apa", "-99.99999", "mod", "div", "div", "-10");
    NodePropertyAccessor nodePropertyAccessor = newPropertyAccessor(data);
    insert(data);
    assertDuplicatesCreated(nodePropertyAccessor, valueTupleList("-99.99999", 'a', "-10", "div"));
}
Also used : NodePropertyAccessor(org.neo4j.storageengine.api.NodePropertyAccessor) Test(org.junit.jupiter.api.Test)

Example 10 with NodePropertyAccessor

use of org.neo4j.storageengine.api.NodePropertyAccessor in project neo4j by neo4j.

the class LuceneSchemaIndexUniquenessVerificationIT method verifyUniqueness.

private void verifyUniqueness(Collection<Value> data) throws IOException, IndexEntryConflictException {
    NodePropertyAccessor nodePropertyAccessor = new TestPropertyAccessor(new ArrayList<>(data));
    index.verifyUniqueness(nodePropertyAccessor, new int[] { PROPERTY_KEY_ID });
}
Also used : NodePropertyAccessor(org.neo4j.storageengine.api.NodePropertyAccessor)

Aggregations

NodePropertyAccessor (org.neo4j.storageengine.api.NodePropertyAccessor)10 Test (org.junit.jupiter.api.Test)8 IOException (java.io.IOException)1 KernelException (org.neo4j.exceptions.KernelException)1 SchemaRead (org.neo4j.internal.kernel.api.SchemaRead)1 TransactionFailureException (org.neo4j.internal.kernel.api.exceptions.TransactionFailureException)1 CreateConstraintFailureException (org.neo4j.internal.kernel.api.exceptions.schema.CreateConstraintFailureException)1 IndexNotFoundKernelException (org.neo4j.internal.kernel.api.exceptions.schema.IndexNotFoundKernelException)1 IndexDescriptor (org.neo4j.internal.schema.IndexDescriptor)1 IndexEntryConflictException (org.neo4j.kernel.api.exceptions.index.IndexEntryConflictException)1 IndexPopulationFailedKernelException (org.neo4j.kernel.api.exceptions.index.IndexPopulationFailedKernelException)1 AlreadyConstrainedException (org.neo4j.kernel.api.exceptions.schema.AlreadyConstrainedException)1 UniquePropertyValueValidationException (org.neo4j.kernel.api.exceptions.schema.UniquePropertyValueValidationException)1 PartitionedUniquenessVerifier (org.neo4j.kernel.api.impl.schema.verification.PartitionedUniquenessVerifier)1 IndexPopulator (org.neo4j.kernel.api.index.IndexPopulator)1 IndexUpdater (org.neo4j.kernel.api.index.IndexUpdater)1 IndexProxy (org.neo4j.kernel.impl.api.index.IndexProxy)1 Client (org.neo4j.kernel.impl.locking.Locks.Client)1 DefaultNodePropertyAccessor (org.neo4j.kernel.impl.transaction.state.storeview.DefaultNodePropertyAccessor)1 ResourceType (org.neo4j.lock.ResourceType)1