internal override void InitializeAsHighest(GenericKey state) { state.InitializeArrayMeta(0); InitializeArray(state, 0, _arrayType); state.IsHighestArray = true; }
internal virtual int ArrayKeySize(GenericKey key, int elementSize) { return(SIZE_ARRAY_LENGTH + key.ArrayLength * elementSize); }
internal override bool ReadValue(PageCursor cursor, int size, GenericKey into) { return(ReadArray(cursor, _arrayType, _arrayElementReader, into)); }
/// <summary> /// In the array case there's nothing lower than a zero-length array, so simply make sure that the key state is initialized /// with state reflecting that. No specific value required. </summary> /// <param name="state"> key state to initialize as lowest of this type. </param> internal override void InitializeAsLowest(GenericKey state) { state.InitializeArrayMeta(0); InitializeArray(state, 0, _arrayType); }
internal virtual void Write(GenericKey state, long nanosOfDayUTC, int offsetSeconds) { state.Long0 = nanosOfDayUTC; state.Long1 = offsetSeconds; }
internal override void PutValue(PageCursor cursor, GenericKey state) { PutArray(cursor, state, ArrayElementWriter); }
internal override void PutValue(PageCursor cursor, GenericKey state) { Put(cursor, state.Long0, state.Long1); }
protected internal override void AddTypeSpecificDetails(StringJoiner joiner, GenericKey state) { joiner.add("isHighestArray=" + state.IsHighestArray); joiner.add("arrayLength=" + state.ArrayLength); joiner.add("currentArrayOffset=" + state.CurrentArrayOffset); }
internal override Value AsValue(GenericKey state) { return(AsValue(state.Long0, state.Long1)); }
internal override int CompareValue(GenericKey left, GenericKey right) { return(Compare(left.Long0, left.Long1, right.Long0, right.Long1)); }
internal override void CopyValue(GenericKey to, GenericKey from) { to.Long0 = from.Long0; to.Long1 = from.Long1; }
internal override int ValueSize(GenericKey state) { return(GenericKey.SizeZonedTime); }
protected internal override void AddTypeSpecificDetails(StringJoiner joiner, GenericKey state) { joiner.add("long0=" + state.Long0); joiner.add("long1=" + state.Long1); }
internal static void PutArray(PageCursor cursor, GenericKey key, ArrayElementWriter writer) { PutArrayHeader(cursor, toNonNegativeShortExact(key.ArrayLength)); PutArrayItems(cursor, key, writer); }
internal override bool ReadValue(PageCursor cursor, int size, GenericKey into) { return(Read(cursor, into)); }
internal static bool ReadArray(PageCursor cursor, Org.Neo4j.Values.Storable.ValueWriter_ArrayType type, ArrayElementReader reader, GenericKey into) { if (!SetArrayLengthWhenReading(into, cursor, cursor.Short)) { return(false); } into.BeginArray(into.ArrayLength, type); for (int i = 0; i < into.ArrayLength; i++) { if (!reader(cursor, into)) { return(false); } } into.EndArray(); return(true); }
internal static bool Read(PageCursor cursor, GenericKey into) { into.WriteTime(cursor.Long, cursor.Int); return(true); }
internal override void CopyValue(GenericKey to, GenericKey from) { CopyValue(to, from, from.ArrayLength); }
internal virtual void Write(GenericKey state, long nanoOfDay) { state.Long0 = nanoOfDay; }