Repository navigation
ExRam.Gremlinq 14.2.0
Features
TinkerPop 3.8
- Gremlinq can now be told which TinkerPop versions the server understands:
IGremlinQueryEnvironment.ServerCompatibilityRangeholds that range. Its first user is the step that filters out everything: for a range from 3.8 on, Gremlinq sendsdiscard(), the name TinkerPop 3.8 gavenone().Discard()is new,None()is obsolete. Without configuration nothing changes. (#2561) - The range is configured on a provider configurator with the same name and shape as on the environment,
ConfigureServerCompatibilityRange(Func<VersionRange, VersionRange>). The transformation is given the range set before it, the provider's default included, so it can also change one end of it. (#2573) - A Neptune user names the engine version with
WithEngineVersion(...)and gets the TinkerPop versions AWS documents for it: 3.7.1 for engines 1.3.2.0 up to 1.4.x, 3.8.0 to 3.8.1 for 1.5.x.NeptuneEngineVersionsnames the known engines. (#2572) - Both can be set from
IConfiguration:Gremlinq:ServerCompatibilityRange:Lowestand:Highestfor every provider set up through the AspNet packages,Gremlinq:Neptune:EngineVersionfor Neptune. (#2579) - Gremlinq now depends on Gremlin.Net 3.8.2. It sends the same requests as before, so TinkerPop 3.7 servers keep working. (#2559)
- TinkerPop 3.8 removed
has(key, traversal); a 3.8 server accepts it, but it never matches. For a range from 3.8 on,Where(x => x.Prop, continuation)and a member compared with a step label now send thewhere()filter a 3.7 server executes for it. (#2564) AggregateLocalsendslocal(aggregate(x))to servers from 3.8 on, since TinkerPop 3.8 removedaggregate(local, x). (#2565)- TinkerPop 3.8 lets a traverser that no
choose()option matches, or whose choice traversal yields nothing, pass through unchanged. For a range from 3.8 on,Chooseadds the two options that keep the semantics of 3.7: the first is filtered, the second fails. (#2566) - From TinkerPop 3.8 on,
limit(local, 1),tail(local, 1)andrange(local, n, n + 1)return a list themselves, so a server from 3.8 on gets the plain step instead of themap(unfold().limit(1).fold())workaround, even withWorkaroundRangeInconsistenciesset. (#2567) - A
gx:OffsetDateTime, which a 3.8 server answers forasDate()anddateAdd(), is now read as aDateTimeOffsetthat keeps its offset. Before, the offset was lost or anobjectgot a string. (#2569) - For a range from 3.8 on, a
DateTimeOffsetis written asgx:OffsetDateTimeinstead ofg:Date. (#2571) - Bytes are read and written by the range. TinkerPop's
Byteis signed, so from 3.8 on ansbyteis written asgx:Byte, abyteas a bare number, and agx:Byteis read as ansbyte. (#2570) - For a range from 3.8 on, strategies and strategy types are written as Gremlin.Net 3.8 writes them. Gremlin Server 3.8.2 cannot read the 3.7 form. (#2575)
Deserialization
- A
g:Mapis now built into any dictionary class with a public parameterless constructor, such asSortedDictionary<,>orSortedList<,>, keys as they were typed. (#2511) - A dictionary is also built through a constructor that takes an
IReadOnlyDictionary<,>, where only a constructor takingIDictionary<,>counted before. (#2526) - A value requested as a generic interface of a scalar type, such as
IEquatable<int>orINumber<int>, is now read as that scalar type instead of being declined. (#2518)
Fixes
- Newtonsoft no longer throws for input it cannot read, such as a number too large for the requested
byteor anullfor anint. It declines the value, or leaves out only the part it cannot read. A type of your own that derives fromProperty<T>is read likeProperty<T>. (#2505) - A dictionary keeps a
nullvalue when its value type can hold one, from ag:Mapas from a plain object. It is a realnull, never aJValue. (#2506) - A typed value such as a
g:Int32is no longer read as a dictionary of its@typeand@value. Only ag:Mapis a map, and a collection of key-value pairs gets the same answer as aDictionary<string, object>. (#2507) - A
g:Mapwhose keys are not names keeps its entries when requested as the non-genericIDictionary,ICollectionorIEnumerable. (#2508) - A
g:Listrequested as anImmutableArray<T>now holds its items instead of coming back uninitialized. A generic collection interface ofobjectgets aList<object>, so anIList<object>takesAddandRemove. (#2512) - A number is read as an enum only where it fits the enum's underlying type. Before, it was cut to that size and became another value.
trueandfalseare no enum values any more, and aulongenum can hold its largest value. (#2513) - A dictionary without a public parameterless constructor, such as an
ImmutableSortedDictionary<int, string>or aReadOnlyDictionary<int, string>, keeps all entries of ag:Mapwhose keys are not names. (#2520) - The same holds for a class that implements
IReadOnlyDictionary<,>but noIDictionary<,>. (#2524) - A
where()on a scalar no longer drops itsis()step when anIPFactoryreturnsP.Without(...)with values. (#2582) - A converter reached through two nested
defercalls now gets the whole converter chain as itsrecursetransformer, so arecursecall from there no longer skips the converters registered after that point. (#2585) GraphModel.FromBaseTypesnow says which type is the vertex base type and which the edge base type when it rejects base types in each other's hierarchy. (#2583)
Performance
- Typed
g:Treevalues are read faster: the tree converter reads them itself, without a detour through the typed-value converter per level. (#2527) - Serializing a query takes about a third less time: the converter chain is found in two thirds of the time, and the serializer looks an instruction's expansion up once instead of twice. (#2586)
- Serializing a query that writes properties, projects a tuple or has a collection predicate allocates less. (#2587)
- Building a query allocates less and takes less time: a continuation creates its anonymous query only when it runs one, and the label projections of a continuation that added no label are not merged. (#2588)
- A constant that is an expression, as
x.Age > age + 1orids[0], is read in about a microsecond instead of a hundred: it is read directly or interpreted instead of being compiled into a method that runs once. (#2589) - On the request path, a request is serialized before the connection's send lock is taken, the
Task.Yield()per response is gone, theMetaResponse<T>decision is made once per result type, and a default cancellation token no longer links a token source. (#2590) - A received WebSocket message costs one pooled object instead of an owner per doubling and a
Taskper receive, and the send and the receive of a request run as pooledValueTasks. (#2591)
Maintenance
- The docs of
Diffsay that the result is in the unit the server uses: seconds up to TinkerPop 3.7, milliseconds from 3.8 on. (#2568)
Full changelog: 14.1.2...14.2.0