StaticCoerceStaticCoerceCoerce an ISO-8601 date-time string literal to a Date so range/equality comparisons match Mongo's
native Date-typed fields (BSON compares across types by a fixed order, so a string never matches a
Date). Without this, an incremental-sync watermark predicate like updatedAt >= '2026-03-01T…Z'
silently matched ZERO documents.
BEHAVIOR CHANGE / deliberate trade-off: a field that actually STORES an ISO-looking STRING no longer
matches such a predicate — field >= '<iso>' previously compared string↔string lexicographically, and
now the literal is a Date (which never equals a stored string). This is the mirror of the bug being
fixed; native Date fields are far more common and a watermark predicate needs Date semantics, so a
source that genuinely stores ISO strings must compare via RunNativeQuery (the escape hatch). A
ZONELESS ISO string is interpreted as UTC (via parseIso8601AsUtc), never server-local. Date-only
('2026-03-01') and non-temporal strings pass through unchanged.
StaticComparisonStaticLikeConvert a SQL LIKE pattern to an anchored, regex-escaped pattern (% -> .*, _ -> .).
StaticTranslateTranslate a SQL-WHERE-subset string into a Mongo filter document. Empty -> {}.
Optionaloptions: MongoFilterOptions
Coerce a value for MongoDB when the target field is
_id. Mongo's default_idis a 12-byteObjectId, but MJ carries key/filter values as strings — so{_id: "507f..."}matches nothing. When the field is_idand the value is a 24-char hex string, wrap it as anObjectId. All other fields and non-ObjectId_idshapes (e.g. a string_id) pass through unchanged. Shared by the driver'sLoadSingleand this translator's comparison / IN paths so the behavior is uniform.