@prisma-next/target-postgres 0.16.0-dev.33 → 0.16.0-dev.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/{authoring-DnO1B0N9.mjs → authoring-DL-Y8A7_.mjs} +5 -5
- package/dist/{authoring-DnO1B0N9.mjs.map → authoring-DL-Y8A7_.mjs.map} +1 -1
- package/dist/codec-descriptor-C4SaWX0P.d.mts +36 -0
- package/dist/codec-descriptor-C4SaWX0P.d.mts.map +1 -0
- package/dist/codec-descriptor-cuAuPE0Y.mjs +142 -0
- package/dist/codec-descriptor-cuAuPE0Y.mjs.map +1 -0
- package/dist/codec-descriptor.d.mts +2 -0
- package/dist/codec-descriptor.mjs +2 -0
- package/dist/{codec-types-DdoPc2dy.d.mts → codec-types-Bstec0HR.d.mts} +9 -8
- package/dist/codec-types-Bstec0HR.d.mts.map +1 -0
- package/dist/codec-types.d.mts +1 -1
- package/dist/{codecs-Deand7sy.mjs → codecs-C-VA-quH.mjs} +228 -40
- package/dist/codecs-C-VA-quH.mjs.map +1 -0
- package/dist/{codecs-CGE5dh94.d.mts → codecs-Cd4TftwI.d.mts} +82 -29
- package/dist/codecs-Cd4TftwI.d.mts.map +1 -0
- package/dist/codecs.d.mts +4 -2
- package/dist/codecs.d.mts.map +1 -1
- package/dist/codecs.mjs +4 -2
- package/dist/codecs.mjs.map +1 -1
- package/dist/contract-free.mjs +2 -2
- package/dist/{control-policy-DEwdS3oK.mjs → control-policy-DMZVl4x7.mjs} +8 -8
- package/dist/{control-policy-DEwdS3oK.mjs.map → control-policy-DMZVl4x7.mjs.map} +1 -1
- package/dist/control.mjs +9 -9
- package/dist/{ddl-BQC6u-L9.mjs → ddl-Db1JOIMn.mjs} +2 -2
- package/dist/{ddl-BQC6u-L9.mjs.map → ddl-Db1JOIMn.mjs.map} +1 -1
- package/dist/{descriptor-meta-DGlJurgA.mjs → descriptor-meta-AnueS0OA.mjs} +4 -4
- package/dist/{descriptor-meta-DGlJurgA.mjs.map → descriptor-meta-AnueS0OA.mjs.map} +1 -1
- package/dist/{diff-database-schema-qRPwuYBH.mjs → diff-database-schema-CluGQkmh.mjs} +8 -8
- package/dist/{diff-database-schema-qRPwuYBH.mjs.map → diff-database-schema-CluGQkmh.mjs.map} +1 -1
- package/dist/diff-database-schema.mjs +1 -1
- package/dist/{errors-DBSNx7EJ.mjs → errors-l1usFTuz.mjs} +2 -2
- package/dist/{errors-DBSNx7EJ.mjs.map → errors-l1usFTuz.mjs.map} +1 -1
- package/dist/errors.d.mts +1 -1
- package/dist/errors.mjs +1 -1
- package/dist/issue-planner.mjs +1 -1
- package/dist/migration.mjs +2 -2
- package/dist/{op-factory-call-CIaPDDUc.mjs → op-factory-call-Cm13qr4w.mjs} +7 -7
- package/dist/{op-factory-call-CIaPDDUc.mjs.map → op-factory-call-Cm13qr4w.mjs.map} +1 -1
- package/dist/op-factory-call.mjs +1 -1
- package/dist/pack.d.mts +2 -2
- package/dist/pack.mjs +1 -1
- package/dist/{planner-BhnkIJX-.mjs → planner-CB0e-x6l.mjs} +9 -9
- package/dist/{planner-BhnkIJX-.mjs.map → planner-CB0e-x6l.mjs.map} +1 -1
- package/dist/{planner-ddl-builders-CVo3L7Nd.mjs → planner-ddl-builders-DX8DHY8D.mjs} +4 -4
- package/dist/{planner-ddl-builders-CVo3L7Nd.mjs.map → planner-ddl-builders-DX8DHY8D.mjs.map} +1 -1
- package/dist/planner-ddl-builders.mjs +1 -1
- package/dist/{planner-produced-postgres-migration-BE3EJIRK.mjs → planner-produced-postgres-migration-B0i-PVar.mjs} +3 -3
- package/dist/{planner-produced-postgres-migration-BE3EJIRK.mjs.map → planner-produced-postgres-migration-B0i-PVar.mjs.map} +1 -1
- package/dist/planner-produced-postgres-migration.mjs +1 -1
- package/dist/{planner-sql-checks-CmiQ6Nei.mjs → planner-sql-checks-D3Xsln1p.mjs} +3 -3
- package/dist/{planner-sql-checks-CmiQ6Nei.mjs.map → planner-sql-checks-D3Xsln1p.mjs.map} +1 -1
- package/dist/planner-sql-checks.mjs +1 -1
- package/dist/planner.mjs +2 -2
- package/dist/{postgres-contract-view-BeIEyZfD.mjs → postgres-contract-view-v-zxqBtj.mjs} +4 -4
- package/dist/{postgres-contract-view-BeIEyZfD.mjs.map → postgres-contract-view-v-zxqBtj.mjs.map} +1 -1
- package/dist/{postgres-migration--BzvpA92.mjs → postgres-migration-D_6w1hJj.mjs} +5 -5
- package/dist/{postgres-migration--BzvpA92.mjs.map → postgres-migration-D_6w1hJj.mjs.map} +1 -1
- package/dist/{postgres-native-enum-BwVNf0Ku.mjs → postgres-native-enum-DqjHPN11.mjs} +2 -2
- package/dist/{postgres-native-enum-BwVNf0Ku.mjs.map → postgres-native-enum-DqjHPN11.mjs.map} +1 -1
- package/dist/{postgres-role-schema-node-bg32e7I-.mjs → postgres-role-schema-node-DOkim7QI.mjs} +3 -3
- package/dist/{postgres-role-schema-node-bg32e7I-.mjs.map → postgres-role-schema-node-DOkim7QI.mjs.map} +1 -1
- package/dist/{postgres-schema-CTplQZDK.mjs → postgres-schema-DAhXnFac.mjs} +4 -4
- package/dist/{postgres-schema-CTplQZDK.mjs.map → postgres-schema-DAhXnFac.mjs.map} +1 -1
- package/dist/{postgres-table-schema-node-D6LvInCe.mjs → postgres-table-schema-node-DXzwiu16.mjs} +2 -2
- package/dist/{postgres-table-schema-node-D6LvInCe.mjs.map → postgres-table-schema-node-DXzwiu16.mjs.map} +1 -1
- package/dist/{render-ops-TcY9XEkz.mjs → render-ops-DIjVRr1-.mjs} +2 -2
- package/dist/{render-ops-TcY9XEkz.mjs.map → render-ops-DIjVRr1-.mjs.map} +1 -1
- package/dist/render-ops.mjs +1 -1
- package/dist/{resolve-ddl-schema-BAsJEKW8.mjs → resolve-ddl-schema-nTvL_9Nq.mjs} +2 -2
- package/dist/{resolve-ddl-schema-BAsJEKW8.mjs.map → resolve-ddl-schema-nTvL_9Nq.mjs.map} +1 -1
- package/dist/runtime.mjs +1 -1
- package/dist/schema-ir-annotations.mjs +1 -1
- package/dist/{sql-utils-B2lzkKfP.mjs → sql-utils-CuKSscKn.mjs} +2 -2
- package/dist/{sql-utils-B2lzkKfP.mjs.map → sql-utils-CuKSscKn.mjs.map} +1 -1
- package/dist/sql-utils.mjs +1 -1
- package/dist/types.mjs +4 -4
- package/package.json +21 -20
- package/src/core/codec-descriptor.ts +318 -0
- package/src/core/codec-type-map.ts +12 -14
- package/src/core/codecs.ts +232 -39
- package/src/core/registry.ts +4 -0
- package/src/exports/codec-descriptor.ts +11 -0
- package/src/exports/codecs.ts +4 -1
- package/dist/codec-types-DdoPc2dy.d.mts.map +0 -1
- package/dist/codecs-CGE5dh94.d.mts.map +0 -1
- package/dist/codecs-Deand7sy.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codecs-C-VA-quH.mjs","names":["arktype"],"sources":["../src/core/codec-helpers.ts","../src/core/codecs.ts"],"sourcesContent":["/**\n * Shared encode/decode/render constants for the Postgres target codecs.\n *\n * The codec implementations live in `codecs.ts` (TML-2357). This file retains the conversion helpers + emit-path type renderers that the codec methods compose with — keeping a single source of truth for non-trivial conversions while the codec methods provide the framework-required `Promise<…>` boundary.\n *\n * Trivial identity passthroughs are inlined directly in the codec methods; only conversions with shape (custom JSON round-trip, decode normalisation, parameterised renderers) live here.\n */\n\nimport type { JsonValue } from '@prisma-next/contract/types';\nimport { postgresError } from './errors';\n\nexport function renderLength(\n typeName: string,\n typeParams: Record<string, unknown>,\n): string | undefined {\n const length = typeParams['length'];\n if (length === undefined) {\n return undefined;\n }\n if (typeof length !== 'number' || !Number.isFinite(length) || !Number.isInteger(length)) {\n throw postgresError(\n 'RUNTIME.TYPE_PARAMS_INVALID',\n `renderOutputType: expected integer \"length\" in typeParams for ${typeName}, got ${String(length)}`,\n { meta: { nativeType: typeName, param: 'length', received: String(length) } },\n );\n }\n return `${typeName}<${length}>`;\n}\n\nexport function renderPrecision(typeName: string, typeParams: Record<string, unknown>): string {\n const precision = typeParams['precision'];\n if (precision === undefined) {\n return typeName;\n }\n if (\n typeof precision !== 'number' ||\n !Number.isFinite(precision) ||\n !Number.isInteger(precision)\n ) {\n throw postgresError(\n 'RUNTIME.TYPE_PARAMS_INVALID',\n `renderOutputType: expected integer \"precision\" in typeParams for ${typeName}, got ${String(precision)}`,\n { meta: { nativeType: typeName, param: 'precision', received: String(precision) } },\n );\n }\n return `${typeName}<${precision}>`;\n}\n\nexport const pgNumericDecode = (wire: string | number): string => {\n if (typeof wire === 'number') return String(wire);\n return wire;\n};\n\nexport const pgNumericRenderOutputType = (typeParams: {\n readonly precision?: number;\n readonly scale?: number;\n}): string | undefined => {\n const precision = typeParams.precision;\n if (precision === undefined) return undefined;\n if (\n typeof precision !== 'number' ||\n !Number.isFinite(precision) ||\n !Number.isInteger(precision)\n ) {\n throw postgresError(\n 'RUNTIME.TYPE_PARAMS_INVALID',\n `renderOutputType: expected integer \"precision\" in typeParams for Numeric, got ${String(precision)}`,\n { meta: { nativeType: 'Numeric', param: 'precision', received: String(precision) } },\n );\n }\n const scale = typeParams.scale;\n if (scale === undefined) return `Numeric<${precision}>`;\n if (typeof scale !== 'number' || !Number.isFinite(scale) || !Number.isInteger(scale)) {\n throw postgresError(\n 'RUNTIME.TYPE_PARAMS_INVALID',\n `renderOutputType: expected integer \"scale\" in typeParams for Numeric, got ${String(scale)}`,\n { meta: { nativeType: 'Numeric', param: 'scale', received: String(scale) } },\n );\n }\n return `Numeric<${precision}, ${scale}>`;\n};\n\nconst ISO_8601_TIMESTAMP = /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?$/;\nconst ISO_8601_TIMESTAMPTZ =\n /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?(?:Z|[+-]\\d{2}:\\d{2})$/;\n\nexport const pgTimestampEncodeJson = (value: Date): JsonValue => value.toISOString().slice(0, -1);\nexport const pgTimestampDecodeJson = (json: JsonValue): Date => {\n if (typeof json !== 'string') {\n throw postgresError(\n 'RUNTIME.DECODE_FAILED',\n `Expected ISO date string for pg/timestamp@1, got ${typeof json}`,\n { meta: { codecId: 'pg/timestamp@1', received: typeof json } },\n );\n }\n if (!ISO_8601_TIMESTAMP.test(json)) {\n throw postgresError(\n 'RUNTIME.DECODE_FAILED',\n `Invalid ISO date string for pg/timestamp@1: ${json}`,\n { meta: { codecId: 'pg/timestamp@1', received: json } },\n );\n }\n const date = new Date(`${json}Z`);\n if (Number.isNaN(date.getTime())) {\n throw postgresError(\n 'RUNTIME.DECODE_FAILED',\n `Invalid ISO date string for pg/timestamp@1: ${json}`,\n { meta: { codecId: 'pg/timestamp@1', received: json } },\n );\n }\n return date;\n};\n\nexport const pgTimestamptzEncodeJson = (value: Date): JsonValue =>\n value.toISOString().replace(/Z$/, '+00:00');\nexport const pgTimestamptzDecodeJson = (json: JsonValue): Date => {\n if (typeof json !== 'string') {\n throw postgresError(\n 'RUNTIME.DECODE_FAILED',\n `Expected ISO date string for pg/timestamptz@1, got ${typeof json}`,\n { meta: { codecId: 'pg/timestamptz@1', received: typeof json } },\n );\n }\n if (!ISO_8601_TIMESTAMPTZ.test(json)) {\n throw postgresError(\n 'RUNTIME.DECODE_FAILED',\n `Invalid ISO date string for pg/timestamptz@1: ${json}`,\n { meta: { codecId: 'pg/timestamptz@1', received: json } },\n );\n }\n const date = new Date(json);\n if (Number.isNaN(date.getTime())) {\n throw postgresError(\n 'RUNTIME.DECODE_FAILED',\n `Invalid ISO date string for pg/timestamptz@1: ${json}`,\n { meta: { codecId: 'pg/timestamptz@1', received: json } },\n );\n }\n return date;\n};\n\nconst ISO_8601_DATE = /^(\\d{4})-(\\d{2})-(\\d{2})$/;\n\nfunction formatDateOnly(year: number, month: number, day: number): string {\n return `${String(year).padStart(4, '0')}-${String(month).padStart(2, '0')}-${String(day).padStart(2, '0')}`;\n}\n\n/**\n * A Postgres `date` has no time-of-day or timezone component, so `pg/date@1`\n * canonicalizes its JS-level value as a `Date` at UTC midnight\n * (`Date.UTC(y, m, d)`), independent of the process's local timezone.\n *\n * `pgDateEncode` reads the calendar date via UTC getters (matching that\n * canonical form) and formats it as `YYYY-MM-DD` directly, bypassing the pg\n * driver's own `Date` serialization (`dateToString`), which reads *local*\n * getters and would shift the calendar day near midnight in negative-UTC-offset\n * environments.\n */\nexport const pgDateEncode = (value: Date): string =>\n formatDateOnly(value.getUTCFullYear(), value.getUTCMonth() + 1, value.getUTCDate());\n\n/**\n * Normalizes the pg driver's already-parsed `Date` for a `date` column into\n * the canonical UTC-midnight form. The driver (via `postgres-date`) builds\n * that `Date` at *local* midnight from the wire text; reading it back with the\n * same (local) getters recovers the exact calendar date the driver parsed,\n * and reconstructing via `Date.UTC` makes the result's instant independent of\n * the process's timezone.\n */\nexport const pgDateDecode = (wire: Date): Date =>\n new Date(Date.UTC(wire.getFullYear(), wire.getMonth(), wire.getDate()));\n\nexport const pgDateEncodeJson = (value: Date): JsonValue => pgDateEncode(value);\n\nexport const pgDateDecodeJson = (json: JsonValue): Date => {\n if (typeof json !== 'string') {\n throw postgresError(\n 'RUNTIME.DECODE_FAILED',\n `Expected date string for pg/date@1, got ${typeof json}`,\n { meta: { codecId: 'pg/date@1', received: typeof json } },\n );\n }\n const match = ISO_8601_DATE.exec(json);\n if (!match) {\n throw postgresError('RUNTIME.DECODE_FAILED', `Invalid date string for pg/date@1: ${json}`, {\n meta: { codecId: 'pg/date@1', received: json },\n });\n }\n const [, yearText, monthText, dayText] = match;\n const year = Number(yearText);\n const month = Number(monthText) - 1;\n const day = Number(dayText);\n const date = new Date(Date.UTC(year, month, day));\n if (date.getUTCFullYear() !== year || date.getUTCMonth() !== month || date.getUTCDate() !== day) {\n throw postgresError('RUNTIME.DECODE_FAILED', `Invalid date string for pg/date@1: ${json}`, {\n meta: { codecId: 'pg/date@1', received: json },\n });\n }\n return date;\n};\n\nexport const pgIntervalDecode = (wire: string | Record<string, unknown>): string => {\n if (typeof wire === 'string') return wire;\n return JSON.stringify(wire);\n};\n\nexport const pgByteaEncodeJson = (value: Uint8Array): JsonValue =>\n `\\\\x${Buffer.from(value).toString('hex')}`;\n\nexport const pgByteaDecodeJson = (value: JsonValue): Uint8Array => {\n if (typeof value !== 'string' || !value.startsWith('\\\\x')) {\n throw postgresError(\n 'RUNTIME.DECODE_FAILED',\n `Expected Postgres bytea hex text to start with \"\\\\x\"`,\n { meta: { codecId: 'pg/bytea@1' } },\n );\n }\n\n const hex = value.slice(2);\n if (hex.length % 2 !== 0) {\n throw postgresError(\n 'RUNTIME.DECODE_FAILED',\n `Invalid Postgres bytea hex text length: ${hex.length}`,\n { meta: { codecId: 'pg/bytea@1', received: hex.length } },\n );\n }\n\n const bytes = new Uint8Array(hex.length / 2);\n for (let offset = 0; offset < hex.length; offset += 2) {\n const pair = hex.slice(offset, offset + 2);\n if (!/^[0-9a-fA-F]{2}$/.test(pair)) {\n throw postgresError(\n 'RUNTIME.DECODE_FAILED',\n `Invalid Postgres bytea hex pair \"${pair}\" at offset ${offset}`,\n { meta: { codecId: 'pg/bytea@1', received: pair } },\n );\n }\n bytes[offset / 2] = Number.parseInt(pair, 16);\n }\n return bytes;\n};\n\nexport const pgJsonEncode = (value: string | JsonValue): string => JSON.stringify(value);\nexport const pgJsonDecode = (wire: string | JsonValue): JsonValue =>\n typeof wire === 'string' ? JSON.parse(wire) : wire;\n\nexport const pgJsonbEncode = (value: string | JsonValue): string => JSON.stringify(value);\nexport const pgJsonbDecode = (wire: string | JsonValue): JsonValue =>\n typeof wire === 'string' ? JSON.parse(wire) : wire;\n","/**\n * Native Postgres target codecs (TML-2357). Mirrors the SQL base codec form in `packages/2-sql/4-lanes/relational-core/src/ast/sql-codecs.ts`.\n *\n * Each codec ships as three artifacts:\n *\n * 1. A `PgXCodec` class extending {@link CodecImpl} that wraps the module-level encode/decode/encodeJson/decodeJson constants exported from `codec-helpers.ts` (the single source of truth for non-trivial runtime conversions; trivial identity passthroughs are inlined). 2. A `PgXDescriptor` class extending {@link PostgresCodecDescriptor} declaring the codec id, traits, target types, params schema, meta, native type, current scalar JSON projection, and (where applicable) the emit-path `renderOutputType`. 3. A per-codec column helper (`pgXColumn`) that calls `descriptor.factory(...)` directly and packages the result into a framework `ColumnSpec` via the framework {@link column} packager. The helper is tied to its descriptor with `satisfies ColumnHelperFor` (and `ColumnHelperForStrict` where the resolved codec type is well-defined).\n *\n * After TML-2357 this is the canonical source of Postgres codec metadata and runtime behaviour — the legacy `mkCodec` / `defineCodec` carriers (and the parallel `byScalar`/`codecDescriptorDefinitions`/ `codecDescriptorList` collection exports) retired with the deletion sweep.\n *\n * Audit (parameterized codecs): every parameterized codec in this file is **parameter-stateless** — the params (`length`, `precision`, `precision`+`scale`, `values`) only inform the emit-path `renderOutputType` renderer or stay as JSON metadata. None of the runtime encode/decode/encodeJson/decodeJson conversions thread params into their behavior, so each `factory(_params)` returns a fresh codec constructed solely from\n * `this` (the descriptor).\n */\n\nimport type { JsonValue } from '@prisma-next/contract/types';\nimport {\n type CodecCallContext,\n CodecImpl,\n type CodecInstanceContext,\n type CodecMeta,\n type ColumnHelperFor,\n type ColumnHelperForStrict,\n column,\n renderTsLiteral,\n voidParamsSchema,\n} from '@prisma-next/framework-components/codec';\nimport { UNBOUND_NAMESPACE_ID } from '@prisma-next/framework-components/ir';\nimport {\n type ProjectionExpr,\n SqlCharCodec,\n SqlFloatCodec,\n SqlIntCodec,\n SqlVarcharCodec,\n sqlCharDescriptor,\n sqlFloatDescriptor,\n sqlIntDescriptor,\n sqlTextDescriptor,\n sqlTimestampDescriptor,\n sqlVarcharDescriptor,\n} from '@prisma-next/sql-relational-core/ast';\nimport { blindCast } from '@prisma-next/utils/casts';\nimport type { StandardSchemaV1 } from '@standard-schema/spec';\nimport { type as arktype } from 'arktype';\nimport { definePostgresCodecs, PostgresCodecDescriptor, postgresCodec } from './codec-descriptor';\nimport {\n pgByteaDecodeJson,\n pgByteaEncodeJson,\n pgDateDecode,\n pgDateDecodeJson,\n pgDateEncode,\n pgDateEncodeJson,\n pgIntervalDecode,\n pgJsonbDecode,\n pgJsonbEncode,\n pgJsonDecode,\n pgJsonEncode,\n pgNumericDecode,\n pgNumericRenderOutputType,\n pgTimestampDecodeJson,\n pgTimestampEncodeJson,\n pgTimestamptzDecodeJson,\n pgTimestamptzEncodeJson,\n renderLength,\n renderPrecision,\n} from './codec-helpers';\nimport {\n PG_BIT_CODEC_ID,\n PG_BOOL_CODEC_ID,\n PG_BYTEA_CODEC_ID,\n PG_CHAR_CODEC_ID,\n PG_DATE_CODEC_ID,\n PG_ENUM_CODEC_ID,\n PG_FLOAT_CODEC_ID,\n PG_FLOAT4_CODEC_ID,\n PG_FLOAT8_CODEC_ID,\n PG_INET_CODEC_ID,\n PG_INT_CODEC_ID,\n PG_INT2_CODEC_ID,\n PG_INT4_CODEC_ID,\n PG_INT8_CODEC_ID,\n PG_INTERVAL_CODEC_ID,\n PG_JSON_CODEC_ID,\n PG_JSONB_CODEC_ID,\n PG_NUMERIC_CODEC_ID,\n PG_TEXT_ARRAY_CODEC_ID,\n PG_TEXT_CODEC_ID,\n PG_TIME_CODEC_ID,\n PG_TIMESTAMP_CODEC_ID,\n PG_TIMESTAMPTZ_CODEC_ID,\n PG_TIMETZ_CODEC_ID,\n PG_UUID_CODEC_ID,\n PG_VARBIT_CODEC_ID,\n PG_VARCHAR_CODEC_ID,\n} from './codec-ids';\nimport { postgresError } from './errors';\nimport { DEFAULT_NAMESPACE_ID } from './namespace-ids';\nimport { PostgresNativeEnum } from './postgres-native-enum';\n\ntype LengthParams = { readonly length?: number };\ntype PrecisionParams = { readonly precision?: number };\ntype NumericParams = { readonly precision?: number; readonly scale?: number };\n\nconst lengthParamsSchema = arktype({\n 'length?': 'number.integer > 0',\n}) satisfies StandardSchemaV1<LengthParams>;\n\nconst numericParamsSchema = arktype({\n 'precision?': 'number.integer > 0 & number.integer <= 1000',\n 'scale?': 'number.integer >= 0',\n}) satisfies StandardSchemaV1<NumericParams>;\n\nconst precisionParamsSchema = arktype({\n 'precision?': 'number.integer >= 0 & number.integer <= 6',\n}) satisfies StandardSchemaV1<PrecisionParams>;\n\nconst PG_TEXT_META = { db: { sql: { postgres: { nativeType: 'text' } } } } as const;\nconst PG_TEXT_ARRAY_META = { db: { sql: { postgres: { nativeType: 'text[]' } } } } as const;\nconst PG_INT4_META = { db: { sql: { postgres: { nativeType: 'integer' } } } } as const;\nconst PG_INT2_META = { db: { sql: { postgres: { nativeType: 'smallint' } } } } as const;\nconst PG_INT8_META = { db: { sql: { postgres: { nativeType: 'bigint' } } } } as const;\nconst PG_FLOAT4_META = { db: { sql: { postgres: { nativeType: 'real' } } } } as const;\nconst PG_FLOAT8_META = { db: { sql: { postgres: { nativeType: 'double precision' } } } } as const;\nconst PG_NUMERIC_META = { db: { sql: { postgres: { nativeType: 'numeric' } } } } as const;\nconst PG_DATE_META = { db: { sql: { postgres: { nativeType: 'date' } } } } as const;\nconst PG_TIMESTAMP_META = {\n db: { sql: { postgres: { nativeType: 'timestamp without time zone' } } },\n} as const;\nconst PG_TIMESTAMPTZ_META = {\n db: { sql: { postgres: { nativeType: 'timestamp with time zone' } } },\n} as const;\nconst PG_TIME_META = { db: { sql: { postgres: { nativeType: 'time' } } } } as const;\nconst PG_TIMETZ_META = { db: { sql: { postgres: { nativeType: 'timetz' } } } } as const;\nconst PG_BOOL_META = { db: { sql: { postgres: { nativeType: 'boolean' } } } } as const;\nconst PG_BIT_META = { db: { sql: { postgres: { nativeType: 'bit' } } } } as const;\nconst PG_VARBIT_META = { db: { sql: { postgres: { nativeType: 'bit varying' } } } } as const;\nconst PG_BYTEA_META = { db: { sql: { postgres: { nativeType: 'bytea' } } } } as const;\nconst PG_INTERVAL_META = { db: { sql: { postgres: { nativeType: 'interval' } } } } as const;\nconst PG_JSON_META = { db: { sql: { postgres: { nativeType: 'json' } } } } as const;\nconst PG_JSONB_META = { db: { sql: { postgres: { nativeType: 'jsonb' } } } } as const;\n\nconst identityJsonProjection = (expression: ProjectionExpr): ProjectionExpr => expression;\n\nexport const postgresSqlCharDescriptor = postgresCodec(sqlCharDescriptor, {\n nativeType: () => 'character',\n jsonProjection: identityJsonProjection,\n});\n\nexport const postgresSqlVarcharDescriptor = postgresCodec(sqlVarcharDescriptor, {\n nativeType: () => 'character varying',\n jsonProjection: identityJsonProjection,\n});\n\nexport const postgresSqlIntDescriptor = postgresCodec(sqlIntDescriptor, {\n nativeType: () => 'int4',\n jsonProjection: identityJsonProjection,\n});\n\nexport const postgresSqlFloatDescriptor = postgresCodec(sqlFloatDescriptor, {\n nativeType: () => 'float8',\n jsonProjection: identityJsonProjection,\n});\n\nexport const postgresSqlTextDescriptor = postgresCodec(sqlTextDescriptor, {\n nativeType: () => 'text',\n jsonProjection: identityJsonProjection,\n});\n\nexport const postgresSqlTimestampDescriptor = postgresCodec(sqlTimestampDescriptor, {\n nativeType: () => 'timestamp',\n jsonProjection: identityJsonProjection,\n});\n\nexport class PgTextCodec extends CodecImpl<\n typeof PG_TEXT_CODEC_ID,\n readonly ['equality', 'order', 'textual'],\n string,\n string\n> {\n async encode(value: string, _ctx: CodecCallContext): Promise<string> {\n return value;\n }\n async decode(wire: string, _ctx: CodecCallContext): Promise<string> {\n return wire;\n }\n encodeJson(value: string): JsonValue {\n return value;\n }\n decodeJson(json: JsonValue): string {\n return json as string;\n }\n}\n\nexport class PgTextDescriptor extends PostgresCodecDescriptor<void> {\n protected override nativeType(): string {\n return PG_TEXT_META.db.sql.postgres.nativeType;\n }\n protected override jsonProjection(expression: ProjectionExpr): ProjectionExpr {\n return expression;\n }\n override readonly codecId = PG_TEXT_CODEC_ID;\n override readonly traits = ['equality', 'order', 'textual'] as const;\n override readonly targetTypes = ['text'] as const;\n override readonly meta = PG_TEXT_META;\n override readonly paramsSchema: StandardSchemaV1<void> = voidParamsSchema;\n override renderValueLiteral(value: JsonValue): string | undefined {\n return renderTsLiteral(value);\n }\n override factory(): (ctx: CodecInstanceContext) => PgTextCodec {\n return () => new PgTextCodec(this);\n }\n}\n\nexport const pgTextDescriptor = new PgTextDescriptor();\n\nexport const pgTextColumn = () =>\n column(pgTextDescriptor.factory(), pgTextDescriptor.codecId, undefined, 'text');\n\npgTextColumn satisfies ColumnHelperFor<PgTextDescriptor>;\npgTextColumn satisfies ColumnHelperForStrict<PgTextDescriptor>;\n\n/**\n * Codec for a `pg.enum(Ref)` column bound to a native Postgres enum type.\n * Text passthrough, identical to `pg/text@1` — encode/decode do not carry the\n * enum's member values; membership is enforced by the native type itself, not\n * by this codec. `renderValueLiteral` renders a member value as its TS\n * literal, which is what drives the column's typed value-union (via\n * `renderValueSetType` reading the column's `valueSet` ref) — the codec\n * itself carries no params of its own; typing comes entirely from the\n * column's value-set, not from `pg/enum@1`.\n *\n * A distinct codec id (rather than reusing `pg/text@1` on a plain text\n * column) keeps native-enum columns independently identifiable — from a\n * column's `codecId` alone, without also inspecting `nativeType` — which\n * the managed (DDL) phase needs to target `CREATE TYPE`/`ALTER TYPE`\n * operations at exactly the columns that use one.\n */\nexport class PgEnumCodec extends CodecImpl<\n typeof PG_ENUM_CODEC_ID,\n readonly ['equality', 'order', 'textual'],\n string,\n string\n> {\n async encode(value: string, _ctx: CodecCallContext): Promise<string> {\n return value;\n }\n async decode(wire: string, _ctx: CodecCallContext): Promise<string> {\n return wire;\n }\n encodeJson(value: string): JsonValue {\n return value;\n }\n decodeJson(json: JsonValue): string {\n return blindCast<\n string,\n 'text codec: a native-enum member value is stored as its wire string form'\n >(json);\n }\n}\n\nexport type PgEnumParams = { readonly typeName: string };\n\n/**\n * Narrows codec `typeParams` to {@link PgEnumParams} — the shape that binds a\n * column to a named database type (a native enum's `CREATE TYPE` name).\n */\nexport function isPgEnumParams(value: unknown): value is PgEnumParams {\n return (\n typeof value === 'object' &&\n value !== null &&\n !Array.isArray(value) &&\n 'typeName' in value &&\n typeof value.typeName === 'string'\n );\n}\n\nconst pgEnumParamsSchema = arktype({\n typeName: 'string',\n}) satisfies StandardSchemaV1<PgEnumParams>;\n\nexport class PgEnumDescriptor extends PostgresCodecDescriptor<PgEnumParams> {\n protected override nativeType(params: PgEnumParams): string {\n return params.typeName;\n }\n protected override jsonProjection(expression: ProjectionExpr): ProjectionExpr {\n return expression;\n }\n override readonly codecId = PG_ENUM_CODEC_ID;\n override readonly traits = ['equality', 'order', 'textual'] as const;\n override readonly targetTypes = ['text'] as const;\n override readonly meta = PG_TEXT_META;\n override readonly paramsSchema = pgEnumParamsSchema satisfies StandardSchemaV1<PgEnumParams>;\n override renderValueLiteral(value: JsonValue): string | undefined {\n return renderTsLiteral(value);\n }\n override metaFor(typeParams: JsonValue | undefined): CodecMeta | undefined {\n return isPgEnumParams(typeParams)\n ? { db: { sql: { postgres: { nativeType: typeParams.typeName } } } }\n : this.meta;\n }\n override factory(_params: PgEnumParams): (ctx: CodecInstanceContext) => PgEnumCodec {\n return () => new PgEnumCodec(this);\n }\n\n /**\n * Authoring-time hook a `pg.enum(<ref>)` type constructor calls once it has\n * resolved its ref argument to the referenced `native_enum` entity:\n * produces this codec's per-column `typeParams` and native type from the\n * entity's bare type name. Schema-qualification (`auth.aal_level` for a\n * named non-default schema) is not this hook's concern — the field's\n * namespace isn't known at this call site for every authoring path (the TS\n * builder resolves a column before it knows its model's namespace), so it is\n * applied later, at contract construction, by {@link qualifyNativeType} via\n * the target's `authoring.qualifyColumnType` hook. `nativeType` mirrors\n * `typeParams.typeName` — the same value {@link metaFor} derives at render\n * time — so the column's declared native type and the render-time cast\n * agree. Returns `undefined` if `entity` is not a `PostgresNativeEnum` (a\n * contributor bug, not a user-schema error — the caller decides how to\n * report it).\n */\n columnFromEntity(\n entity: object,\n ): { readonly typeParams: PgEnumParams; readonly nativeType: string } | undefined {\n if (!PostgresNativeEnum.is(entity)) return undefined;\n return { typeParams: { typeName: entity.typeName }, nativeType: entity.typeName };\n }\n\n /**\n * Schema-qualifies this native enum type's name for the namespace the\n * consuming column lives in: `${namespaceId}.${typeName}` for a named\n * non-default schema, bare for the target's default schema (`public`) or\n * the late-bound unbound sentinel (whose schema `search_path` resolves at\n * runtime). Postgres's `format_type()` reports the bare name for a\n * public-schema type, so a public column's declared native type must stay\n * bare to match. Owned here because the codec owns its native type.\n */\n qualifyNativeType(typeName: string, namespaceId: string): string {\n return namespaceId === DEFAULT_NAMESPACE_ID || namespaceId === UNBOUND_NAMESPACE_ID\n ? typeName\n : `${namespaceId}.${typeName}`;\n }\n}\n\nexport const pgEnumDescriptor = new PgEnumDescriptor();\n\n/**\n * Contract-construction-time column-type qualifier the Postgres target\n * contributes through `authoring.qualifyColumnType`.\n * `buildSqlContractFromDefinition` calls this for every column as it is\n * constructed, passing the column's bare type info and its owning\n * `namespaceId`; a native-enum column (`pg/enum@1`) gets its type name\n * schema-qualified for that namespace (via\n * {@link PgEnumDescriptor.qualifyNativeType}), keeping `nativeType` and\n * `typeParams.typeName` in sync. Every other codec passes through unchanged.\n * Both the PSL `pg.enum(Ref)` path and the TS `pg.enum(handle)` path route\n * through here — the dispatch keys off the codec id, not authoring surface.\n */\nexport function postgresQualifyColumnType(\n input: {\n readonly codecId: string;\n readonly nativeType: string;\n readonly typeParams?: Record<string, unknown>;\n },\n namespaceId: string,\n): { readonly nativeType: string; readonly typeParams?: Record<string, unknown> } {\n if (input.codecId !== PG_ENUM_CODEC_ID) return input;\n const bareTypeName = input.typeParams?.['typeName'];\n if (typeof bareTypeName !== 'string') return input;\n const qualified = pgEnumDescriptor.qualifyNativeType(bareTypeName, namespaceId);\n return { nativeType: qualified, typeParams: { ...input.typeParams, typeName: qualified } };\n}\n\n/**\n * Postgres `text[]` codec. Encode is an identity pass-through: the pg wire\n * driver serialises a JS `string[]` to a Postgres array literal under the\n * `$N::text[]` cast the renderer emits from this codec's `text[]` native type,\n * and decode reads it back as a JS array. Used by the control plane to write\n * the marker's `invariants` column. Not a user-facing scalar — it is not part\n * of the authorable `CodecTypes` surface, only the runtime codec registry.\n */\nexport class PgTextArrayCodec extends CodecImpl<\n typeof PG_TEXT_ARRAY_CODEC_ID,\n readonly ['equality'],\n readonly string[],\n readonly string[]\n> {\n async encode(value: readonly string[], _ctx: CodecCallContext): Promise<readonly string[]> {\n return value;\n }\n async decode(wire: readonly string[], _ctx: CodecCallContext): Promise<readonly string[]> {\n return wire;\n }\n encodeJson(value: readonly string[]): JsonValue {\n return [...value];\n }\n decodeJson(json: JsonValue): readonly string[] {\n return Array.isArray(json) ? json.map((entry) => String(entry)) : [];\n }\n}\n\nexport class PgTextArrayDescriptor extends PostgresCodecDescriptor<void> {\n protected override nativeType(): string {\n return PG_TEXT_ARRAY_META.db.sql.postgres.nativeType;\n }\n protected override jsonProjection(expression: ProjectionExpr): ProjectionExpr {\n return expression;\n }\n override readonly codecId = PG_TEXT_ARRAY_CODEC_ID;\n override readonly traits = ['equality'] as const;\n override readonly targetTypes = ['text[]'] as const;\n override readonly meta = PG_TEXT_ARRAY_META;\n override readonly paramsSchema: StandardSchemaV1<void> = voidParamsSchema;\n override factory(): (ctx: CodecInstanceContext) => PgTextArrayCodec {\n return () => new PgTextArrayCodec(this);\n }\n}\n\nexport const pgTextArrayDescriptor = new PgTextArrayDescriptor();\n\nexport class PgInt4Codec extends CodecImpl<\n typeof PG_INT4_CODEC_ID,\n readonly ['equality', 'order', 'numeric'],\n number,\n number\n> {\n async encode(value: number, _ctx: CodecCallContext): Promise<number> {\n return value;\n }\n async decode(wire: number, _ctx: CodecCallContext): Promise<number> {\n return wire;\n }\n encodeJson(value: number): JsonValue {\n return value;\n }\n decodeJson(json: JsonValue): number {\n return json as number;\n }\n}\n\nexport class PgInt4Descriptor extends PostgresCodecDescriptor<void> {\n protected override nativeType(): string {\n return PG_INT4_META.db.sql.postgres.nativeType;\n }\n protected override jsonProjection(expression: ProjectionExpr): ProjectionExpr {\n return expression;\n }\n override readonly codecId = PG_INT4_CODEC_ID;\n override readonly traits = ['equality', 'order', 'numeric'] as const;\n override readonly targetTypes = ['int4'] as const;\n override readonly meta = PG_INT4_META;\n override readonly paramsSchema: StandardSchemaV1<void> = voidParamsSchema;\n override renderValueLiteral(value: JsonValue): string | undefined {\n return renderTsLiteral(value);\n }\n override factory(): (ctx: CodecInstanceContext) => PgInt4Codec {\n return () => new PgInt4Codec(this);\n }\n}\n\nexport const pgInt4Descriptor = new PgInt4Descriptor();\n\nexport const pgInt4Column = () =>\n column(pgInt4Descriptor.factory(), pgInt4Descriptor.codecId, undefined, 'int4');\n\npgInt4Column satisfies ColumnHelperFor<PgInt4Descriptor>;\npgInt4Column satisfies ColumnHelperForStrict<PgInt4Descriptor>;\n\nexport class PgInt2Codec extends CodecImpl<\n typeof PG_INT2_CODEC_ID,\n readonly ['equality', 'order', 'numeric'],\n number,\n number\n> {\n async encode(value: number, _ctx: CodecCallContext): Promise<number> {\n return value;\n }\n async decode(wire: number, _ctx: CodecCallContext): Promise<number> {\n return wire;\n }\n encodeJson(value: number): JsonValue {\n return value;\n }\n decodeJson(json: JsonValue): number {\n return json as number;\n }\n}\n\nexport class PgInt2Descriptor extends PostgresCodecDescriptor<void> {\n protected override nativeType(): string {\n return PG_INT2_META.db.sql.postgres.nativeType;\n }\n protected override jsonProjection(expression: ProjectionExpr): ProjectionExpr {\n return expression;\n }\n override readonly codecId = PG_INT2_CODEC_ID;\n override readonly traits = ['equality', 'order', 'numeric'] as const;\n override readonly targetTypes = ['int2'] as const;\n override readonly meta = PG_INT2_META;\n override readonly paramsSchema: StandardSchemaV1<void> = voidParamsSchema;\n override renderValueLiteral(value: JsonValue): string | undefined {\n return renderTsLiteral(value);\n }\n override factory(): (ctx: CodecInstanceContext) => PgInt2Codec {\n return () => new PgInt2Codec(this);\n }\n}\n\nexport const pgInt2Descriptor = new PgInt2Descriptor();\n\nexport const pgInt2Column = () =>\n column(pgInt2Descriptor.factory(), pgInt2Descriptor.codecId, undefined, 'int2');\n\npgInt2Column satisfies ColumnHelperFor<PgInt2Descriptor>;\npgInt2Column satisfies ColumnHelperForStrict<PgInt2Descriptor>;\n\nexport class PgInt8Codec extends CodecImpl<\n typeof PG_INT8_CODEC_ID,\n readonly ['equality', 'order', 'numeric'],\n number,\n number\n> {\n async encode(value: number, _ctx: CodecCallContext): Promise<number> {\n return value;\n }\n async decode(wire: number, _ctx: CodecCallContext): Promise<number> {\n return wire;\n }\n encodeJson(value: number): JsonValue {\n return value;\n }\n decodeJson(json: JsonValue): number {\n return json as number;\n }\n}\n\nexport class PgInt8Descriptor extends PostgresCodecDescriptor<void> {\n protected override nativeType(): string {\n return PG_INT8_META.db.sql.postgres.nativeType;\n }\n protected override jsonProjection(expression: ProjectionExpr): ProjectionExpr {\n return expression;\n }\n override readonly codecId = PG_INT8_CODEC_ID;\n override readonly traits = ['equality', 'order', 'numeric'] as const;\n override readonly targetTypes = ['int8'] as const;\n override readonly meta = PG_INT8_META;\n override readonly paramsSchema: StandardSchemaV1<void> = voidParamsSchema;\n override renderValueLiteral(value: JsonValue): string | undefined {\n return renderTsLiteral(value);\n }\n override factory(): (ctx: CodecInstanceContext) => PgInt8Codec {\n return () => new PgInt8Codec(this);\n }\n}\n\nexport const pgInt8Descriptor = new PgInt8Descriptor();\n\nexport const pgInt8Column = () =>\n column(pgInt8Descriptor.factory(), pgInt8Descriptor.codecId, undefined, 'int8');\n\npgInt8Column satisfies ColumnHelperFor<PgInt8Descriptor>;\npgInt8Column satisfies ColumnHelperForStrict<PgInt8Descriptor>;\n\nexport class PgFloat4Codec extends CodecImpl<\n typeof PG_FLOAT4_CODEC_ID,\n readonly ['equality', 'order', 'numeric'],\n number,\n number\n> {\n async encode(value: number, _ctx: CodecCallContext): Promise<number> {\n return value;\n }\n async decode(wire: number, _ctx: CodecCallContext): Promise<number> {\n return wire;\n }\n encodeJson(value: number): JsonValue {\n return value;\n }\n decodeJson(json: JsonValue): number {\n return json as number;\n }\n}\n\nexport class PgFloat4Descriptor extends PostgresCodecDescriptor<void> {\n protected override nativeType(): string {\n return PG_FLOAT4_META.db.sql.postgres.nativeType;\n }\n protected override jsonProjection(expression: ProjectionExpr): ProjectionExpr {\n return expression;\n }\n override readonly codecId = PG_FLOAT4_CODEC_ID;\n override readonly traits = ['equality', 'order', 'numeric'] as const;\n override readonly targetTypes = ['float4'] as const;\n override readonly meta = PG_FLOAT4_META;\n override readonly paramsSchema: StandardSchemaV1<void> = voidParamsSchema;\n override renderValueLiteral(value: JsonValue): string | undefined {\n return renderTsLiteral(value);\n }\n override factory(): (ctx: CodecInstanceContext) => PgFloat4Codec {\n return () => new PgFloat4Codec(this);\n }\n}\n\nexport const pgFloat4Descriptor = new PgFloat4Descriptor();\n\nexport const pgFloat4Column = () =>\n column(pgFloat4Descriptor.factory(), pgFloat4Descriptor.codecId, undefined, 'float4');\n\npgFloat4Column satisfies ColumnHelperFor<PgFloat4Descriptor>;\npgFloat4Column satisfies ColumnHelperForStrict<PgFloat4Descriptor>;\n\nexport class PgFloat8Codec extends CodecImpl<\n typeof PG_FLOAT8_CODEC_ID,\n readonly ['equality', 'order', 'numeric'],\n number,\n number\n> {\n async encode(value: number, _ctx: CodecCallContext): Promise<number> {\n return value;\n }\n async decode(wire: number, _ctx: CodecCallContext): Promise<number> {\n return wire;\n }\n encodeJson(value: number): JsonValue {\n return value;\n }\n decodeJson(json: JsonValue): number {\n return json as number;\n }\n}\n\nexport class PgFloat8Descriptor extends PostgresCodecDescriptor<void> {\n protected override nativeType(): string {\n return PG_FLOAT8_META.db.sql.postgres.nativeType;\n }\n protected override jsonProjection(expression: ProjectionExpr): ProjectionExpr {\n return expression;\n }\n override readonly codecId = PG_FLOAT8_CODEC_ID;\n override readonly traits = ['equality', 'order', 'numeric'] as const;\n override readonly targetTypes = ['float8'] as const;\n override readonly meta = PG_FLOAT8_META;\n override readonly paramsSchema: StandardSchemaV1<void> = voidParamsSchema;\n override renderValueLiteral(value: JsonValue): string | undefined {\n return renderTsLiteral(value);\n }\n override factory(): (ctx: CodecInstanceContext) => PgFloat8Codec {\n return () => new PgFloat8Codec(this);\n }\n}\n\nexport const pgFloat8Descriptor = new PgFloat8Descriptor();\n\nexport const pgFloat8Column = () =>\n column(pgFloat8Descriptor.factory(), pgFloat8Descriptor.codecId, undefined, 'float8');\n\npgFloat8Column satisfies ColumnHelperFor<PgFloat8Descriptor>;\npgFloat8Column satisfies ColumnHelperForStrict<PgFloat8Descriptor>;\n\nexport class PgBoolCodec extends CodecImpl<\n typeof PG_BOOL_CODEC_ID,\n readonly ['equality', 'boolean'],\n boolean,\n boolean\n> {\n async encode(value: boolean, _ctx: CodecCallContext): Promise<boolean> {\n return value;\n }\n async decode(wire: boolean, _ctx: CodecCallContext): Promise<boolean> {\n return wire;\n }\n encodeJson(value: boolean): JsonValue {\n return value;\n }\n decodeJson(json: JsonValue): boolean {\n return json as boolean;\n }\n}\n\nexport class PgBoolDescriptor extends PostgresCodecDescriptor<void> {\n protected override nativeType(): string {\n return PG_BOOL_META.db.sql.postgres.nativeType;\n }\n protected override jsonProjection(expression: ProjectionExpr): ProjectionExpr {\n return expression;\n }\n override readonly codecId = PG_BOOL_CODEC_ID;\n override readonly traits = ['equality', 'boolean'] as const;\n override readonly targetTypes = ['bool'] as const;\n override readonly meta = PG_BOOL_META;\n override readonly paramsSchema: StandardSchemaV1<void> = voidParamsSchema;\n override renderValueLiteral(value: JsonValue): string | undefined {\n return renderTsLiteral(value);\n }\n override factory(): (ctx: CodecInstanceContext) => PgBoolCodec {\n return () => new PgBoolCodec(this);\n }\n}\n\nexport const pgBoolDescriptor = new PgBoolDescriptor();\n\nexport const pgBoolColumn = () =>\n column(pgBoolDescriptor.factory(), pgBoolDescriptor.codecId, undefined, 'bool');\n\npgBoolColumn satisfies ColumnHelperFor<PgBoolDescriptor>;\npgBoolColumn satisfies ColumnHelperForStrict<PgBoolDescriptor>;\n\nexport class PgNumericCodec extends CodecImpl<\n typeof PG_NUMERIC_CODEC_ID,\n readonly ['equality', 'order', 'numeric'],\n string | number,\n string\n> {\n async encode(value: string, _ctx: CodecCallContext): Promise<string> {\n return value;\n }\n async decode(wire: string | number, _ctx: CodecCallContext): Promise<string> {\n return pgNumericDecode(wire);\n }\n encodeJson(value: string): JsonValue {\n const number = Number(value);\n if (!Number.isFinite(number)) {\n throw postgresError(\n 'RUNTIME.ENCODE_FAILED',\n 'pg/numeric@1 database JSON value must be a finite number',\n { meta: { codecId: 'pg/numeric@1', received: value } },\n );\n }\n return number;\n }\n decodeJson(json: JsonValue): string {\n if (typeof json !== 'number') {\n throw postgresError(\n 'RUNTIME.DECODE_FAILED',\n 'pg/numeric@1 database JSON value must be a number',\n { meta: { codecId: 'pg/numeric@1', received: typeof json } },\n );\n }\n return pgNumericDecode(json);\n }\n}\n\nexport class PgNumericDescriptor extends PostgresCodecDescriptor<NumericParams> {\n protected override nativeType(): string {\n return PG_NUMERIC_META.db.sql.postgres.nativeType;\n }\n protected override jsonProjection(expression: ProjectionExpr): ProjectionExpr {\n return expression;\n }\n override readonly codecId = PG_NUMERIC_CODEC_ID;\n override readonly traits = ['equality', 'order', 'numeric'] as const;\n override readonly targetTypes = ['numeric', 'decimal'] as const;\n override readonly meta = PG_NUMERIC_META;\n override readonly paramsSchema = numericParamsSchema satisfies StandardSchemaV1<NumericParams>;\n override renderOutputType(params: NumericParams): string | undefined {\n return pgNumericRenderOutputType(params);\n }\n override factory(_params: NumericParams): (ctx: CodecInstanceContext) => PgNumericCodec {\n return () => new PgNumericCodec(this);\n }\n}\n\nexport const pgNumericDescriptor = new PgNumericDescriptor();\n\nexport const pgNumericColumn = (params: NumericParams = {}) =>\n column(pgNumericDescriptor.factory(params), pgNumericDescriptor.codecId, params, 'numeric');\n\npgNumericColumn satisfies ColumnHelperFor<PgNumericDescriptor>;\npgNumericColumn satisfies ColumnHelperForStrict<PgNumericDescriptor>;\n\n/**\n * A Postgres `date` has no time-of-day or timezone component. This codec\n * canonicalizes its JS-level value as a `Date` at UTC midnight, so its\n * round-trip is independent of the process's local timezone — see\n * `pgDateEncode`/`pgDateDecode` in `codec-helpers.ts`.\n */\nexport class PgDateCodec extends CodecImpl<\n typeof PG_DATE_CODEC_ID,\n readonly ['equality', 'order'],\n Date | string,\n Date\n> {\n async encode(value: Date, _ctx: CodecCallContext): Promise<string> {\n return pgDateEncode(value);\n }\n async decode(wire: Date, _ctx: CodecCallContext): Promise<Date> {\n return pgDateDecode(wire);\n }\n encodeJson(value: Date): JsonValue {\n return pgDateEncodeJson(value);\n }\n decodeJson(json: JsonValue): Date {\n return pgDateDecodeJson(json);\n }\n}\n\nexport class PgDateDescriptor extends PostgresCodecDescriptor<void> {\n protected override nativeType(): string {\n return PG_DATE_META.db.sql.postgres.nativeType;\n }\n protected override jsonProjection(expression: ProjectionExpr): ProjectionExpr {\n return expression;\n }\n override readonly codecId = PG_DATE_CODEC_ID;\n override readonly traits = ['equality', 'order'] as const;\n override readonly targetTypes = ['date'] as const;\n override readonly meta = PG_DATE_META;\n override readonly paramsSchema: StandardSchemaV1<void> = voidParamsSchema;\n override factory(): (ctx: CodecInstanceContext) => PgDateCodec {\n return () => new PgDateCodec(this);\n }\n}\n\nexport const pgDateDescriptor = new PgDateDescriptor();\n\nexport const pgDateColumn = () =>\n column(pgDateDescriptor.factory(), pgDateDescriptor.codecId, undefined, 'date');\n\npgDateColumn satisfies ColumnHelperFor<PgDateDescriptor>;\npgDateColumn satisfies ColumnHelperForStrict<PgDateDescriptor>;\n\nexport class PgTimestampCodec extends CodecImpl<\n typeof PG_TIMESTAMP_CODEC_ID,\n readonly ['equality', 'order'],\n Date,\n Date\n> {\n async encode(value: Date, _ctx: CodecCallContext): Promise<Date> {\n return value;\n }\n async decode(wire: Date, _ctx: CodecCallContext): Promise<Date> {\n return wire;\n }\n encodeJson(value: Date): JsonValue {\n return pgTimestampEncodeJson(value);\n }\n decodeJson(json: JsonValue): Date {\n return pgTimestampDecodeJson(json);\n }\n}\n\nexport class PgTimestampDescriptor extends PostgresCodecDescriptor<PrecisionParams> {\n protected override nativeType(): string {\n return PG_TIMESTAMP_META.db.sql.postgres.nativeType;\n }\n protected override jsonProjection(expression: ProjectionExpr): ProjectionExpr {\n return expression;\n }\n override readonly codecId = PG_TIMESTAMP_CODEC_ID;\n override readonly traits = ['equality', 'order'] as const;\n override readonly targetTypes = ['timestamp'] as const;\n override readonly meta = PG_TIMESTAMP_META;\n override readonly paramsSchema =\n precisionParamsSchema satisfies StandardSchemaV1<PrecisionParams>;\n override renderOutputType(params: PrecisionParams): string | undefined {\n return renderPrecision('Timestamp', params as Record<string, unknown>);\n }\n override factory(_params: PrecisionParams): (ctx: CodecInstanceContext) => PgTimestampCodec {\n return () => new PgTimestampCodec(this);\n }\n}\n\nexport const pgTimestampDescriptor = new PgTimestampDescriptor();\n\nexport const pgTimestampColumn = (params: PrecisionParams = {}) =>\n column(pgTimestampDescriptor.factory(params), pgTimestampDescriptor.codecId, params, 'timestamp');\n\npgTimestampColumn satisfies ColumnHelperFor<PgTimestampDescriptor>;\npgTimestampColumn satisfies ColumnHelperForStrict<PgTimestampDescriptor>;\n\nexport class PgTimestamptzCodec extends CodecImpl<\n typeof PG_TIMESTAMPTZ_CODEC_ID,\n readonly ['equality', 'order'],\n Date,\n Date\n> {\n async encode(value: Date, _ctx: CodecCallContext): Promise<Date> {\n return value;\n }\n async decode(wire: Date, _ctx: CodecCallContext): Promise<Date> {\n return wire;\n }\n encodeJson(value: Date): JsonValue {\n return pgTimestamptzEncodeJson(value);\n }\n decodeJson(json: JsonValue): Date {\n return pgTimestamptzDecodeJson(json);\n }\n}\n\nexport class PgTimestamptzDescriptor extends PostgresCodecDescriptor<PrecisionParams> {\n protected override nativeType(): string {\n return PG_TIMESTAMPTZ_META.db.sql.postgres.nativeType;\n }\n protected override jsonProjection(expression: ProjectionExpr): ProjectionExpr {\n return expression;\n }\n override readonly codecId = PG_TIMESTAMPTZ_CODEC_ID;\n override readonly traits = ['equality', 'order'] as const;\n override readonly targetTypes = ['timestamptz'] as const;\n override readonly meta = PG_TIMESTAMPTZ_META;\n override readonly paramsSchema =\n precisionParamsSchema satisfies StandardSchemaV1<PrecisionParams>;\n override renderOutputType(params: PrecisionParams): string | undefined {\n return renderPrecision('Timestamptz', params as Record<string, unknown>);\n }\n override factory(_params: PrecisionParams): (ctx: CodecInstanceContext) => PgTimestamptzCodec {\n return () => new PgTimestamptzCodec(this);\n }\n}\n\nexport const pgTimestamptzDescriptor = new PgTimestamptzDescriptor();\n\nexport const pgTimestamptzColumn = (params: PrecisionParams = {}) =>\n column(\n pgTimestamptzDescriptor.factory(params),\n pgTimestamptzDescriptor.codecId,\n params,\n 'timestamptz',\n );\n\npgTimestamptzColumn satisfies ColumnHelperFor<PgTimestamptzDescriptor>;\npgTimestamptzColumn satisfies ColumnHelperForStrict<PgTimestamptzDescriptor>;\n\nexport class PgTimeCodec extends CodecImpl<\n typeof PG_TIME_CODEC_ID,\n readonly ['equality', 'order'],\n string,\n string\n> {\n async encode(value: string, _ctx: CodecCallContext): Promise<string> {\n return value;\n }\n async decode(wire: string, _ctx: CodecCallContext): Promise<string> {\n return wire;\n }\n encodeJson(value: string): JsonValue {\n return value;\n }\n decodeJson(json: JsonValue): string {\n return json as string;\n }\n}\n\nexport class PgTimeDescriptor extends PostgresCodecDescriptor<PrecisionParams> {\n protected override nativeType(): string {\n return PG_TIME_META.db.sql.postgres.nativeType;\n }\n protected override jsonProjection(expression: ProjectionExpr): ProjectionExpr {\n return expression;\n }\n override readonly codecId = PG_TIME_CODEC_ID;\n override readonly traits = ['equality', 'order'] as const;\n override readonly targetTypes = ['time'] as const;\n override readonly meta = PG_TIME_META;\n override readonly paramsSchema =\n precisionParamsSchema satisfies StandardSchemaV1<PrecisionParams>;\n override renderOutputType(params: PrecisionParams): string | undefined {\n return renderPrecision('Time', params as Record<string, unknown>);\n }\n override factory(_params: PrecisionParams): (ctx: CodecInstanceContext) => PgTimeCodec {\n return () => new PgTimeCodec(this);\n }\n}\n\nexport const pgTimeDescriptor = new PgTimeDescriptor();\n\nexport const pgTimeColumn = (params: PrecisionParams = {}) =>\n column(pgTimeDescriptor.factory(params), pgTimeDescriptor.codecId, params, 'time');\n\npgTimeColumn satisfies ColumnHelperFor<PgTimeDescriptor>;\npgTimeColumn satisfies ColumnHelperForStrict<PgTimeDescriptor>;\n\nexport class PgTimetzCodec extends CodecImpl<\n typeof PG_TIMETZ_CODEC_ID,\n readonly ['equality', 'order'],\n string,\n string\n> {\n async encode(value: string, _ctx: CodecCallContext): Promise<string> {\n return value;\n }\n async decode(wire: string, _ctx: CodecCallContext): Promise<string> {\n return wire;\n }\n encodeJson(value: string): JsonValue {\n return value;\n }\n decodeJson(json: JsonValue): string {\n return json as string;\n }\n}\n\nexport class PgTimetzDescriptor extends PostgresCodecDescriptor<PrecisionParams> {\n protected override nativeType(): string {\n return PG_TIMETZ_META.db.sql.postgres.nativeType;\n }\n protected override jsonProjection(expression: ProjectionExpr): ProjectionExpr {\n return expression;\n }\n override readonly codecId = PG_TIMETZ_CODEC_ID;\n override readonly traits = ['equality', 'order'] as const;\n override readonly targetTypes = ['timetz'] as const;\n override readonly meta = PG_TIMETZ_META;\n override readonly paramsSchema =\n precisionParamsSchema satisfies StandardSchemaV1<PrecisionParams>;\n override renderOutputType(params: PrecisionParams): string | undefined {\n return renderPrecision('Timetz', params as Record<string, unknown>);\n }\n override factory(_params: PrecisionParams): (ctx: CodecInstanceContext) => PgTimetzCodec {\n return () => new PgTimetzCodec(this);\n }\n}\n\nexport const pgTimetzDescriptor = new PgTimetzDescriptor();\n\nexport const pgTimetzColumn = (params: PrecisionParams = {}) =>\n column(pgTimetzDescriptor.factory(params), pgTimetzDescriptor.codecId, params, 'timetz');\n\npgTimetzColumn satisfies ColumnHelperFor<PgTimetzDescriptor>;\npgTimetzColumn satisfies ColumnHelperForStrict<PgTimetzDescriptor>;\n\nexport class PgBitCodec extends CodecImpl<\n typeof PG_BIT_CODEC_ID,\n readonly ['equality', 'order'],\n string,\n string\n> {\n async encode(value: string, _ctx: CodecCallContext): Promise<string> {\n return value;\n }\n async decode(wire: string, _ctx: CodecCallContext): Promise<string> {\n return wire;\n }\n encodeJson(value: string): JsonValue {\n return value;\n }\n decodeJson(json: JsonValue): string {\n return json as string;\n }\n}\n\nexport class PgBitDescriptor extends PostgresCodecDescriptor<LengthParams> {\n protected override nativeType(): string {\n return PG_BIT_META.db.sql.postgres.nativeType;\n }\n protected override jsonProjection(expression: ProjectionExpr): ProjectionExpr {\n return expression;\n }\n override readonly codecId = PG_BIT_CODEC_ID;\n override readonly traits = ['equality', 'order'] as const;\n override readonly targetTypes = ['bit'] as const;\n override readonly meta = PG_BIT_META;\n override readonly paramsSchema = lengthParamsSchema satisfies StandardSchemaV1<LengthParams>;\n override renderOutputType(params: LengthParams): string | undefined {\n return renderLength('Bit', params as Record<string, unknown>);\n }\n override factory(_params: LengthParams): (ctx: CodecInstanceContext) => PgBitCodec {\n return () => new PgBitCodec(this);\n }\n}\n\nexport const pgBitDescriptor = new PgBitDescriptor();\n\nexport const pgBitColumn = (params: LengthParams = {}) =>\n column(pgBitDescriptor.factory(params), pgBitDescriptor.codecId, params, 'bit');\n\npgBitColumn satisfies ColumnHelperFor<PgBitDescriptor>;\npgBitColumn satisfies ColumnHelperForStrict<PgBitDescriptor>;\n\nexport class PgVarbitCodec extends CodecImpl<\n typeof PG_VARBIT_CODEC_ID,\n readonly ['equality', 'order'],\n string,\n string\n> {\n async encode(value: string, _ctx: CodecCallContext): Promise<string> {\n return value;\n }\n async decode(wire: string, _ctx: CodecCallContext): Promise<string> {\n return wire;\n }\n encodeJson(value: string): JsonValue {\n return value;\n }\n decodeJson(json: JsonValue): string {\n return json as string;\n }\n}\n\nexport class PgVarbitDescriptor extends PostgresCodecDescriptor<LengthParams> {\n protected override nativeType(): string {\n return PG_VARBIT_META.db.sql.postgres.nativeType;\n }\n protected override jsonProjection(expression: ProjectionExpr): ProjectionExpr {\n return expression;\n }\n override readonly codecId = PG_VARBIT_CODEC_ID;\n override readonly traits = ['equality', 'order'] as const;\n override readonly targetTypes = ['bit varying'] as const;\n override readonly meta = PG_VARBIT_META;\n override readonly paramsSchema = lengthParamsSchema satisfies StandardSchemaV1<LengthParams>;\n override renderOutputType(params: LengthParams): string | undefined {\n return renderLength('VarBit', params as Record<string, unknown>);\n }\n override factory(_params: LengthParams): (ctx: CodecInstanceContext) => PgVarbitCodec {\n return () => new PgVarbitCodec(this);\n }\n}\n\nexport const pgVarbitDescriptor = new PgVarbitDescriptor();\n\nexport const pgVarbitColumn = (params: LengthParams = {}) =>\n column(pgVarbitDescriptor.factory(params), pgVarbitDescriptor.codecId, params, 'bit varying');\n\npgVarbitColumn satisfies ColumnHelperFor<PgVarbitDescriptor>;\npgVarbitColumn satisfies ColumnHelperForStrict<PgVarbitDescriptor>;\n\nexport class PgByteaCodec extends CodecImpl<\n typeof PG_BYTEA_CODEC_ID,\n readonly ['equality'],\n Uint8Array,\n Uint8Array\n> {\n async encode(value: Uint8Array, _ctx: CodecCallContext): Promise<Uint8Array> {\n return value;\n }\n async decode(wire: Uint8Array, _ctx: CodecCallContext): Promise<Uint8Array> {\n // Postgres node drivers commonly return Buffer instances (which extend Uint8Array) — normalize to a plain Uint8Array view so engine-agnostic consumers don't accidentally observe Buffer-specific APIs.\n return wire instanceof Uint8Array && wire.constructor === Uint8Array\n ? wire\n : new Uint8Array(wire.buffer, wire.byteOffset, wire.byteLength);\n }\n encodeJson(value: Uint8Array): JsonValue {\n return pgByteaEncodeJson(value);\n }\n decodeJson(json: JsonValue): Uint8Array {\n return pgByteaDecodeJson(json);\n }\n}\n\nexport class PgByteaDescriptor extends PostgresCodecDescriptor<void> {\n protected override nativeType(): string {\n return PG_BYTEA_META.db.sql.postgres.nativeType;\n }\n protected override jsonProjection(expression: ProjectionExpr): ProjectionExpr {\n return expression;\n }\n override readonly codecId = PG_BYTEA_CODEC_ID;\n override readonly traits = ['equality'] as const;\n override readonly targetTypes = ['bytea'] as const;\n override readonly meta = PG_BYTEA_META;\n override readonly paramsSchema: StandardSchemaV1<void> = voidParamsSchema;\n override factory(): (ctx: CodecInstanceContext) => PgByteaCodec {\n return () => new PgByteaCodec(this);\n }\n}\n\nexport const pgByteaDescriptor = new PgByteaDescriptor();\n\nexport const pgByteaColumn = () =>\n column(pgByteaDescriptor.factory(), pgByteaDescriptor.codecId, undefined, 'bytea');\n\npgByteaColumn satisfies ColumnHelperFor<PgByteaDescriptor>;\npgByteaColumn satisfies ColumnHelperForStrict<PgByteaDescriptor>;\n\nconst PG_UUID_META = { db: { sql: { postgres: { nativeType: 'uuid' } } } } as const;\n\nexport class PgUuidCodec extends CodecImpl<\n typeof PG_UUID_CODEC_ID,\n readonly ['equality', 'order'],\n string,\n string\n> {\n async encode(value: string, _ctx: CodecCallContext): Promise<string> {\n return value;\n }\n async decode(wire: string, _ctx: CodecCallContext): Promise<string> {\n return wire;\n }\n encodeJson(value: string): JsonValue {\n return value;\n }\n decodeJson(json: JsonValue): string {\n return blindCast<string, 'uuid columns serialize to JSON as their wire string form'>(json);\n }\n}\n\nexport class PgUuidDescriptor extends PostgresCodecDescriptor<void> {\n protected override nativeType(): string {\n return PG_UUID_META.db.sql.postgres.nativeType;\n }\n protected override jsonProjection(expression: ProjectionExpr): ProjectionExpr {\n return expression;\n }\n override readonly codecId = PG_UUID_CODEC_ID;\n override readonly traits = ['equality', 'order'] as const;\n override readonly targetTypes = ['uuid'] as const;\n override readonly meta = PG_UUID_META;\n override readonly paramsSchema: StandardSchemaV1<void> = voidParamsSchema;\n override factory(): (ctx: CodecInstanceContext) => PgUuidCodec {\n return () => new PgUuidCodec(this);\n }\n}\n\nexport const pgUuidDescriptor = new PgUuidDescriptor();\n\nexport const pgUuidColumn = () =>\n column(pgUuidDescriptor.factory(), pgUuidDescriptor.codecId, undefined, 'uuid');\n\npgUuidColumn satisfies ColumnHelperFor<PgUuidDescriptor>;\npgUuidColumn satisfies ColumnHelperForStrict<PgUuidDescriptor>;\n\nconst PG_INET_META = { db: { sql: { postgres: { nativeType: 'inet' } } } } as const;\n\nexport class PgInetCodec extends CodecImpl<\n typeof PG_INET_CODEC_ID,\n readonly ['equality', 'order'],\n string,\n string\n> {\n async encode(value: string, _ctx: CodecCallContext): Promise<string> {\n return value;\n }\n async decode(wire: string, _ctx: CodecCallContext): Promise<string> {\n return wire;\n }\n encodeJson(value: string): JsonValue {\n return value;\n }\n decodeJson(json: JsonValue): string {\n return blindCast<string, 'inet columns serialize to JSON as their wire string form'>(json);\n }\n}\n\nexport class PgInetDescriptor extends PostgresCodecDescriptor<void> {\n protected override nativeType(): string {\n return PG_INET_META.db.sql.postgres.nativeType;\n }\n protected override jsonProjection(expression: ProjectionExpr): ProjectionExpr {\n return expression;\n }\n override readonly codecId = PG_INET_CODEC_ID;\n override readonly traits = ['equality', 'order'] as const;\n override readonly targetTypes = ['inet'] as const;\n override readonly meta = PG_INET_META;\n override readonly paramsSchema: StandardSchemaV1<void> = voidParamsSchema;\n override factory(): (ctx: CodecInstanceContext) => PgInetCodec {\n return () => new PgInetCodec(this);\n }\n}\n\nexport const pgInetDescriptor = new PgInetDescriptor();\n\nexport const pgInetColumn = () =>\n column(pgInetDescriptor.factory(), pgInetDescriptor.codecId, undefined, 'inet');\n\npgInetColumn satisfies ColumnHelperFor<PgInetDescriptor>;\npgInetColumn satisfies ColumnHelperForStrict<PgInetDescriptor>;\n\nexport class PgIntervalCodec extends CodecImpl<\n typeof PG_INTERVAL_CODEC_ID,\n readonly ['equality', 'order'],\n string | Record<string, unknown>,\n string\n> {\n async encode(value: string, _ctx: CodecCallContext): Promise<string> {\n return value;\n }\n async decode(wire: string | Record<string, unknown>, _ctx: CodecCallContext): Promise<string> {\n return pgIntervalDecode(wire);\n }\n encodeJson(value: string): JsonValue {\n return value;\n }\n decodeJson(json: JsonValue): string {\n return json as string;\n }\n}\n\nexport class PgIntervalDescriptor extends PostgresCodecDescriptor<PrecisionParams> {\n protected override nativeType(): string {\n return PG_INTERVAL_META.db.sql.postgres.nativeType;\n }\n protected override jsonProjection(expression: ProjectionExpr): ProjectionExpr {\n return expression;\n }\n override readonly codecId = PG_INTERVAL_CODEC_ID;\n override readonly traits = ['equality', 'order'] as const;\n override readonly targetTypes = ['interval'] as const;\n override readonly meta = PG_INTERVAL_META;\n override readonly paramsSchema =\n precisionParamsSchema satisfies StandardSchemaV1<PrecisionParams>;\n override renderOutputType(params: PrecisionParams): string | undefined {\n return renderPrecision('Interval', params as Record<string, unknown>);\n }\n override factory(_params: PrecisionParams): (ctx: CodecInstanceContext) => PgIntervalCodec {\n return () => new PgIntervalCodec(this);\n }\n}\n\nexport const pgIntervalDescriptor = new PgIntervalDescriptor();\n\nexport const pgIntervalColumn = (params: PrecisionParams = {}) =>\n column(pgIntervalDescriptor.factory(params), pgIntervalDescriptor.codecId, params, 'interval');\n\npgIntervalColumn satisfies ColumnHelperFor<PgIntervalDescriptor>;\npgIntervalColumn satisfies ColumnHelperForStrict<PgIntervalDescriptor>;\n\nexport class PgJsonCodec extends CodecImpl<\n typeof PG_JSON_CODEC_ID,\n readonly [],\n string | JsonValue,\n JsonValue\n> {\n async encode(value: JsonValue, _ctx: CodecCallContext): Promise<string> {\n return pgJsonEncode(value);\n }\n async decode(wire: string | JsonValue, _ctx: CodecCallContext): Promise<JsonValue> {\n return pgJsonDecode(wire);\n }\n encodeJson(value: JsonValue): JsonValue {\n return value;\n }\n decodeJson(json: JsonValue): JsonValue {\n return json;\n }\n}\n\nexport class PgJsonDescriptor extends PostgresCodecDescriptor<void> {\n protected override nativeType(): string {\n return PG_JSON_META.db.sql.postgres.nativeType;\n }\n protected override jsonProjection(expression: ProjectionExpr): ProjectionExpr {\n return expression;\n }\n override readonly codecId = PG_JSON_CODEC_ID;\n override readonly traits = [] as const;\n override readonly targetTypes = ['json'] as const;\n override readonly meta = PG_JSON_META;\n override readonly paramsSchema: StandardSchemaV1<void> = voidParamsSchema;\n override factory(): (ctx: CodecInstanceContext) => PgJsonCodec {\n return () => new PgJsonCodec(this);\n }\n}\n\nexport const pgJsonDescriptor = new PgJsonDescriptor();\n\nexport const pgJsonColumn = () =>\n column(pgJsonDescriptor.factory(), pgJsonDescriptor.codecId, undefined, 'json');\n\npgJsonColumn satisfies ColumnHelperFor<PgJsonDescriptor>;\npgJsonColumn satisfies ColumnHelperForStrict<PgJsonDescriptor>;\n\nexport class PgJsonbCodec extends CodecImpl<\n typeof PG_JSONB_CODEC_ID,\n readonly ['equality'],\n string | JsonValue,\n JsonValue\n> {\n async encode(value: JsonValue, _ctx: CodecCallContext): Promise<string> {\n return pgJsonbEncode(value);\n }\n async decode(wire: string | JsonValue, _ctx: CodecCallContext): Promise<JsonValue> {\n return pgJsonbDecode(wire);\n }\n encodeJson(value: JsonValue): JsonValue {\n return value;\n }\n decodeJson(json: JsonValue): JsonValue {\n return json;\n }\n}\n\nexport class PgJsonbDescriptor extends PostgresCodecDescriptor<void> {\n protected override nativeType(): string {\n return PG_JSONB_META.db.sql.postgres.nativeType;\n }\n protected override jsonProjection(expression: ProjectionExpr): ProjectionExpr {\n return expression;\n }\n override readonly codecId = PG_JSONB_CODEC_ID;\n override readonly traits = ['equality'] as const;\n override readonly targetTypes = ['jsonb'] as const;\n override readonly meta = PG_JSONB_META;\n override readonly paramsSchema: StandardSchemaV1<void> = voidParamsSchema;\n override factory(): (ctx: CodecInstanceContext) => PgJsonbCodec {\n return () => new PgJsonbCodec(this);\n }\n}\n\nexport const pgJsonbDescriptor = new PgJsonbDescriptor();\n\nexport const pgJsonbColumn = () =>\n column(pgJsonbDescriptor.factory(), pgJsonbDescriptor.codecId, undefined, 'jsonb');\n\npgJsonbColumn satisfies ColumnHelperFor<PgJsonbDescriptor>;\npgJsonbColumn satisfies ColumnHelperForStrict<PgJsonbDescriptor>;\n\n// `meta`. The factories instantiate the SQL-base codec class (`SqlCharCodec` etc.) passing `this` (the pg-alias descriptor) so `codec.id` resolves to the pg-alias codec id via `CodecImpl`'s `descriptor.codecId` proxy. ---------------------------------------------------------------------------\n\nconst PG_CHAR_META = { db: { sql: { postgres: { nativeType: 'character' } } } } as const;\nconst PG_VARCHAR_META = {\n db: { sql: { postgres: { nativeType: 'character varying' } } },\n} as const;\nconst PG_INT_META = { db: { sql: { postgres: { nativeType: 'integer' } } } } as const;\nconst PG_FLOAT_META = { db: { sql: { postgres: { nativeType: 'double precision' } } } } as const;\n\nexport class PgCharDescriptor extends PostgresCodecDescriptor<LengthParams> {\n protected override nativeType(): string {\n return PG_CHAR_META.db.sql.postgres.nativeType;\n }\n protected override jsonProjection(expression: ProjectionExpr): ProjectionExpr {\n return expression;\n }\n override readonly codecId = PG_CHAR_CODEC_ID;\n override readonly targetTypes = ['character'] as const;\n override readonly meta = PG_CHAR_META;\n override readonly traits = sqlCharDescriptor.traits;\n override readonly paramsSchema = sqlCharDescriptor.paramsSchema;\n override renderOutputType(params: LengthParams): string | undefined {\n return sqlCharDescriptor.renderOutputType(params);\n }\n override renderValueLiteral(value: JsonValue): string | undefined {\n return renderTsLiteral(value);\n }\n override factory(_params: LengthParams): (ctx: CodecInstanceContext) => SqlCharCodec {\n return () => new SqlCharCodec(this);\n }\n}\n\nexport const pgCharDescriptor = new PgCharDescriptor();\n\nexport const pgCharColumn = (params: LengthParams = {}) =>\n column(pgCharDescriptor.factory(params), pgCharDescriptor.codecId, params, 'character');\n\npgCharColumn satisfies ColumnHelperFor<PgCharDescriptor>;\n\nexport class PgVarcharDescriptor extends PostgresCodecDescriptor<LengthParams> {\n protected override nativeType(): string {\n return PG_VARCHAR_META.db.sql.postgres.nativeType;\n }\n protected override jsonProjection(expression: ProjectionExpr): ProjectionExpr {\n return expression;\n }\n override readonly codecId = PG_VARCHAR_CODEC_ID;\n override readonly targetTypes = ['character varying'] as const;\n override readonly meta = PG_VARCHAR_META;\n override readonly traits = sqlVarcharDescriptor.traits;\n override readonly paramsSchema = sqlVarcharDescriptor.paramsSchema;\n override renderOutputType(params: LengthParams): string | undefined {\n return sqlVarcharDescriptor.renderOutputType(params);\n }\n override renderValueLiteral(value: JsonValue): string | undefined {\n return renderTsLiteral(value);\n }\n override factory(_params: LengthParams): (ctx: CodecInstanceContext) => SqlVarcharCodec {\n return () => new SqlVarcharCodec(this);\n }\n}\n\nexport const pgVarcharDescriptor = new PgVarcharDescriptor();\n\nexport const pgVarcharColumn = (params: LengthParams = {}) =>\n column(\n pgVarcharDescriptor.factory(params),\n pgVarcharDescriptor.codecId,\n params,\n 'character varying',\n );\n\npgVarcharColumn satisfies ColumnHelperFor<PgVarcharDescriptor>;\n\nexport class PgIntDescriptor extends PostgresCodecDescriptor<void> {\n protected override nativeType(): string {\n return PG_INT_META.db.sql.postgres.nativeType;\n }\n protected override jsonProjection(expression: ProjectionExpr): ProjectionExpr {\n return expression;\n }\n override readonly codecId = PG_INT_CODEC_ID;\n override readonly targetTypes = ['int4'] as const;\n override readonly meta = PG_INT_META;\n override readonly traits = sqlIntDescriptor.traits;\n override readonly paramsSchema = sqlIntDescriptor.paramsSchema;\n override renderValueLiteral(value: JsonValue): string | undefined {\n return renderTsLiteral(value);\n }\n override factory(): (ctx: CodecInstanceContext) => SqlIntCodec {\n return () => new SqlIntCodec(this);\n }\n}\n\nexport const pgIntDescriptor = new PgIntDescriptor();\n\nexport const pgIntColumn = () =>\n column(pgIntDescriptor.factory(), pgIntDescriptor.codecId, undefined, 'int4');\n\npgIntColumn satisfies ColumnHelperFor<PgIntDescriptor>;\n\nexport class PgFloatDescriptor extends PostgresCodecDescriptor<void> {\n protected override nativeType(): string {\n return PG_FLOAT_META.db.sql.postgres.nativeType;\n }\n protected override jsonProjection(expression: ProjectionExpr): ProjectionExpr {\n return expression;\n }\n override readonly codecId = PG_FLOAT_CODEC_ID;\n override readonly targetTypes = ['float8'] as const;\n override readonly meta = PG_FLOAT_META;\n override readonly traits = sqlFloatDescriptor.traits;\n override readonly paramsSchema = sqlFloatDescriptor.paramsSchema;\n override renderValueLiteral(value: JsonValue): string | undefined {\n return renderTsLiteral(value);\n }\n override factory(): (ctx: CodecInstanceContext) => SqlFloatCodec {\n return () => new SqlFloatCodec(this);\n }\n}\n\nexport const pgFloatDescriptor = new PgFloatDescriptor();\n\nexport const pgFloatColumn = () =>\n column(pgFloatDescriptor.factory(), pgFloatDescriptor.codecId, undefined, 'float8');\n\npgFloatColumn satisfies ColumnHelperFor<PgFloatDescriptor>;\n\n// `ExtractCodecTypes` to derive `CodecTypes`. ---------------------------------------------------------------------------\n\nexport const codecDescriptors = definePostgresCodecs([\n postgresSqlCharDescriptor,\n postgresSqlVarcharDescriptor,\n postgresSqlIntDescriptor,\n postgresSqlFloatDescriptor,\n postgresSqlTextDescriptor,\n postgresSqlTimestampDescriptor,\n pgTextDescriptor,\n pgEnumDescriptor,\n pgCharDescriptor,\n pgVarcharDescriptor,\n pgIntDescriptor,\n pgFloatDescriptor,\n pgInt4Descriptor,\n pgInt2Descriptor,\n pgInt8Descriptor,\n pgFloat4Descriptor,\n pgFloat8Descriptor,\n pgNumericDescriptor,\n // PSL `Date` pins this codec by ID rather than activating a second target-type mapping.\n pgDateDescriptor,\n pgTimestampDescriptor,\n pgTimestamptzDescriptor,\n pgTimeDescriptor,\n pgTimetzDescriptor,\n pgBoolDescriptor,\n pgBitDescriptor,\n pgVarbitDescriptor,\n pgByteaDescriptor,\n pgUuidDescriptor,\n pgInetDescriptor,\n pgIntervalDescriptor,\n pgJsonDescriptor,\n pgJsonbDescriptor,\n pgTextArrayDescriptor,\n]);\n"],"mappings":";;;;;;;;;;;AAWA,SAAgB,aACd,UACA,YACoB;CACpB,MAAM,SAAS,WAAW;CAC1B,IAAI,WAAW,KAAA,GACb;CAEF,IAAI,OAAO,WAAW,YAAY,CAAC,OAAO,SAAS,MAAM,KAAK,CAAC,OAAO,UAAU,MAAM,GACpF,MAAM,cACJ,+BACA,iEAAiE,SAAS,QAAQ,OAAO,MAAM,KAC/F,EAAE,MAAM;EAAE,YAAY;EAAU,OAAO;EAAU,UAAU,OAAO,MAAM;CAAE,EAAE,CAC9E;CAEF,OAAO,GAAG,SAAS,GAAG,OAAO;AAC/B;AAEA,SAAgB,gBAAgB,UAAkB,YAA6C;CAC7F,MAAM,YAAY,WAAW;CAC7B,IAAI,cAAc,KAAA,GAChB,OAAO;CAET,IACE,OAAO,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,QAAQ,GAAG,kBAAkB,SAAS,KAAA,GAAW,QAAQ;AAMpF,MAAa,mBAAmB,qBAAqB;CACnD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { r as PostgresCodecDescriptor } from "./codec-descriptor-C4SaWX0P.mjs";
|
|
1
2
|
import { C as PG_TIMETZ_CODEC_ID, E as PG_VARBIT_CODEC_ID, S as PG_TIMESTAMP_CODEC_ID, T as PG_UUID_CODEC_ID, _ as PG_JSON_CODEC_ID, a as PG_DATE_CODEC_ID, b as PG_TEXT_CODEC_ID, c as PG_FLOAT8_CODEC_ID, d as PG_INT2_CODEC_ID, f as PG_INT4_CODEC_ID, g as PG_JSONB_CODEC_ID, m as PG_INTERVAL_CODEC_ID, n as PG_BOOL_CODEC_ID, o as PG_ENUM_CODEC_ID, p as PG_INT8_CODEC_ID, r as PG_BYTEA_CODEC_ID, s as PG_FLOAT4_CODEC_ID, t as PG_BIT_CODEC_ID, u as PG_INET_CODEC_ID, v as PG_NUMERIC_CODEC_ID, w as PG_TIME_CODEC_ID, x as PG_TIMESTAMPTZ_CODEC_ID } from "./codec-ids-BswpvvND.mjs";
|
|
2
|
-
import { SqlCharCodec, SqlFloatCodec, SqlIntCodec, SqlVarcharCodec } from "@prisma-next/sql-relational-core/ast";
|
|
3
|
-
import {
|
|
3
|
+
import { ProjectionExpr, SqlCharCodec, SqlFloatCodec, SqlIntCodec, SqlVarcharCodec } from "@prisma-next/sql-relational-core/ast";
|
|
4
|
+
import { CodecCallContext, CodecImpl, CodecInstanceContext, CodecMeta } from "@prisma-next/framework-components/codec";
|
|
4
5
|
import { JsonValue } from "@prisma-next/contract/types";
|
|
5
6
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
6
7
|
//#region src/core/codecs.d.ts
|
|
@@ -20,7 +21,9 @@ declare class PgTextCodec extends CodecImpl<typeof PG_TEXT_CODEC_ID, readonly ['
|
|
|
20
21
|
encodeJson(value: string): JsonValue;
|
|
21
22
|
decodeJson(json: JsonValue): string;
|
|
22
23
|
}
|
|
23
|
-
declare class PgTextDescriptor extends
|
|
24
|
+
declare class PgTextDescriptor extends PostgresCodecDescriptor<void> {
|
|
25
|
+
protected nativeType(): string;
|
|
26
|
+
protected jsonProjection(expression: ProjectionExpr): ProjectionExpr;
|
|
24
27
|
readonly codecId: "pg/text@1";
|
|
25
28
|
readonly traits: readonly ["equality", "order", "textual"];
|
|
26
29
|
readonly targetTypes: readonly ["text"];
|
|
@@ -68,7 +71,9 @@ type PgEnumParams = {
|
|
|
68
71
|
* column to a named database type (a native enum's `CREATE TYPE` name).
|
|
69
72
|
*/
|
|
70
73
|
declare function isPgEnumParams(value: unknown): value is PgEnumParams;
|
|
71
|
-
declare class PgEnumDescriptor extends
|
|
74
|
+
declare class PgEnumDescriptor extends PostgresCodecDescriptor<PgEnumParams> {
|
|
75
|
+
protected nativeType(params: PgEnumParams): string;
|
|
76
|
+
protected jsonProjection(expression: ProjectionExpr): ProjectionExpr;
|
|
72
77
|
readonly codecId: "pg/enum@1";
|
|
73
78
|
readonly traits: readonly ["equality", "order", "textual"];
|
|
74
79
|
readonly targetTypes: readonly ["text"];
|
|
@@ -145,7 +150,9 @@ declare class PgInt4Codec extends CodecImpl<typeof PG_INT4_CODEC_ID, readonly ['
|
|
|
145
150
|
encodeJson(value: number): JsonValue;
|
|
146
151
|
decodeJson(json: JsonValue): number;
|
|
147
152
|
}
|
|
148
|
-
declare class PgInt4Descriptor extends
|
|
153
|
+
declare class PgInt4Descriptor extends PostgresCodecDescriptor<void> {
|
|
154
|
+
protected nativeType(): string;
|
|
155
|
+
protected jsonProjection(expression: ProjectionExpr): ProjectionExpr;
|
|
149
156
|
readonly codecId: "pg/int4@1";
|
|
150
157
|
readonly traits: readonly ["equality", "order", "numeric"];
|
|
151
158
|
readonly targetTypes: readonly ["int4"];
|
|
@@ -169,7 +176,9 @@ declare class PgInt2Codec extends CodecImpl<typeof PG_INT2_CODEC_ID, readonly ['
|
|
|
169
176
|
encodeJson(value: number): JsonValue;
|
|
170
177
|
decodeJson(json: JsonValue): number;
|
|
171
178
|
}
|
|
172
|
-
declare class PgInt2Descriptor extends
|
|
179
|
+
declare class PgInt2Descriptor extends PostgresCodecDescriptor<void> {
|
|
180
|
+
protected nativeType(): string;
|
|
181
|
+
protected jsonProjection(expression: ProjectionExpr): ProjectionExpr;
|
|
173
182
|
readonly codecId: "pg/int2@1";
|
|
174
183
|
readonly traits: readonly ["equality", "order", "numeric"];
|
|
175
184
|
readonly targetTypes: readonly ["int2"];
|
|
@@ -193,7 +202,9 @@ declare class PgInt8Codec extends CodecImpl<typeof PG_INT8_CODEC_ID, readonly ['
|
|
|
193
202
|
encodeJson(value: number): JsonValue;
|
|
194
203
|
decodeJson(json: JsonValue): number;
|
|
195
204
|
}
|
|
196
|
-
declare class PgInt8Descriptor extends
|
|
205
|
+
declare class PgInt8Descriptor extends PostgresCodecDescriptor<void> {
|
|
206
|
+
protected nativeType(): string;
|
|
207
|
+
protected jsonProjection(expression: ProjectionExpr): ProjectionExpr;
|
|
197
208
|
readonly codecId: "pg/int8@1";
|
|
198
209
|
readonly traits: readonly ["equality", "order", "numeric"];
|
|
199
210
|
readonly targetTypes: readonly ["int8"];
|
|
@@ -217,7 +228,9 @@ declare class PgFloat4Codec extends CodecImpl<typeof PG_FLOAT4_CODEC_ID, readonl
|
|
|
217
228
|
encodeJson(value: number): JsonValue;
|
|
218
229
|
decodeJson(json: JsonValue): number;
|
|
219
230
|
}
|
|
220
|
-
declare class PgFloat4Descriptor extends
|
|
231
|
+
declare class PgFloat4Descriptor extends PostgresCodecDescriptor<void> {
|
|
232
|
+
protected nativeType(): string;
|
|
233
|
+
protected jsonProjection(expression: ProjectionExpr): ProjectionExpr;
|
|
221
234
|
readonly codecId: "pg/float4@1";
|
|
222
235
|
readonly traits: readonly ["equality", "order", "numeric"];
|
|
223
236
|
readonly targetTypes: readonly ["float4"];
|
|
@@ -241,7 +254,9 @@ declare class PgFloat8Codec extends CodecImpl<typeof PG_FLOAT8_CODEC_ID, readonl
|
|
|
241
254
|
encodeJson(value: number): JsonValue;
|
|
242
255
|
decodeJson(json: JsonValue): number;
|
|
243
256
|
}
|
|
244
|
-
declare class PgFloat8Descriptor extends
|
|
257
|
+
declare class PgFloat8Descriptor extends PostgresCodecDescriptor<void> {
|
|
258
|
+
protected nativeType(): string;
|
|
259
|
+
protected jsonProjection(expression: ProjectionExpr): ProjectionExpr;
|
|
245
260
|
readonly codecId: "pg/float8@1";
|
|
246
261
|
readonly traits: readonly ["equality", "order", "numeric"];
|
|
247
262
|
readonly targetTypes: readonly ["float8"];
|
|
@@ -265,7 +280,9 @@ declare class PgBoolCodec extends CodecImpl<typeof PG_BOOL_CODEC_ID, readonly ['
|
|
|
265
280
|
encodeJson(value: boolean): JsonValue;
|
|
266
281
|
decodeJson(json: JsonValue): boolean;
|
|
267
282
|
}
|
|
268
|
-
declare class PgBoolDescriptor extends
|
|
283
|
+
declare class PgBoolDescriptor extends PostgresCodecDescriptor<void> {
|
|
284
|
+
protected nativeType(): string;
|
|
285
|
+
protected jsonProjection(expression: ProjectionExpr): ProjectionExpr;
|
|
269
286
|
readonly codecId: "pg/bool@1";
|
|
270
287
|
readonly traits: readonly ["equality", "boolean"];
|
|
271
288
|
readonly targetTypes: readonly ["bool"];
|
|
@@ -289,7 +306,9 @@ declare class PgNumericCodec extends CodecImpl<typeof PG_NUMERIC_CODEC_ID, reado
|
|
|
289
306
|
encodeJson(value: string): JsonValue;
|
|
290
307
|
decodeJson(json: JsonValue): string;
|
|
291
308
|
}
|
|
292
|
-
declare class PgNumericDescriptor extends
|
|
309
|
+
declare class PgNumericDescriptor extends PostgresCodecDescriptor<NumericParams> {
|
|
310
|
+
protected nativeType(): string;
|
|
311
|
+
protected jsonProjection(expression: ProjectionExpr): ProjectionExpr;
|
|
293
312
|
readonly codecId: "pg/numeric@1";
|
|
294
313
|
readonly traits: readonly ["equality", "order", "numeric"];
|
|
295
314
|
readonly targetTypes: readonly ["numeric", "decimal"];
|
|
@@ -322,7 +341,9 @@ declare class PgDateCodec extends CodecImpl<typeof PG_DATE_CODEC_ID, readonly ['
|
|
|
322
341
|
encodeJson(value: Date): JsonValue;
|
|
323
342
|
decodeJson(json: JsonValue): Date;
|
|
324
343
|
}
|
|
325
|
-
declare class PgDateDescriptor extends
|
|
344
|
+
declare class PgDateDescriptor extends PostgresCodecDescriptor<void> {
|
|
345
|
+
protected nativeType(): string;
|
|
346
|
+
protected jsonProjection(expression: ProjectionExpr): ProjectionExpr;
|
|
326
347
|
readonly codecId: "pg/date@1";
|
|
327
348
|
readonly traits: readonly ["equality", "order"];
|
|
328
349
|
readonly targetTypes: readonly ["date"];
|
|
@@ -345,7 +366,9 @@ declare class PgTimestampCodec extends CodecImpl<typeof PG_TIMESTAMP_CODEC_ID, r
|
|
|
345
366
|
encodeJson(value: Date): JsonValue;
|
|
346
367
|
decodeJson(json: JsonValue): Date;
|
|
347
368
|
}
|
|
348
|
-
declare class PgTimestampDescriptor extends
|
|
369
|
+
declare class PgTimestampDescriptor extends PostgresCodecDescriptor<PrecisionParams> {
|
|
370
|
+
protected nativeType(): string;
|
|
371
|
+
protected jsonProjection(expression: ProjectionExpr): ProjectionExpr;
|
|
349
372
|
readonly codecId: "pg/timestamp@1";
|
|
350
373
|
readonly traits: readonly ["equality", "order"];
|
|
351
374
|
readonly targetTypes: readonly ["timestamp"];
|
|
@@ -371,7 +394,9 @@ declare class PgTimestamptzCodec extends CodecImpl<typeof PG_TIMESTAMPTZ_CODEC_I
|
|
|
371
394
|
encodeJson(value: Date): JsonValue;
|
|
372
395
|
decodeJson(json: JsonValue): Date;
|
|
373
396
|
}
|
|
374
|
-
declare class PgTimestamptzDescriptor extends
|
|
397
|
+
declare class PgTimestamptzDescriptor extends PostgresCodecDescriptor<PrecisionParams> {
|
|
398
|
+
protected nativeType(): string;
|
|
399
|
+
protected jsonProjection(expression: ProjectionExpr): ProjectionExpr;
|
|
375
400
|
readonly codecId: "pg/timestamptz@1";
|
|
376
401
|
readonly traits: readonly ["equality", "order"];
|
|
377
402
|
readonly targetTypes: readonly ["timestamptz"];
|
|
@@ -397,7 +422,9 @@ declare class PgTimeCodec extends CodecImpl<typeof PG_TIME_CODEC_ID, readonly ['
|
|
|
397
422
|
encodeJson(value: string): JsonValue;
|
|
398
423
|
decodeJson(json: JsonValue): string;
|
|
399
424
|
}
|
|
400
|
-
declare class PgTimeDescriptor extends
|
|
425
|
+
declare class PgTimeDescriptor extends PostgresCodecDescriptor<PrecisionParams> {
|
|
426
|
+
protected nativeType(): string;
|
|
427
|
+
protected jsonProjection(expression: ProjectionExpr): ProjectionExpr;
|
|
401
428
|
readonly codecId: "pg/time@1";
|
|
402
429
|
readonly traits: readonly ["equality", "order"];
|
|
403
430
|
readonly targetTypes: readonly ["time"];
|
|
@@ -423,7 +450,9 @@ declare class PgTimetzCodec extends CodecImpl<typeof PG_TIMETZ_CODEC_ID, readonl
|
|
|
423
450
|
encodeJson(value: string): JsonValue;
|
|
424
451
|
decodeJson(json: JsonValue): string;
|
|
425
452
|
}
|
|
426
|
-
declare class PgTimetzDescriptor extends
|
|
453
|
+
declare class PgTimetzDescriptor extends PostgresCodecDescriptor<PrecisionParams> {
|
|
454
|
+
protected nativeType(): string;
|
|
455
|
+
protected jsonProjection(expression: ProjectionExpr): ProjectionExpr;
|
|
427
456
|
readonly codecId: "pg/timetz@1";
|
|
428
457
|
readonly traits: readonly ["equality", "order"];
|
|
429
458
|
readonly targetTypes: readonly ["timetz"];
|
|
@@ -449,7 +478,9 @@ declare class PgBitCodec extends CodecImpl<typeof PG_BIT_CODEC_ID, readonly ['eq
|
|
|
449
478
|
encodeJson(value: string): JsonValue;
|
|
450
479
|
decodeJson(json: JsonValue): string;
|
|
451
480
|
}
|
|
452
|
-
declare class PgBitDescriptor extends
|
|
481
|
+
declare class PgBitDescriptor extends PostgresCodecDescriptor<LengthParams> {
|
|
482
|
+
protected nativeType(): string;
|
|
483
|
+
protected jsonProjection(expression: ProjectionExpr): ProjectionExpr;
|
|
453
484
|
readonly codecId: "pg/bit@1";
|
|
454
485
|
readonly traits: readonly ["equality", "order"];
|
|
455
486
|
readonly targetTypes: readonly ["bit"];
|
|
@@ -475,7 +506,9 @@ declare class PgVarbitCodec extends CodecImpl<typeof PG_VARBIT_CODEC_ID, readonl
|
|
|
475
506
|
encodeJson(value: string): JsonValue;
|
|
476
507
|
decodeJson(json: JsonValue): string;
|
|
477
508
|
}
|
|
478
|
-
declare class PgVarbitDescriptor extends
|
|
509
|
+
declare class PgVarbitDescriptor extends PostgresCodecDescriptor<LengthParams> {
|
|
510
|
+
protected nativeType(): string;
|
|
511
|
+
protected jsonProjection(expression: ProjectionExpr): ProjectionExpr;
|
|
479
512
|
readonly codecId: "pg/varbit@1";
|
|
480
513
|
readonly traits: readonly ["equality", "order"];
|
|
481
514
|
readonly targetTypes: readonly ["bit varying"];
|
|
@@ -501,7 +534,9 @@ declare class PgByteaCodec extends CodecImpl<typeof PG_BYTEA_CODEC_ID, readonly
|
|
|
501
534
|
encodeJson(value: Uint8Array): JsonValue;
|
|
502
535
|
decodeJson(json: JsonValue): Uint8Array;
|
|
503
536
|
}
|
|
504
|
-
declare class PgByteaDescriptor extends
|
|
537
|
+
declare class PgByteaDescriptor extends PostgresCodecDescriptor<void> {
|
|
538
|
+
protected nativeType(): string;
|
|
539
|
+
protected jsonProjection(expression: ProjectionExpr): ProjectionExpr;
|
|
505
540
|
readonly codecId: "pg/bytea@1";
|
|
506
541
|
readonly traits: readonly ["equality"];
|
|
507
542
|
readonly targetTypes: readonly ["bytea"];
|
|
@@ -523,7 +558,9 @@ declare class PgUuidCodec extends CodecImpl<typeof PG_UUID_CODEC_ID, readonly ['
|
|
|
523
558
|
encodeJson(value: string): JsonValue;
|
|
524
559
|
decodeJson(json: JsonValue): string;
|
|
525
560
|
}
|
|
526
|
-
declare class PgUuidDescriptor extends
|
|
561
|
+
declare class PgUuidDescriptor extends PostgresCodecDescriptor<void> {
|
|
562
|
+
protected nativeType(): string;
|
|
563
|
+
protected jsonProjection(expression: ProjectionExpr): ProjectionExpr;
|
|
527
564
|
readonly codecId: "pg/uuid@1";
|
|
528
565
|
readonly traits: readonly ["equality", "order"];
|
|
529
566
|
readonly targetTypes: readonly ["uuid"];
|
|
@@ -546,7 +583,9 @@ declare class PgInetCodec extends CodecImpl<typeof PG_INET_CODEC_ID, readonly ['
|
|
|
546
583
|
encodeJson(value: string): JsonValue;
|
|
547
584
|
decodeJson(json: JsonValue): string;
|
|
548
585
|
}
|
|
549
|
-
declare class PgInetDescriptor extends
|
|
586
|
+
declare class PgInetDescriptor extends PostgresCodecDescriptor<void> {
|
|
587
|
+
protected nativeType(): string;
|
|
588
|
+
protected jsonProjection(expression: ProjectionExpr): ProjectionExpr;
|
|
550
589
|
readonly codecId: "pg/inet@1";
|
|
551
590
|
readonly traits: readonly ["equality", "order"];
|
|
552
591
|
readonly targetTypes: readonly ["inet"];
|
|
@@ -569,7 +608,9 @@ declare class PgIntervalCodec extends CodecImpl<typeof PG_INTERVAL_CODEC_ID, rea
|
|
|
569
608
|
encodeJson(value: string): JsonValue;
|
|
570
609
|
decodeJson(json: JsonValue): string;
|
|
571
610
|
}
|
|
572
|
-
declare class PgIntervalDescriptor extends
|
|
611
|
+
declare class PgIntervalDescriptor extends PostgresCodecDescriptor<PrecisionParams> {
|
|
612
|
+
protected nativeType(): string;
|
|
613
|
+
protected jsonProjection(expression: ProjectionExpr): ProjectionExpr;
|
|
573
614
|
readonly codecId: "pg/interval@1";
|
|
574
615
|
readonly traits: readonly ["equality", "order"];
|
|
575
616
|
readonly targetTypes: readonly ["interval"];
|
|
@@ -595,7 +636,9 @@ declare class PgJsonCodec extends CodecImpl<typeof PG_JSON_CODEC_ID, readonly []
|
|
|
595
636
|
encodeJson(value: JsonValue): JsonValue;
|
|
596
637
|
decodeJson(json: JsonValue): JsonValue;
|
|
597
638
|
}
|
|
598
|
-
declare class PgJsonDescriptor extends
|
|
639
|
+
declare class PgJsonDescriptor extends PostgresCodecDescriptor<void> {
|
|
640
|
+
protected nativeType(): string;
|
|
641
|
+
protected jsonProjection(expression: ProjectionExpr): ProjectionExpr;
|
|
599
642
|
readonly codecId: "pg/json@1";
|
|
600
643
|
readonly traits: readonly [];
|
|
601
644
|
readonly targetTypes: readonly ["json"];
|
|
@@ -618,7 +661,9 @@ declare class PgJsonbCodec extends CodecImpl<typeof PG_JSONB_CODEC_ID, readonly
|
|
|
618
661
|
encodeJson(value: JsonValue): JsonValue;
|
|
619
662
|
decodeJson(json: JsonValue): JsonValue;
|
|
620
663
|
}
|
|
621
|
-
declare class PgJsonbDescriptor extends
|
|
664
|
+
declare class PgJsonbDescriptor extends PostgresCodecDescriptor<void> {
|
|
665
|
+
protected nativeType(): string;
|
|
666
|
+
protected jsonProjection(expression: ProjectionExpr): ProjectionExpr;
|
|
622
667
|
readonly codecId: "pg/jsonb@1";
|
|
623
668
|
readonly traits: readonly ["equality"];
|
|
624
669
|
readonly targetTypes: readonly ["jsonb"];
|
|
@@ -635,7 +680,9 @@ declare class PgJsonbDescriptor extends CodecDescriptorImpl<void> {
|
|
|
635
680
|
factory(): (ctx: CodecInstanceContext) => PgJsonbCodec;
|
|
636
681
|
}
|
|
637
682
|
declare const pgJsonbColumn: () => import("@prisma-next/framework-components/codec").ColumnSpec<PgJsonbCodec, undefined>;
|
|
638
|
-
declare class PgCharDescriptor extends
|
|
683
|
+
declare class PgCharDescriptor extends PostgresCodecDescriptor<LengthParams> {
|
|
684
|
+
protected nativeType(): string;
|
|
685
|
+
protected jsonProjection(expression: ProjectionExpr): ProjectionExpr;
|
|
639
686
|
readonly codecId: "pg/char@1";
|
|
640
687
|
readonly targetTypes: readonly ["character"];
|
|
641
688
|
readonly meta: {
|
|
@@ -658,7 +705,9 @@ declare class PgCharDescriptor extends CodecDescriptorImpl<LengthParams> {
|
|
|
658
705
|
factory(_params: LengthParams): (ctx: CodecInstanceContext) => SqlCharCodec;
|
|
659
706
|
}
|
|
660
707
|
declare const pgCharColumn: (params?: LengthParams) => import("@prisma-next/framework-components/codec").ColumnSpec<SqlCharCodec, LengthParams>;
|
|
661
|
-
declare class PgVarcharDescriptor extends
|
|
708
|
+
declare class PgVarcharDescriptor extends PostgresCodecDescriptor<LengthParams> {
|
|
709
|
+
protected nativeType(): string;
|
|
710
|
+
protected jsonProjection(expression: ProjectionExpr): ProjectionExpr;
|
|
662
711
|
readonly codecId: "pg/varchar@1";
|
|
663
712
|
readonly targetTypes: readonly ["character varying"];
|
|
664
713
|
readonly meta: {
|
|
@@ -681,7 +730,9 @@ declare class PgVarcharDescriptor extends CodecDescriptorImpl<LengthParams> {
|
|
|
681
730
|
factory(_params: LengthParams): (ctx: CodecInstanceContext) => SqlVarcharCodec;
|
|
682
731
|
}
|
|
683
732
|
declare const pgVarcharColumn: (params?: LengthParams) => import("@prisma-next/framework-components/codec").ColumnSpec<SqlVarcharCodec, LengthParams>;
|
|
684
|
-
declare class PgIntDescriptor extends
|
|
733
|
+
declare class PgIntDescriptor extends PostgresCodecDescriptor<void> {
|
|
734
|
+
protected nativeType(): string;
|
|
735
|
+
protected jsonProjection(expression: ProjectionExpr): ProjectionExpr;
|
|
685
736
|
readonly codecId: "pg/int@1";
|
|
686
737
|
readonly targetTypes: readonly ["int4"];
|
|
687
738
|
readonly meta: {
|
|
@@ -699,7 +750,9 @@ declare class PgIntDescriptor extends CodecDescriptorImpl<void> {
|
|
|
699
750
|
factory(): (ctx: CodecInstanceContext) => SqlIntCodec;
|
|
700
751
|
}
|
|
701
752
|
declare const pgIntColumn: () => import("@prisma-next/framework-components/codec").ColumnSpec<SqlIntCodec, undefined>;
|
|
702
|
-
declare class PgFloatDescriptor extends
|
|
753
|
+
declare class PgFloatDescriptor extends PostgresCodecDescriptor<void> {
|
|
754
|
+
protected nativeType(): string;
|
|
755
|
+
protected jsonProjection(expression: ProjectionExpr): ProjectionExpr;
|
|
703
756
|
readonly codecId: "pg/float@1";
|
|
704
757
|
readonly targetTypes: readonly ["float8"];
|
|
705
758
|
readonly meta: {
|
|
@@ -719,4 +772,4 @@ declare class PgFloatDescriptor extends CodecDescriptorImpl<void> {
|
|
|
719
772
|
declare const pgFloatColumn: () => import("@prisma-next/framework-components/codec").ColumnSpec<SqlFloatCodec, undefined>;
|
|
720
773
|
//#endregion
|
|
721
774
|
export { pgVarbitColumn as $, pgBitColumn as A, pgInt4Column as B, PgTimestampDescriptor as C, PgVarbitDescriptor as D, PgUuidDescriptor as E, pgFloat4Column as F, pgJsonbColumn as G, pgIntColumn as H, pgFloat8Column as I, pgTimeColumn as J, pgNumericColumn as K, pgFloatColumn as L, pgCharColumn as M, pgDateColumn as N, PgVarcharDescriptor as O, pgEnumDescriptor as P, pgUuidColumn as Q, pgInetColumn as R, PgTimeDescriptor as S, PgTimetzDescriptor as T, pgIntervalColumn as U, pgInt8Column as V, pgJsonColumn as W, pgTimestamptzColumn as X, pgTimestampColumn as Y, pgTimetzColumn as Z, PgIntervalDescriptor as _, PgDateDescriptor as a, PgNumericDescriptor as b, PgEnumParams as c, PgFloatDescriptor as d, pgVarcharColumn as et, PgInetDescriptor as f, PgIntDescriptor as g, PgInt8Descriptor as h, PgCharDescriptor as i, pgBoolColumn as j, isPgEnumParams as k, PgFloat4Descriptor as l, PgInt4Descriptor as m, PgBoolDescriptor as n, PgEnumCodec as o, PgInt2Descriptor as p, pgTextColumn as q, PgByteaDescriptor as r, PgEnumDescriptor as s, PgBitDescriptor as t, postgresQualifyColumnType as tt, PgFloat8Descriptor as u, PgJsonDescriptor as v, PgTimestamptzDescriptor as w, PgTextDescriptor as x, PgJsonbDescriptor as y, pgInt2Column as z };
|
|
722
|
-
//# sourceMappingURL=codecs-
|
|
775
|
+
//# sourceMappingURL=codecs-Cd4TftwI.d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Y,KAAK,yBAAyB;;cAOxC,uEAAa,WAAA;cAeb,yBAAyB,wBAAwB;YACzC;YAGA,eAAe,YAAY,iBAAiB;WAG7C;WACA;WACA;;;;;;;;;WACA;WACA,cAAY;;;;;EACrB,iBAAiB,QAAQ;EAGzB,mBAAmB,OAAO;EAG1B,QAAQ,SAAS,gBAAgB,KAAK,yBAAyB;;cAO7D,eAAgB,SAAQ,mEAAiB,WAAA,cAAA;cAKzC,4BAA4B,wBAAwB;YAC5C;YAGA,eAAe,YAAY,iBAAiB;WAG7C;WACA;WACA;;;;;;;;;WACA;WACA,cAAY;;;;;EACrB,iBAAiB,QAAQ;EAGzB,mBAAmB,OAAO;EAG1B,QAAQ,SAAS,gBAAgB,KAAK,yBAAyB;;cAO7D,kBAAmB,SAAQ,mEAAiB,WAAA,iBAAA;cAU5C,wBAAwB;YAChB;YAGA,eAAe,YAAY,iBAAiB;WAG7C;WACA;WACA;;;;;;;;;WACA;WACA,cAAY;EACrB,mBAAmB,OAAO;EAG1B,YAAY,KAAK,yBAAyB;;cAOxC,qEAAW,WAAA;cAKX,0BAA0B;YAClB;YAGA,eAAe,YAAY,iBAAiB;WAG7C;WACA;WACA;;;;;;;;;WACA;WACA,cAAY;EACrB,mBAAmB,OAAO;EAG1B,YAAY,KAAK,yBAAyB;;cAOxC,uEAAa,WAAA"}
|
package/dist/codecs.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as PostgresCodecDescriptorRegistry } from "./codec-descriptor-C4SaWX0P.mjs";
|
|
2
|
+
import { $ as pgVarbitColumn, A as pgBitColumn, B as pgInt4Column, C as PgTimestampDescriptor, D as PgVarbitDescriptor, E as PgUuidDescriptor, F as pgFloat4Column, G as pgJsonbColumn, H as pgIntColumn, I as pgFloat8Column, J as pgTimeColumn, K as pgNumericColumn, L as pgFloatColumn, M as pgCharColumn, N as pgDateColumn, O as PgVarcharDescriptor, P as pgEnumDescriptor, Q as pgUuidColumn, R as pgInetColumn, S as PgTimeDescriptor, T as PgTimetzDescriptor, U as pgIntervalColumn, V as pgInt8Column, W as pgJsonColumn, X as pgTimestamptzColumn, Y as pgTimestampColumn, Z as pgTimetzColumn, _ as PgIntervalDescriptor, a as PgDateDescriptor, b as PgNumericDescriptor, c as PgEnumParams, d as PgFloatDescriptor, et as pgVarcharColumn, f as PgInetDescriptor, g as PgIntDescriptor, h as PgInt8Descriptor, i as PgCharDescriptor, j as pgBoolColumn, k as isPgEnumParams, l as PgFloat4Descriptor, m as PgInt4Descriptor, n as PgBoolDescriptor, o as PgEnumCodec, p as PgInt2Descriptor, q as pgTextColumn, s as PgEnumDescriptor, t as PgBitDescriptor, u as PgFloat8Descriptor, v as PgJsonDescriptor, w as PgTimestamptzDescriptor, x as PgTextDescriptor, y as PgJsonbDescriptor, z as pgInt2Column } from "./codecs-Cd4TftwI.mjs";
|
|
2
3
|
import { CodecDescriptorRegistry } from "@prisma-next/sql-relational-core/query-lane-context";
|
|
3
4
|
//#region src/core/registry.d.ts
|
|
4
5
|
/**
|
|
@@ -7,6 +8,7 @@ import { CodecDescriptorRegistry } from "@prisma-next/sql-relational-core/query-
|
|
|
7
8
|
* Public consumer surface for the postgres codec set: the postgres adapter and any other consumer that needs to enumerate or look up a postgres codec by id consumes this rather than the raw descriptor array. See ADR 208.
|
|
8
9
|
*/
|
|
9
10
|
declare const postgresCodecRegistry: CodecDescriptorRegistry;
|
|
11
|
+
declare const postgresCodecDescriptorRegistry: PostgresCodecDescriptorRegistry;
|
|
10
12
|
//#endregion
|
|
11
|
-
export { type PgBitDescriptor, type PgBoolDescriptor, type PgCharDescriptor, type PgDateDescriptor, type PgEnumCodec, type PgEnumDescriptor, type PgEnumParams, type PgFloat4Descriptor, type PgFloat8Descriptor, type PgFloatDescriptor, type PgInetDescriptor, type PgInt2Descriptor, type PgInt4Descriptor, type PgInt8Descriptor, type PgIntDescriptor, type PgIntervalDescriptor, type PgJsonDescriptor, type PgJsonbDescriptor, type PgNumericDescriptor, type PgTextDescriptor, type PgTimeDescriptor, type PgTimestampDescriptor, type PgTimestamptzDescriptor, type PgTimetzDescriptor, type PgUuidDescriptor, type PgVarbitDescriptor, type PgVarcharDescriptor, isPgEnumParams, pgBitColumn, pgBoolColumn, pgCharColumn, pgDateColumn, pgEnumDescriptor, pgFloat4Column, pgFloat8Column, pgFloatColumn, pgInetColumn, pgInt2Column, pgInt4Column, pgInt8Column, pgIntColumn, pgIntervalColumn, pgJsonColumn, pgJsonbColumn, pgNumericColumn, pgTextColumn, pgTimeColumn, pgTimestampColumn, pgTimestamptzColumn, pgTimetzColumn, pgUuidColumn, pgVarbitColumn, pgVarcharColumn, postgresCodecRegistry };
|
|
13
|
+
export { type PgBitDescriptor, type PgBoolDescriptor, type PgCharDescriptor, type PgDateDescriptor, type PgEnumCodec, type PgEnumDescriptor, type PgEnumParams, type PgFloat4Descriptor, type PgFloat8Descriptor, type PgFloatDescriptor, type PgInetDescriptor, type PgInt2Descriptor, type PgInt4Descriptor, type PgInt8Descriptor, type PgIntDescriptor, type PgIntervalDescriptor, type PgJsonDescriptor, type PgJsonbDescriptor, type PgNumericDescriptor, type PgTextDescriptor, type PgTimeDescriptor, type PgTimestampDescriptor, type PgTimestamptzDescriptor, type PgTimetzDescriptor, type PgUuidDescriptor, type PgVarbitDescriptor, type PgVarcharDescriptor, isPgEnumParams, pgBitColumn, pgBoolColumn, pgCharColumn, pgDateColumn, pgEnumDescriptor, pgFloat4Column, pgFloat8Column, pgFloatColumn, pgInetColumn, pgInt2Column, pgInt4Column, pgInt8Column, pgIntColumn, pgIntervalColumn, pgJsonColumn, pgJsonbColumn, pgNumericColumn, pgTextColumn, pgTimeColumn, pgTimestampColumn, pgTimestamptzColumn, pgTimetzColumn, pgUuidColumn, pgVarbitColumn, pgVarcharColumn, postgresCodecDescriptorRegistry, postgresCodecRegistry };
|
|
12
14
|
//# sourceMappingURL=codecs.d.mts.map
|
package/dist/codecs.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codecs.d.mts","names":[],"sources":["../src/core/registry.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"codecs.d.mts","names":[],"sources":["../src/core/registry.ts"],"mappings":";;;;;;;;;cAUa,uBAAuB;cAGvB,iCAAA"}
|
package/dist/codecs.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as buildPostgresCodecDescriptorRegistry } from "./codec-descriptor-cuAuPE0Y.mjs";
|
|
2
|
+
import { C as pgTimestamptzColumn, D as pgVarcharColumn, E as pgVarbitColumn, S as pgTimestampColumn, T as pgUuidColumn, _ as pgJsonColumn, a as pgCharColumn, b as pgTextColumn, c as pgFloat4Column, d as pgInetColumn, f as pgInt2Column, g as pgIntervalColumn, h as pgIntColumn, i as pgBoolColumn, l as pgFloat8Column, m as pgInt8Column, n as isPgEnumParams, o as pgDateColumn, p as pgInt4Column, r as pgBitColumn, s as pgEnumDescriptor, t as codecDescriptors, u as pgFloatColumn, v as pgJsonbColumn, w as pgTimetzColumn, x as pgTimeColumn, y as pgNumericColumn } from "./codecs-C-VA-quH.mjs";
|
|
2
3
|
import { buildCodecDescriptorRegistry } from "@prisma-next/sql-relational-core/codec-descriptor-registry";
|
|
3
4
|
//#region src/core/registry.ts
|
|
4
5
|
/**
|
|
@@ -7,7 +8,8 @@ import { buildCodecDescriptorRegistry } from "@prisma-next/sql-relational-core/c
|
|
|
7
8
|
* Public consumer surface for the postgres codec set: the postgres adapter and any other consumer that needs to enumerate or look up a postgres codec by id consumes this rather than the raw descriptor array. See ADR 208.
|
|
8
9
|
*/
|
|
9
10
|
const postgresCodecRegistry = buildCodecDescriptorRegistry(codecDescriptors);
|
|
11
|
+
const postgresCodecDescriptorRegistry = buildPostgresCodecDescriptorRegistry(codecDescriptors);
|
|
10
12
|
//#endregion
|
|
11
|
-
export { isPgEnumParams, pgBitColumn, pgBoolColumn, pgCharColumn, pgDateColumn, pgEnumDescriptor, pgFloat4Column, pgFloat8Column, pgFloatColumn, pgInetColumn, pgInt2Column, pgInt4Column, pgInt8Column, pgIntColumn, pgIntervalColumn, pgJsonColumn, pgJsonbColumn, pgNumericColumn, pgTextColumn, pgTimeColumn, pgTimestampColumn, pgTimestamptzColumn, pgTimetzColumn, pgUuidColumn, pgVarbitColumn, pgVarcharColumn, postgresCodecRegistry };
|
|
13
|
+
export { isPgEnumParams, pgBitColumn, pgBoolColumn, pgCharColumn, pgDateColumn, pgEnumDescriptor, pgFloat4Column, pgFloat8Column, pgFloatColumn, pgInetColumn, pgInt2Column, pgInt4Column, pgInt8Column, pgIntColumn, pgIntervalColumn, pgJsonColumn, pgJsonbColumn, pgNumericColumn, pgTextColumn, pgTimeColumn, pgTimestampColumn, pgTimestamptzColumn, pgTimetzColumn, pgUuidColumn, pgVarbitColumn, pgVarcharColumn, postgresCodecDescriptorRegistry, postgresCodecRegistry };
|
|
12
14
|
|
|
13
15
|
//# sourceMappingURL=codecs.mjs.map
|
package/dist/codecs.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codecs.mjs","names":[],"sources":["../src/core/registry.ts"],"sourcesContent":["import { buildCodecDescriptorRegistry } from '@prisma-next/sql-relational-core/codec-descriptor-registry';\nimport type { CodecDescriptorRegistry } from '@prisma-next/sql-relational-core/query-lane-context';\nimport { codecDescriptors } from './codecs';\n\n/**\n * Registry of every codec descriptor shipped by `@prisma-next/target-postgres`.\n *\n * Public consumer surface for the postgres codec set: the postgres adapter and any other consumer that needs to enumerate or look up a postgres codec by id consumes this rather than the raw descriptor array. See ADR 208.\n */\nexport const postgresCodecRegistry: CodecDescriptorRegistry =\n buildCodecDescriptorRegistry(codecDescriptors);\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"codecs.mjs","names":[],"sources":["../src/core/registry.ts"],"sourcesContent":["import { buildCodecDescriptorRegistry } from '@prisma-next/sql-relational-core/codec-descriptor-registry';\nimport type { CodecDescriptorRegistry } from '@prisma-next/sql-relational-core/query-lane-context';\nimport { buildPostgresCodecDescriptorRegistry } from './codec-descriptor';\nimport { codecDescriptors } from './codecs';\n\n/**\n * Registry of every codec descriptor shipped by `@prisma-next/target-postgres`.\n *\n * Public consumer surface for the postgres codec set: the postgres adapter and any other consumer that needs to enumerate or look up a postgres codec by id consumes this rather than the raw descriptor array. See ADR 208.\n */\nexport const postgresCodecRegistry: CodecDescriptorRegistry =\n buildCodecDescriptorRegistry(codecDescriptors);\n\nexport const postgresCodecDescriptorRegistry =\n buildPostgresCodecDescriptorRegistry(codecDescriptors);\n"],"mappings":";;;;;;;;;AAUA,MAAa,wBACX,6BAA6B,gBAAgB;AAE/C,MAAa,kCACX,qCAAqC,gBAAgB"}
|
package/dist/contract-free.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { b as PG_TEXT_CODEC_ID, f as PG_INT4_CODEC_ID, g as PG_JSONB_CODEC_ID, p as PG_INT8_CODEC_ID, x as PG_TIMESTAMPTZ_CODEC_ID, y as PG_TEXT_ARRAY_CODEC_ID } from "./codec-ids-D3G8K0YM.mjs";
|
|
2
|
-
import { l as PostgresTableSource } from "./postgres-schema-
|
|
3
|
-
import { A as toRegclass, D as tableExistsAst, E as rlsPolicyExistsAst, O as tableIsEmptyAst, T as rlsEnabledAst, _ as columnNullabilityAst, b as extensionExistsAst, c as createTable, d as dropDefaultAction, g as columnExistsAst, h as columnDefaultAst, i as alterTable, k as tablePrimaryKeyAst, s as createSchema, t as addColumnAction, v as columnTypeAst, w as noNullValuesAst, x as indexExistsAst, y as constraintExistsAst } from "./ddl-
|
|
2
|
+
import { l as PostgresTableSource } from "./postgres-schema-DAhXnFac.mjs";
|
|
3
|
+
import { A as toRegclass, D as tableExistsAst, E as rlsPolicyExistsAst, O as tableIsEmptyAst, T as rlsEnabledAst, _ as columnNullabilityAst, b as extensionExistsAst, c as createTable, d as dropDefaultAction, g as columnExistsAst, h as columnDefaultAst, i as alterTable, k as tablePrimaryKeyAst, s as createSchema, t as addColumnAction, v as columnTypeAst, w as noNullValuesAst, x as indexExistsAst, y as constraintExistsAst } from "./ddl-Db1JOIMn.mjs";
|
|
4
4
|
import { col, fn, lit, table } from "@prisma-next/sql-relational-core/contract-free";
|
|
5
5
|
import { APP_SPACE_ID } from "@prisma-next/framework-components/control";
|
|
6
6
|
//#region src/contract-free/columns.ts
|