Gremlinq.Extensions 14.1.2

Gremlinq.Extensions 14.1.2 is built against ExRam.Gremlinq 14.1.2. See the ExRam.Gremlinq 14.1.2 release notes for what changed there. (#236)

Fixes

All but the last entry concern the System.Text.Json support in Gremlinq.Extensions.Support.SystemTextJson.

  • A value the requested type cannot read now makes the System.Text.Json converter decline instead of throwing, so one unreadable item no longer fails the whole result set. T, Direction, Merge and the other Gremlin.Net enumerations are now deserialized, and a gx:BigInteger no longer comes back as zero. (#193)
  • A value of a Gremlin enumeration that Gremlin.Net has no name for, such as a newer server's new value, is now read as a value of that enumeration. (#212)
  • A null in a result array is now kept instead of being dropped. (#198)
  • A null in a g:BulkSet is now kept, together with its bulk, instead of being dropped. (#199)
  • A g:BulkSet with an odd number of entries no longer throws an IndexOutOfRangeException. The well-formed pairs are read. (#201)
  • A g:BulkSet can now be read into any generic collection, such as List<T>, ISet<T> or ImmutableList<T>. It used to throw an InvalidCastException. (#202)
  • A g:BulkSet can now be read into ArrayList, Queue, Stack, ICollection and IList. It used to throw an InvalidCastException. (#204)
  • A g:BulkSet whose type name arrives in another case, such as G:BULKSET, is now read as a bulk set. (#200)
  • A g:Map whose type name arrives in another case, such as G:MAP, is now read into a dictionary (#203) and into an object (#205).
  • An elementMap() of a vertex with a label the model does not know keeps its id and label when it is read as an object. (#206)
  • A g:Map keyed by something other than strings, such as ints, keeps its entries when it is read as an object. It now comes back as a Dictionary<object, object>. (#207)
  • A map or object with a key that appears twice is now read, the last occurrence counting, instead of failing the whole result set with an ArgumentException. (#216)
  • When a name appears twice with different case, such as age and Age, the last one now fills the member, as with Newtonsoft.Json. (#210)
  • GraphSON's own member names (key, value, id, label, properties, bulk) are now matched exactly. A map of your own with members named Key and Value is no longer mistaken for a property. (#208)
  • A g:T counts as a T only when its value is exactly id, key, label or value. (#209)
  • A JSON null requested as a string is no longer read as an empty string. A null string property now stays null. (#214)
  • A .NET enum stored as the name of one of its values, such as "Female", is now read. It used to be left unset without any error. (#215)
  • A scalar is now read from everything Newtonsoft.Json reads it from, such as a bool from 1 or an int from 3.0. Such members used to silently keep their default. (#217)
  • A value requested as a base type or an interface, such as IComparable or the non-generic IEnumerable, now comes back as it does with Newtonsoft.Json. It used to come back empty, as a raw JsonElement or as a different kind of collection. (#218)
  • Coalesce(...) with a single sub-query no longer changes what that sub-query returns, in the CosmosDb provider too. Map(...) and Project(...).By(...) also leave out steps that change nothing. (#213)

Performance

  • The System.Text.Json support now reads GraphSON arrays in linear instead of quadratic time. A 1000-entry g:BulkSet now takes 0.33 ms instead of 12.3 ms. (#221)

Full changelog: https://github.com/Gremlinq/Gremlinq.Extensions/compare/14.1.1...14.1.2

ExRam.Gremlinq 14.1.2

Fixes

  • A value the requested type cannot read, such as "not a date" asked for as a DateTime, is now skipped like any other unconvertible item instead of failing the whole result set. (#2438)
  • A deserialization converter that throws no longer leaves a query waiting forever. The query now fails with the converter's exception, and the pool builds a fresh client for the next one. (#2439)
  • Direction, Merge, T and Gremlin.Net's other EnumWrapper types are now deserialized, where they used to fail or come back as the bare string. (#2440)
  • A value of a Gremlin enumeration that Gremlin.Net has no name for, such as a newer server's new value, is now read as a value of that enumeration instead of being lost. (#2470)
  • GraphSON arrays now deserialize into ArrayList, Queue and Stack, with their items converted like those of every other collection. (#2444)
  • A g:Map requested as an IImmutableDictionary<,> or ImmutableDictionary<,> no longer comes back empty. Building a Dictionary<,> from a map also allocates less. (#2445)
  • A g:Map keyed by something other than strings, such as ints, keeps its entries when requested as an object. It now comes back as a Dictionary<object, object>. (#2459)
  • A g:Map with a key that appears twice is now read, the last occurrence counting, instead of failing the whole result set with an ArgumentException. (#2480)
  • Traversers are now expanded into every collection type, such as ImmutableList<T>, ISet<T> or Queue<T>, where a bulked result used to throw. (#2447)
  • A g:BulkSet read into anything other than an array, such as a List<int>, now expands its bulks instead of returning the counts mixed in with the values. (#2453)
  • A null in a result array is now kept instead of being dropped, so the script and bytecode paths finally return the same results. (#2448)
  • A null in a g:BulkSet is now kept, together with its bulk, instead of being dropped. (#2449)
  • A value/bulk pair in a g:BulkSet whose bulk cannot be read is now skipped, instead of the value being emitted once. (#2451)
  • A g:BulkSet with an odd number of entries no longer throws an ArgumentOutOfRangeException. The well-formed pairs are read and the dangling element is skipped. (#2452)
  • A traverser is now only recognised when its envelope is spelled @type and @value, as every other typed value already was. Server output is unaffected. (#2460)
  • GraphSON's own member names (key, value, id, label, properties, bulk) are now matched exactly. A map of your own with members named Key and Value is no longer mistaken for a property. (#2466)
  • A g:T whose value is not exactly id, key, label or value no longer makes deserialization throw. (#2467)
  • Coalesce(...) with a single sub-query no longer changes what that sub-query returns. Coalesce(__ => __.Out<WorksFor>().Limit(1)) used to return one vertex in total instead of up to one per incoming element; it is now emitted as a flatMap(...). (#2474)
  • Named step labels no longer change the names of generated step labels, so the text of a query no longer depends on how many named labels come before. (#2497)

Performance

  • Map(...) and Project(...).By(...) no longer emit a trailing limit(1), since both only take the first result anyway. (#2473)
  • Project(...).By(...) no longer emits a map() that wraps the whole by() traversal. (#2475)
  • Slicing a Traversal no longer recounts the write steps of the slice, so cutting a read-only traversal no longer costs as much as it is long. (#2472)

Full changelog: https://github.com/Gremlinq/ExRam.Gremlinq/compare/14.1.1...14.1.2

ExRam.Gremlinq 14.1.1

Changes

  • Stop and Dispose Testcontainers container through executor/client-factory disposal (#2417)
  • Handle concurrent dispose/creation during container creation (#2416)
  • Consolidate dependencies (#2413)
  • Update TestContainers (#2412)
  • Save allocation of a separate StepLabel identity (#2411)
  • Enable GitHub Actions Test reporting through Microsoft.Testing.Platform (#2409)
  • Switch NuGet.org publishing to Trusted Publishing (OIDC) (#2408)

ExRam.Gremlinq 14.1.0

Changes

  • Cache empty VStep and EStep (#2400)
  • Reuse underlying list in Traversal instead of creating a new one in every case (#2398)
  • Optimize FastImmutableList.Push (#2397, #2399)

ExRam.Gremlinq 14.0.0

Changes

ExRam.Gremlinq 14 contains a few breaking changes. Most of them have already been communicated by ObsoleteAttribute-markers in recent releases in the 13.x-line.

  • CosmosDb provider packages have moved to Gremlinq.Extensions

  • Optimize Step-serialization (#2392)

  • Previous Behavior: Steps were tried to serialize multiple times for various target types (Instruction, Step[], etc.), leading to unnecessary (failed) lookups. Furthermore, since the order of these target types was fixed, it was impossible to override Step serialization when the target types did not fit (or supersede each other in a specific way).
  • New Behavior: Step is now serialized to the object target type. The resulting instance is then handled based on its actual type.
  • Possibly breaking change for Custom IConverterFactory Implementations: Custom IConverterFactory implementations that previously reacted to specific target types must now recognize requests for the object target type and determine if they can satisfy the conversion. This change ensures compatibility with the new serialization approach while maintaining flexibility for custom converters.

  • Rename edge-creation query surface from IInOrOutEdgeGremlinQuery to IAddEdgeGremlinQuery (#2357) The previous naming was confusing, seemingly indicating a base interface type for an edge that is not known to be an in or out edge, when actually, the sole purpose of that interface was to be returned by the AddE-operator to enable fluent calls to To or From.

  • Remove StringComparisonTranslationStrictness (#2372) Gremlinq will always behave as if StringComparisonTranslationStrictness.Strict was configured. Queries using a string comparison which is not supported on a specific database provider (e.g. case insensitive queries on Azure CosmosDb) must be modified accordingly. StringComparisonTranslationStrictness was already marked obsolete in later 13.x versions.

  • Rename extension classes (#2358) Classes named ConfigurableGremlinQuerySourceExtensions are renamed to GremlinQuerySourceExtensions.

  • Drop .NET 6, 7 (#2360, #2361) These target frameworks are no longer supported by Microsoft.

  • Add support for ElementMap operator (#2385, #2386, #2393)

  • Add Key deserialization support (#2384)

  • Implement IEquatable on Key because it's there already. (#2387)

ExRam.Gremlinq 13.8.2

⚠️ CosmosDb provider packages will be moving to Gremlinq.Extensions ⚠️

The UseCosmosDb(...)-extensions in ExRam.Gremlinq.Providers.CosmosDb and ExRam.Gremlinq.Providers.CosmosDb.AspNet are marked obsolete in this release. They, along with the projects/packages, will be removed entirely in v14.

The packages are continuing their life on the Gremlinq.Extensions paid private NuGet feed, available from version 13.9.0 onwards under the same package names - so upgrading is a one-line change to your package references with no API changes required.

To silence the obsolescence warning and prepare for v14, either stay on a version <= 13.8.1, or subscribe to any Gremlinq.Extensions offer, configure the private feed with your license key, and update your package references to 13.9.0 or later.

Full transition details: https://docs.gremlinq.net/cosmosdb-provider-packages/