Repository navigation
Marten 9.48.0
Document diagnostics: filter and order by document properties (#869, #5631)
IDocumentStoreDiagnostics.QueryDocumentsAsync now applies DocumentQueryOptions.Where / OrderBy / Arguments instead of refusing them. The text goes onto Query<T>() through JasperFx 2.84.0's Dynamic LINQ helper, so member casing, enum storage, duplicated fields, conjoined tenancy, soft deletes and hierarchies are Marten's own; only the SELECT list is swapped for the diagnostics read's columns, so the JSON comes back byte-exact with its metadata, and the total counts the filtered rows. Operator text is never spliced into SQL, and the read issues no DDL.
Measured against a LINQ-to-objects oracle over 83 shapes and three storage configurations; every shape is either right or refused:
- Refused: range comparisons on, and ordering by, an enum stored as its name (string serializer storage or a varchar duplicated field), and
<>/ a negated comparison on a nullable member unless the text says what null should do (JasperFx'sSqlNullSemantics). Date-part members and inlinein (…)lists are refused honestly by the provider. - Fixed rather than refused: criteria orderings put nulls first ascending, as .NET does (PostgreSQL defaults to last), and
DateTimearguments compare correctly againsttimestamp without time zonelocators. - String ordering follows the database's collation (note: Alpine images use musl and sort bytewise).
- Under Native AOT, criteria are refused.
Fixes
- Grouped projections translate
Count/LongCountpredicates through the Where parser, with null semantics and bound parameters (#5625). - A quick-mode
StartStreamthat loses a race for the same stream id now throwsExistingStreamIdCollisionExceptioninstead of a raw 23505, soQuickWithServerTimestampsbehaves like Rich and Quick (#5628).
Dependencies
JasperFx 2.84.0