Search in sources :

Example 1 with Values

use of org.neo4j.values.storable.Values in project neo4j by neo4j.

the class ProcedureCompilation method toAnyValue.

/**
 * Takes an expression evaluating to one of the supported java values and turns
 * it into the corresponding AnyValue
 *
 * @param expression the expression to evaluate
 * @param userType the type of the expression to map
 * @return an expression properly mapped to AnyValue
 */
private static Expression toAnyValue(Expression expression, Class<?> userType, Expression context) {
    if (AnyValue.class.isAssignableFrom(userType)) {
        return nullCheck(expression, cast(userType, expression));
    }
    String type = userType.getCanonicalName();
    if (type.equals(LONG)) {
        return invoke(methodReference(Values.class, LongValue.class, "longValue", long.class), expression);
    } else if (type.equals(BOXED_LONG)) {
        return nullCheck(expression, invoke(methodReference(Values.class, LongValue.class, "longValue", long.class), unbox(expression)));
    } else if (type.equals(DOUBLE)) {
        return invoke(methodReference(Values.class, DoubleValue.class, "doubleValue", double.class), expression);
    } else if (type.equals(BOXED_DOUBLE)) {
        return nullCheck(expression, invoke(methodReference(Values.class, DoubleValue.class, "doubleValue", double.class), unbox(expression)));
    } else if (type.equals(NUMBER)) {
        return nullCheck(expression, invoke(methodReference(Values.class, NumberValue.class, "numberValue", Number.class), expression));
    } else if (type.equals(BOOLEAN)) {
        return invoke(methodReference(Values.class, BooleanValue.class, "booleanValue", boolean.class), expression);
    } else if (type.equals(BOXED_BOOLEAN)) {
        return nullCheck(expression, invoke(methodReference(Values.class, BooleanValue.class, "booleanValue", boolean.class), unbox(expression)));
    } else if (type.equals(STRING)) {
        return invoke(methodReference(Values.class, Value.class, "stringOrNoValue", String.class), expression);
    } else if (type.equals(BYTE_ARRAY)) {
        return nullCheck(expression, invoke(methodReference(Values.class, ByteArray.class, "byteArray", byte[].class), expression));
    } else if (type.equals(LIST)) {
        return nullCheck(expression, invoke(methodReference(ValueUtils.class, ListValue.class, "asListValue", Iterable.class), expression));
    } else if (type.equals(MAP)) {
        return nullCheck(expression, invoke(methodReference(ValueUtils.class, MapValue.class, "asMapValue", Map.class), expression));
    } else if (type.equals(ZONED_DATE_TIME)) {
        return nullCheck(expression, invoke(methodReference(DateTimeValue.class, DateTimeValue.class, "datetime", ZonedDateTime.class), expression));
    } else if (type.equals(OFFSET_TIME)) {
        return nullCheck(expression, invoke(methodReference(TimeValue.class, TimeValue.class, "time", OffsetTime.class), expression));
    } else if (type.equals(LOCAL_DATE)) {
        return nullCheck(expression, invoke(methodReference(DateValue.class, DateValue.class, "date", LocalDate.class), expression));
    } else if (type.equals(LOCAL_TIME)) {
        return nullCheck(expression, invoke(methodReference(LocalTimeValue.class, LocalTimeValue.class, "localTime", LocalTime.class), expression));
    } else if (type.equals(LOCAL_DATE_TIME)) {
        return nullCheck(expression, invoke(methodReference(LocalDateTimeValue.class, LocalDateTimeValue.class, "localDateTime", LocalDateTime.class), expression));
    } else if (type.equals(TEMPORAL_AMOUNT)) {
        return nullCheck(expression, invoke(methodReference(Values.class, DurationValue.class, "durationValue", TemporalAmount.class), expression));
    } else if (type.equals(NODE)) {
        Expression internalTransaction = invoke(context, methodReference(Context.class, InternalTransaction.class, "internalTransactionOrNull"));
        Expression getNode = invoke(internalTransaction, methodReference(InternalTransaction.class, Entity.class, "validateSameDB", Entity.class), expression);
        return nullCheck(expression, invoke(methodReference(ValueUtils.class, NodeValue.class, "fromNodeEntity", Node.class), getNode));
    } else if (type.equals(RELATIONSHIP)) {
        Expression internalTransaction = invoke(context, methodReference(Context.class, InternalTransaction.class, "internalTransactionOrNull"));
        Expression getRelationship = invoke(internalTransaction, methodReference(InternalTransaction.class, Entity.class, "validateSameDB", Entity.class), expression);
        return nullCheck(expression, invoke(methodReference(ValueUtils.class, RelationshipValue.class, "fromRelationshipEntity", Relationship.class), getRelationship));
    } else if (type.equals(PATH)) {
        return nullCheck(expression, invoke(methodReference(ValueUtils.class, PathValue.class, "fromPath", Path.class), expression));
    } else if (type.equals(POINT)) {
        return nullCheck(expression, invoke(methodReference(ValueUtils.class, PointValue.class, "asPointValue", Point.class), expression));
    } else {
        return invoke(methodReference(ValueUtils.class, AnyValue.class, "of", Object.class), expression);
    }
}
Also used : LocalDateTime(java.time.LocalDateTime) Context(org.neo4j.kernel.api.procedure.Context) Path(org.neo4j.graphdb.Path) NodeValue(org.neo4j.values.virtual.NodeValue) Entity(org.neo4j.graphdb.Entity) LocalDateTimeValue(org.neo4j.values.storable.LocalDateTimeValue) DateTimeValue(org.neo4j.values.storable.DateTimeValue) PathValue(org.neo4j.values.virtual.PathValue) ListValue(org.neo4j.values.virtual.ListValue) Node(org.neo4j.graphdb.Node) Values(org.neo4j.values.storable.Values) InternalTransaction(org.neo4j.kernel.impl.coreapi.InternalTransaction) LocalDate(java.time.LocalDate) LocalDateTimeValue(org.neo4j.values.storable.LocalDateTimeValue) ValueUtils(org.neo4j.kernel.impl.util.ValueUtils) DoubleValue(org.neo4j.values.storable.DoubleValue) ZonedDateTime(java.time.ZonedDateTime) Expression(org.neo4j.codegen.Expression) DateValue(org.neo4j.values.storable.DateValue) LongValue(org.neo4j.values.storable.LongValue) AnyValue(org.neo4j.values.AnyValue)

Example 2 with Values

use of org.neo4j.values.storable.Values in project neo4j by neo4j.

the class NativeIndexAccessorTests method expectIndexOrder.

private static void expectIndexOrder(Value[] allValues, ValueGroup valueGroup, ValueIndexReader reader, IndexOrder supportedOrder, PropertyIndexQuery.RangePredicate<?> supportedQuery) throws IndexNotApplicableKernelException {
    Value[] expectedValues = Arrays.stream(allValues).filter(v -> v.valueGroup() == valueGroup).toArray(Value[]::new);
    if (supportedOrder == IndexOrder.ASCENDING) {
        Arrays.sort(expectedValues, Values.COMPARATOR);
    } else if (supportedOrder == IndexOrder.DESCENDING) {
        Arrays.sort(expectedValues, Values.COMPARATOR.reversed());
    }
    SimpleEntityValueClient client = new SimpleEntityValueClient();
    reader.query(NULL_CONTEXT, client, constrained(supportedOrder, true), supportedQuery);
    int i = 0;
    while (client.next()) {
        assertEquals(expectedValues[i++], client.values[0], "values in order");
    }
    assertEquals(i, expectedValues.length, "found all values");
}
Also used : BeforeEach(org.junit.jupiter.api.BeforeEach) IndexOrder(org.neo4j.internal.schema.IndexOrder) Arrays(java.util.Arrays) ValueIndexReader(org.neo4j.kernel.api.index.ValueIndexReader) SimpleEntityValueClient(org.neo4j.storageengine.api.schema.SimpleEntityValueClient) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) Iterators.filter(org.neo4j.internal.helpers.collection.Iterators.filter) NULL_CONTEXT(org.neo4j.internal.kernel.api.QueryContext.NULL_CONTEXT) Value(org.neo4j.values.storable.Value) RandomValues(org.neo4j.values.storable.RandomValues) IndexUpdater(org.neo4j.kernel.api.index.IndexUpdater) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) NULL(org.neo4j.io.pagecache.context.CursorContext.NULL) IndexEntryUpdate.remove(org.neo4j.storageengine.api.IndexEntryUpdate.remove) Predicates.alwaysTrue(org.neo4j.function.Predicates.alwaysTrue) EMPTY_LONG_ARRAY(org.neo4j.collection.PrimitiveLongCollections.EMPTY_LONG_ARRAY) Predicate(java.util.function.Predicate) Collection(java.util.Collection) Set(java.util.Set) TestDirectory(org.neo4j.test.rule.TestDirectory) Collectors(java.util.stream.Collectors) PointValue(org.neo4j.values.storable.PointValue) String.format(java.lang.String.format) ValueIndexEntryUpdate(org.neo4j.storageengine.api.ValueIndexEntryUpdate) Test(org.junit.jupiter.api.Test) IndexValueCapability(org.neo4j.internal.schema.IndexValueCapability) IndexQueryConstraints.unconstrained(org.neo4j.internal.kernel.api.IndexQueryConstraints.unconstrained) List(java.util.List) Stream(java.util.stream.Stream) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) IndexNotApplicableKernelException(org.neo4j.internal.kernel.api.exceptions.schema.IndexNotApplicableKernelException) PropertyIndexQuery(org.neo4j.internal.kernel.api.PropertyIndexQuery) IndexDescriptor(org.neo4j.internal.schema.IndexDescriptor) ValueCreatorUtil.countUniqueValues(org.neo4j.kernel.impl.index.schema.ValueCreatorUtil.countUniqueValues) Assertions.assertThrows(org.junit.jupiter.api.Assertions.assertThrows) IndexCapability(org.neo4j.internal.schema.IndexCapability) IndexDirectoryStructure.directoriesByProvider(org.neo4j.kernel.api.index.IndexDirectoryStructure.directoriesByProvider) Iterables.asUniqueSet(org.neo4j.internal.helpers.collection.Iterables.asUniqueSet) IndexQueryConstraints.unorderedValues(org.neo4j.internal.kernel.api.IndexQueryConstraints.unorderedValues) IndexEntryUpdate.change(org.neo4j.storageengine.api.IndexEntryUpdate.change) Predicates.in(org.neo4j.function.Predicates.in) ArrayList(java.util.ArrayList) Values(org.neo4j.values.storable.Values) HashSet(java.util.HashSet) IndexEntryConflictException(org.neo4j.kernel.api.exceptions.index.IndexEntryConflictException) Assertions.assertThatThrownBy(org.assertj.core.api.Assertions.assertThatThrownBy) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) IndexSample(org.neo4j.kernel.api.index.IndexSample) Iterator(java.util.Iterator) ValueType(org.neo4j.values.storable.ValueType) IndexOrderCapability(org.neo4j.internal.schema.IndexOrderCapability) IndexQueryConstraints(org.neo4j.internal.kernel.api.IndexQueryConstraints) IndexDirectoryStructure(org.neo4j.kernel.api.index.IndexDirectoryStructure) IndexQueryConstraints.constrained(org.neo4j.internal.kernel.api.IndexQueryConstraints.constrained) PrimitiveLongCollections(org.neo4j.collection.PrimitiveLongCollections) Assertions.assertArrayEquals(org.junit.jupiter.api.Assertions.assertArrayEquals) LongIterator(org.eclipse.collections.api.iterator.LongIterator) IndexProgressor(org.neo4j.kernel.api.index.IndexProgressor) Values.of(org.neo4j.values.storable.Values.of) CoordinateReferenceSystem(org.neo4j.values.storable.CoordinateReferenceSystem) IndexSampler(org.neo4j.kernel.api.index.IndexSampler) ValueGroup(org.neo4j.values.storable.ValueGroup) Collections(java.util.Collections) ONLINE(org.neo4j.kernel.impl.api.index.IndexUpdateMode.ONLINE) FileSystemAbstraction(org.neo4j.io.fs.FileSystemAbstraction) Value(org.neo4j.values.storable.Value) PointValue(org.neo4j.values.storable.PointValue) SimpleEntityValueClient(org.neo4j.storageengine.api.schema.SimpleEntityValueClient)

Example 3 with Values

use of org.neo4j.values.storable.Values in project neo4j by neo4j.

the class BuiltInProceduresIT method dbIndexesResult.

private static AnyValue[] dbIndexesResult(long id, String name, String state, Double populationPercent, String uniqueness, String type, String entityType, List<String> labelsOrTypes, List<String> properties, String provider) {
    ListValue labelsOrTypesList = VirtualValues.list(labelsOrTypes.stream().map(Values::stringValue).toArray(AnyValue[]::new));
    ListValue propertiesList = VirtualValues.list(properties.stream().map(Values::stringValue).toArray(AnyValue[]::new));
    return new AnyValue[] { longValue(id), stringValue(name), stringValue(state), doubleValue(populationPercent), stringValue(uniqueness), stringValue(type), stringValue(entityType), labelsOrTypesList, propertiesList, stringValue(provider) };
}
Also used : ListValue(org.neo4j.values.virtual.ListValue) Values(org.neo4j.values.storable.Values) VirtualValues(org.neo4j.values.virtual.VirtualValues) AnyValue(org.neo4j.values.AnyValue)

Example 4 with Values

use of org.neo4j.values.storable.Values in project neo4j by neo4j.

the class TxStateIndexChanges method indexUpdatesWithValuesForSeek.

static AddedWithValuesAndRemoved indexUpdatesWithValuesForSeek(ReadableTransactionState txState, IndexDescriptor descriptor, ValueTuple values) {
    UnmodifiableMap<ValueTuple, ? extends LongDiffSets> updates = txState.getIndexUpdates(descriptor.schema());
    if (updates != null) {
        LongDiffSets indexUpdatesForSeek = updates.get(values);
        if (indexUpdatesForSeek == null) {
            return EMPTY_ADDED_AND_REMOVED_WITH_VALUES;
        }
        Value[] valueArray = values.getValues();
        MutableList<EntityWithPropertyValues> added = Lists.mutable.empty();
        indexUpdatesForSeek.getAdded().forEach((LongProcedure) l -> added.add(new EntityWithPropertyValues(l, valueArray)));
        return new AddedWithValuesAndRemoved(added, indexUpdatesForSeek.getRemoved());
    }
    return EMPTY_ADDED_AND_REMOVED_WITH_VALUES;
}
Also used : IndexOrder(org.neo4j.internal.schema.IndexOrder) NO_VALUE(org.neo4j.values.storable.Values.NO_VALUE) LongDiffSets(org.neo4j.storageengine.api.txstate.LongDiffSets) ReadableTransactionState(org.neo4j.storageengine.api.txstate.ReadableTransactionState) ValueTuple(org.neo4j.values.storable.ValueTuple) LongLists(org.eclipse.collections.impl.factory.primitive.LongLists) Value(org.neo4j.values.storable.Value) TextValue(org.neo4j.values.storable.TextValue) MutableLongList(org.eclipse.collections.api.list.primitive.MutableLongList) NavigableMap(java.util.NavigableMap) MutableList(org.eclipse.collections.api.list.MutableList) Values(org.neo4j.values.storable.Values) MutableLongSet(org.eclipse.collections.api.set.primitive.MutableLongSet) LongProcedure(org.eclipse.collections.api.block.procedure.primitive.LongProcedure) Lists(org.eclipse.collections.impl.factory.Lists) Map(java.util.Map) LongIterable(org.eclipse.collections.api.LongIterable) LongSets(org.eclipse.collections.impl.factory.primitive.LongSets) PropertyIndexQuery(org.neo4j.internal.kernel.api.PropertyIndexQuery) IndexDescriptor(org.neo4j.internal.schema.IndexDescriptor) ValueGroup(org.neo4j.values.storable.ValueGroup) LongSet(org.eclipse.collections.api.set.primitive.LongSet) Collections(java.util.Collections) UnmodifiableMap(org.eclipse.collections.impl.UnmodifiableMap) ValueTuple(org.neo4j.values.storable.ValueTuple) Value(org.neo4j.values.storable.Value) TextValue(org.neo4j.values.storable.TextValue) LongDiffSets(org.neo4j.storageengine.api.txstate.LongDiffSets)

Example 5 with Values

use of org.neo4j.values.storable.Values in project neo4j by neo4j.

the class AppendOnlyValuesContainerTest method addGet.

@TestFactory
Stream<DynamicTest> addGet() {
    final List<Pair<String, Value[]>> inputs = asList(testInput("NoValue", Function.identity(), Values.NO_VALUE), testInput("Boolean", Values::booleanValue, true, false, true, false), testInput("BooleanArray", Values::booleanArray, new boolean[] { false, true, false }, EMPTY_BOOLEAN_ARRAY), testInput("Byte", Values::byteValue, (byte) 0, (byte) 1, (byte) -1, Byte.MIN_VALUE, Byte.MAX_VALUE), testInput("ByteArray", Values::byteArray, new byte[] { (byte) 0, (byte) 1, (byte) -1, Byte.MIN_VALUE, Byte.MAX_VALUE }, EMPTY_BYTE_ARRAY), testInput("Short", Values::shortValue, (short) 0, (short) 1, (short) -1, Short.MIN_VALUE, Short.MAX_VALUE), testInput("ShortArray", Values::shortArray, new short[] { (short) 0, (short) 1, (short) -1, Short.MIN_VALUE, Short.MAX_VALUE }, EMPTY_SHORT_ARRAY), testInput("Char", Values::charValue, 'a', '\uFFFF', '∂', '©'), testInput("CharArray", Values::charArray, new char[] { 'a', '\uFFFF', '∂', '©' }, EMPTY_CHAR_ARRAY), testInput("Int", Values::intValue, 0, 1, -1, Integer.MIN_VALUE, Integer.MAX_VALUE), testInput("IntArray", Values::intArray, new int[] { 0, 1, -1, Integer.MIN_VALUE, Integer.MAX_VALUE }, EMPTY_INT_ARRAY), testInput("Long", Values::longValue, 0L, 1L, -1L, Long.MIN_VALUE, Long.MAX_VALUE), testInput("LongArray", Values::longArray, new long[] { 0L, 1L, -1L, Long.MIN_VALUE, Long.MAX_VALUE }, EMPTY_LONG_ARRAY), testInput("Double", Values::doubleValue, 0.0, 1.0, -1.0, Double.MIN_VALUE, Double.MAX_VALUE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY), testInput("DoubleArray", Values::doubleArray, new double[] { 0.0, 1.0, -1.0, Double.MIN_VALUE, Double.MAX_VALUE, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY }, EMPTY_DOUBLE_ARRAY), testInput("Float", Values::floatValue, 0.0f, 1.0f, -1.0f, Float.MIN_VALUE, Float.MAX_VALUE, Float.NEGATIVE_INFINITY, Float.POSITIVE_INFINITY), testInput("FloatArray", Values::floatArray, new float[] { 0.0f, 1.0f, -1.0f, Float.MIN_VALUE, Float.MAX_VALUE, Float.NEGATIVE_INFINITY, Float.POSITIVE_INFINITY }, EMPTY_FLOAT_ARRAY), testInput("String", Values::stringValue, "", "x", "foobar"), testInput("StringArray", Values::stringArray, new String[] { "", "x", "foobar" }, EMPTY_STRING_ARRAY), testInput("Point", input -> pointValue(input.getOne(), input.getTwo()), Tuples.pair(CoordinateReferenceSystem.WGS84, new double[] { 1.0, 2.0 }), Tuples.pair(CoordinateReferenceSystem.WGS84_3D, new double[] { 1.0, 2.0, 3.0 }), Tuples.pair(CoordinateReferenceSystem.Cartesian, new double[] { 1.0, 2.0 }), Tuples.pair(CoordinateReferenceSystem.Cartesian_3D, new double[] { 1.0, 2.0, 3.0 })), testInput("PointArray", Values::pointArray, new Point[] { pointValue(CoordinateReferenceSystem.WGS84, 1.0, 2.0), pointValue(CoordinateReferenceSystem.WGS84_3D, 1.0, 2.0, 3.0), pointValue(CoordinateReferenceSystem.Cartesian, 1.0, 2.0), pointValue(CoordinateReferenceSystem.Cartesian_3D, 1.0, 2.0, 3.0) }, new Point[0]), testInput("Duration", Values::durationValue, (TemporalAmount) Duration.parse("P2DT3H4M"), Period.parse("P1Y2M3W4D")), testInput("DurationArray", Values::durationArray, new TemporalAmount[] { Duration.parse("P2DT3H4M"), Period.parse("P1Y2M3W4D") }, new TemporalAmount[0]), testInput("Date", DateValue::date, LocalDate.now(), LocalDate.parse("1977-05-25")), testInput("DateArray", Values::dateArray, new LocalDate[] { LocalDate.now(), LocalDate.parse("1977-05-25") }, new LocalDate[0]), testInput("Time", TimeValue::time, OffsetTime.now(), OffsetTime.parse("19:28:34.123+02:00")), testInput("TimeArray", Values::timeArray, new OffsetTime[] { OffsetTime.now(), OffsetTime.parse("19:28:34.123+02:00") }, new OffsetTime[0]), testInput("LocalTime", LocalTimeValue::localTime, LocalTime.now(), LocalTime.parse("19:28:34.123")), testInput("LocalTimeArray", Values::localTimeArray, new LocalTime[] { LocalTime.now(), LocalTime.parse("19:28:34.123") }, new LocalTime[0]), testInput("LocalDateTime", LocalDateTimeValue::localDateTime, LocalDateTime.now(), LocalDateTime.parse("1956-10-04T19:28:34.123")), testInput("LocalDateTimeArray", Values::localDateTimeArray, new LocalDateTime[] { LocalDateTime.now(), LocalDateTime.parse("1956-10-04T19:28:34.123") }, new LocalDateTime[0]), testInput("DateTime", DateTimeValue::datetime, ZonedDateTime.now(), ZonedDateTime.parse("1956-10-04T19:28:34.123+01:00[Europe/Paris]"), ZonedDateTime.parse("1956-10-04T19:28:34.123+01:15"), ZonedDateTime.parse("2018-09-13T16:12:16.12345+14:00[Pacific/Kiritimati]"), ZonedDateTime.parse("2018-09-13T16:12:16.12345-12:00[Etc/GMT+12]"), ZonedDateTime.parse("2018-09-13T16:12:16.12345-18:00"), ZonedDateTime.parse("2018-09-13T16:12:16.12345+18:00")), testInput("DateTimeArray", Values::dateTimeArray, new ZonedDateTime[] { ZonedDateTime.parse("1956-10-04T19:28:34.123+01:00[Europe/Paris]"), ZonedDateTime.parse("1956-10-04T19:28:34.123+01:15"), ZonedDateTime.parse("2018-09-13T16:12:16.12345+14:00[Pacific/Kiritimati]"), ZonedDateTime.parse("2018-09-13T16:12:16.12345-12:00[Etc/GMT+12]"), ZonedDateTime.parse("2018-09-13T16:12:16.12345-18:00"), ZonedDateTime.parse("2018-09-13T16:12:16.12345+18:00") }, new ZonedDateTime[0]));
    return DynamicTest.stream(inputs.iterator(), Pair::getOne, pair -> {
        final Value[] values = pair.getTwo();
        final long[] refs = Arrays.stream(values).mapToLong(container::add).toArray();
        for (int i = 0; i < values.length; i++) {
            assertEquals(values[i], container.get(refs[i]));
        }
    });
}
Also used : Arrays(java.util.Arrays) TestFactory(org.junit.jupiter.api.TestFactory) RandomExtension(org.neo4j.test.extension.RandomExtension) ZonedDateTime(java.time.ZonedDateTime) Value(org.neo4j.values.storable.Value) LocalMemoryTracker(org.neo4j.memory.LocalMemoryTracker) MutableList(org.eclipse.collections.api.list.MutableList) EMPTY_BYTE_ARRAY(org.apache.commons.lang3.ArrayUtils.EMPTY_BYTE_ARRAY) AfterAll(org.junit.jupiter.api.AfterAll) EMPTY_CHAR_ARRAY(org.apache.commons.lang3.ArrayUtils.EMPTY_CHAR_ARRAY) Values.longValue(org.neo4j.values.storable.Values.longValue) ExtendWith(org.junit.jupiter.api.extension.ExtendWith) EMPTY_BOOLEAN_ARRAY(org.apache.commons.lang3.ArrayUtils.EMPTY_BOOLEAN_ARRAY) RandomRule(org.neo4j.test.rule.RandomRule) Arrays.asList(java.util.Arrays.asList) Duration(java.time.Duration) Tuples(org.eclipse.collections.impl.tuple.Tuples) LocalTime(java.time.LocalTime) OffsetTime(java.time.OffsetTime) Test(org.junit.jupiter.api.Test) LocalDateTimeValue(org.neo4j.values.storable.LocalDateTimeValue) List(java.util.List) Stream(java.util.stream.Stream) TimeValue(org.neo4j.values.storable.TimeValue) EMPTY_FLOAT_ARRAY(org.apache.commons.lang3.ArrayUtils.EMPTY_FLOAT_ARRAY) ObjectLongPair(org.eclipse.collections.api.tuple.primitive.ObjectLongPair) DateTimeValue(org.neo4j.values.storable.DateTimeValue) Values.intValue(org.neo4j.values.storable.Values.intValue) LocalDate(java.time.LocalDate) CachingOffHeapBlockAllocator(org.neo4j.kernel.impl.util.collection.CachingOffHeapBlockAllocator) EMPTY_SHORT_ARRAY(org.apache.commons.lang3.ArrayUtils.EMPTY_SHORT_ARRAY) EMPTY_LONG_ARRAY(org.apache.commons.lang3.ArrayUtils.EMPTY_LONG_ARRAY) Assertions.assertThrows(org.junit.jupiter.api.Assertions.assertThrows) EMPTY_DOUBLE_ARRAY(org.apache.commons.lang3.ArrayUtils.EMPTY_DOUBLE_ARRAY) LocalDateTime(java.time.LocalDateTime) EmptyMemoryTracker(org.neo4j.memory.EmptyMemoryTracker) Function(java.util.function.Function) FastList(org.eclipse.collections.impl.list.mutable.FastList) ArrayList(java.util.ArrayList) Values(org.neo4j.values.storable.Values) Values.pointValue(org.neo4j.values.storable.Values.pointValue) Inject(org.neo4j.test.extension.Inject) PrimitiveTuples.pair(org.eclipse.collections.impl.tuple.primitive.PrimitiveTuples.pair) TemporalAmount(java.time.temporal.TemporalAmount) Point(org.neo4j.graphdb.spatial.Point) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) Pair(org.eclipse.collections.api.tuple.Pair) LocalTimeValue(org.neo4j.values.storable.LocalTimeValue) MemoryTracker(org.neo4j.memory.MemoryTracker) EMPTY_INT_ARRAY(org.apache.commons.lang3.ArrayUtils.EMPTY_INT_ARRAY) Period(java.time.Period) OffHeapMemoryAllocator(org.neo4j.kernel.impl.util.collection.OffHeapMemoryAllocator) Values.stringValue(org.neo4j.values.storable.Values.stringValue) AfterEach(org.junit.jupiter.api.AfterEach) EMPTY_STRING_ARRAY(org.apache.commons.lang3.ArrayUtils.EMPTY_STRING_ARRAY) CoordinateReferenceSystem(org.neo4j.values.storable.CoordinateReferenceSystem) DateValue(org.neo4j.values.storable.DateValue) DynamicTest(org.junit.jupiter.api.DynamicTest) LocalDateTime(java.time.LocalDateTime) LocalTime(java.time.LocalTime) Point(org.neo4j.graphdb.spatial.Point) LocalDate(java.time.LocalDate) Point(org.neo4j.graphdb.spatial.Point) ZonedDateTime(java.time.ZonedDateTime) OffsetTime(java.time.OffsetTime) TemporalAmount(java.time.temporal.TemporalAmount) Value(org.neo4j.values.storable.Value) Values.longValue(org.neo4j.values.storable.Values.longValue) LocalDateTimeValue(org.neo4j.values.storable.LocalDateTimeValue) TimeValue(org.neo4j.values.storable.TimeValue) DateTimeValue(org.neo4j.values.storable.DateTimeValue) Values.intValue(org.neo4j.values.storable.Values.intValue) Values.pointValue(org.neo4j.values.storable.Values.pointValue) LocalTimeValue(org.neo4j.values.storable.LocalTimeValue) Values.stringValue(org.neo4j.values.storable.Values.stringValue) DateValue(org.neo4j.values.storable.DateValue) ObjectLongPair(org.eclipse.collections.api.tuple.primitive.ObjectLongPair) Pair(org.eclipse.collections.api.tuple.Pair) TestFactory(org.junit.jupiter.api.TestFactory)

Aggregations

Values (org.neo4j.values.storable.Values)6 ArrayList (java.util.ArrayList)3 Arrays (java.util.Arrays)3 Collections (java.util.Collections)3 List (java.util.List)3 Stream (java.util.stream.Stream)3 Assertions.assertEquals (org.junit.jupiter.api.Assertions.assertEquals)3 Assertions.assertThrows (org.junit.jupiter.api.Assertions.assertThrows)3 Test (org.junit.jupiter.api.Test)3 Value (org.neo4j.values.storable.Value)3 String.format (java.lang.String.format)2 LocalDate (java.time.LocalDate)2 LocalDateTime (java.time.LocalDateTime)2 ZonedDateTime (java.time.ZonedDateTime)2 Collection (java.util.Collection)2 HashSet (java.util.HashSet)2 Iterator (java.util.Iterator)2 Set (java.util.Set)2 Predicate (java.util.function.Predicate)2 Collectors (java.util.stream.Collectors)2