/** * Shared pure row-mapping helpers for the SQL store twins ([ref] S8 纯 helper 归位). * * These were duplicated verbatim across the pg-/tidb- store twin pairs; each store imports the flavor * it was written against (usually under its historical local alias, e.g. `parseJsonStrict as * parseJson`) so call sites and semantics are byte-identical to before. * * THREE parseJson flavors exist ON PURPOSE — they differ in what a corrupted/legacy JSON column * reads back as (lenient → null / strict → throw / fallback value), and the TWO nullable date→ISO * helpers differ in how a non-Date cell is rendered (String() passthrough vs `new Date()` re-parse). * Do NOT collapse them into one. */ /** JSON column → value; a corrupted/legacy JSON column reads back as `null` instead of failing the * read. Non-strings pass through (node-pg parses jsonb → object already). */ export declare function parseJsonLenient(v: unknown): T | null; /** JSON column → value; malformed JSON THROWS. For stores whose write arm keeps the column clean * (R7 终形:协议面拒绝式,库内恒干净,直读). Non-strings pass through (node-pg parses jsonb → * object already). */ export declare function parseJsonStrict(v: unknown): T | null; /** JSON column → value with a caller-supplied fallback for NULL/corrupted cells. Non-strings pass * through (node-pg parses jsonb → object already; tolerate a string just in case). */ export declare function parseJsonOr(v: unknown, fallback: T): T; /** NOT NULL datetime column → ISO string (drivers return Date; a string cell passes through via * String() — NOT re-parsed). */ export declare function toIso(v: unknown): string; /** Nullable twin of {@link toIso} (string cells still pass through verbatim). */ export declare function toIsoOrNull(v: unknown): string | null; /** Nullable datetime column → ISO string, RE-PARSING a string cell via `new Date()` (normalizes a * raw DB datetime string like "2026-01-01 00:00:00" to ISO — unlike {@link toIsoOrNull}, which * passes it through unchanged). */ export declare function normalizeIsoOrNull(v: unknown): string | null; //# sourceMappingURL=sql-row-helpers.d.ts.map