@prisma-next/target-postgres 0.12.0-dev.5 → 0.12.0-dev.51
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/dist/{codec-ids-C5qzBqus.mjs → codec-ids-DTqscwN9.mjs} +3 -2
- package/dist/codec-ids-DTqscwN9.mjs.map +1 -0
- package/dist/{codec-ids-DliyCWPY.d.mts → codec-ids-FtNuF4-j.d.mts} +3 -2
- package/dist/codec-ids-FtNuF4-j.d.mts.map +1 -0
- package/dist/codec-ids.d.mts +2 -2
- package/dist/codec-ids.mjs +2 -2
- package/dist/{codec-types-BF1DXTPs.d.mts → codec-types-dvHkxz5r.d.mts} +2 -2
- package/dist/{codec-types-BF1DXTPs.d.mts.map → codec-types-dvHkxz5r.d.mts.map} +1 -1
- package/dist/codec-types.d.mts +1 -1
- package/dist/{codecs-DuP3d9Au.d.mts → codecs-DTYQIuS9.d.mts} +2 -2
- package/dist/codecs-DTYQIuS9.d.mts.map +1 -0
- package/dist/codecs.d.mts +1 -1
- package/dist/codecs.mjs +37 -2
- package/dist/codecs.mjs.map +1 -1
- package/dist/contract-free.d.mts +75 -0
- package/dist/contract-free.d.mts.map +1 -0
- package/dist/contract-free.mjs +139 -0
- package/dist/contract-free.mjs.map +1 -0
- package/dist/control.d.mts +1 -1
- package/dist/control.mjs +60 -34
- package/dist/control.mjs.map +1 -1
- package/dist/{data-transform-CRkv2T_U.mjs → data-transform-4QL41_vQ.mjs} +1 -1
- package/dist/{data-transform-CRkv2T_U.mjs.map → data-transform-4QL41_vQ.mjs.map} +1 -1
- package/dist/{data-transform-CAPmAdxS.d.mts → data-transform-DI2h0oin.d.mts} +2 -2
- package/dist/{data-transform-CAPmAdxS.d.mts.map → data-transform-DI2h0oin.d.mts.map} +1 -1
- package/dist/data-transform.d.mts +1 -1
- package/dist/data-transform.mjs +1 -1
- package/dist/ddl.d.mts +2 -0
- package/dist/ddl.mjs +2 -0
- package/dist/{descriptor-meta-Uu8QaClr.mjs → descriptor-meta-C_03xPpF.mjs} +2 -1
- package/dist/descriptor-meta-C_03xPpF.mjs.map +1 -0
- package/dist/{enum-planning-DRA9LaMU.mjs → enum-planning-BiM4ayjv.mjs} +0 -0
- package/dist/{enum-planning-DRA9LaMU.mjs.map → enum-planning-BiM4ayjv.mjs.map} +1 -1
- package/dist/enum-planning.d.mts +1 -1
- package/dist/enum-planning.mjs +1 -1
- package/dist/{errors-BbnITmAD.mjs → errors-BhiZYTWZ.mjs} +1 -1
- package/dist/{errors-BbnITmAD.mjs.map → errors-BhiZYTWZ.mjs.map} +1 -1
- package/dist/errors.mjs +1 -1
- package/dist/{issue-planner-BtaL6OfW.mjs → issue-planner-CSI6tqIH.mjs} +20 -21
- package/dist/issue-planner-CSI6tqIH.mjs.map +1 -0
- package/dist/issue-planner.d.mts +1 -1
- package/dist/issue-planner.d.mts.map +1 -1
- package/dist/issue-planner.mjs +1 -1
- package/dist/migration.d.mts +3 -3
- package/dist/migration.mjs +3 -3
- package/dist/nodes-Bh9HwoPz.mjs +42 -0
- package/dist/nodes-Bh9HwoPz.mjs.map +1 -0
- package/dist/nodes-CpRAsb10.d.mts +38 -0
- package/dist/nodes-CpRAsb10.d.mts.map +1 -0
- package/dist/{op-factory-call-CDlImOF_.d.mts → op-factory-call-CPgAPA7b.d.mts} +3 -3
- package/dist/{op-factory-call-CDlImOF_.d.mts.map → op-factory-call-CPgAPA7b.d.mts.map} +1 -1
- package/dist/{op-factory-call-ewOd5q6L.mjs → op-factory-call-iwM_BC7t.mjs} +2 -2
- package/dist/{op-factory-call-ewOd5q6L.mjs.map → op-factory-call-iwM_BC7t.mjs.map} +1 -1
- package/dist/op-factory-call.d.mts +1 -1
- package/dist/op-factory-call.mjs +1 -1
- package/dist/pack.d.mts +3 -2
- package/dist/pack.d.mts.map +1 -1
- package/dist/pack.mjs +1 -1
- package/dist/planner-DJy7-gh_.mjs +340 -0
- package/dist/planner-DJy7-gh_.mjs.map +1 -0
- package/dist/{planner-ddl-builders-BNMfSE9r.mjs → planner-ddl-builders-CI0BrI_f.mjs} +2 -2
- package/dist/{planner-ddl-builders-BNMfSE9r.mjs.map → planner-ddl-builders-CI0BrI_f.mjs.map} +1 -1
- package/dist/planner-ddl-builders.d.mts +1 -1
- package/dist/planner-ddl-builders.mjs +1 -1
- package/dist/{planner-identity-values-nhVj0hp-.mjs → planner-identity-values-DfiMb2C9.mjs} +1 -1
- package/dist/{planner-identity-values-nhVj0hp-.mjs.map → planner-identity-values-DfiMb2C9.mjs.map} +1 -1
- package/dist/planner-identity-values.mjs +1 -1
- package/dist/{planner-produced-postgres-migration-D02NOhVQ.d.mts → planner-produced-postgres-migration-BRH1Dj_Q.d.mts} +3 -3
- package/dist/{planner-produced-postgres-migration-D02NOhVQ.d.mts.map → planner-produced-postgres-migration-BRH1Dj_Q.d.mts.map} +1 -1
- package/dist/{planner-produced-postgres-migration-D_nsXbhl.mjs → planner-produced-postgres-migration-x3hafaGC.mjs} +4 -4
- package/dist/{planner-produced-postgres-migration-D_nsXbhl.mjs.map → planner-produced-postgres-migration-x3hafaGC.mjs.map} +1 -1
- package/dist/planner-produced-postgres-migration.d.mts +1 -1
- package/dist/planner-produced-postgres-migration.mjs +1 -1
- package/dist/{planner-schema-lookup-CGxxYfnD.mjs → planner-schema-lookup-DLJbkU7-.mjs} +1 -1
- package/dist/{planner-schema-lookup-CGxxYfnD.mjs.map → planner-schema-lookup-DLJbkU7-.mjs.map} +1 -1
- package/dist/planner-schema-lookup.mjs +1 -1
- package/dist/{planner-sql-checks-CfEiTXoQ.mjs → planner-sql-checks-QkUTY_jl.mjs} +38 -11
- package/dist/planner-sql-checks-QkUTY_jl.mjs.map +1 -0
- package/dist/planner-sql-checks.mjs +1 -1
- package/dist/{planner-target-details-a_wuOiYf.d.mts → planner-target-details-C9s0m35x.d.mts} +1 -1
- package/dist/{planner-target-details-a_wuOiYf.d.mts.map → planner-target-details-C9s0m35x.d.mts.map} +1 -1
- package/dist/planner-target-details.d.mts +1 -1
- package/dist/planner.d.mts +3 -2
- package/dist/planner.d.mts.map +1 -1
- package/dist/planner.mjs +1 -1
- package/dist/{postgres-contract-serializer-BnOboPWs.mjs → postgres-contract-serializer-BqsjtSGT.mjs} +32 -23
- package/dist/postgres-contract-serializer-BqsjtSGT.mjs.map +1 -0
- package/dist/{postgres-enum-type-CSzsvXrO.d.mts → postgres-enum-type-DrjytBxL.d.mts} +1 -1
- package/dist/{postgres-enum-type-CSzsvXrO.d.mts.map → postgres-enum-type-DrjytBxL.d.mts.map} +1 -1
- package/dist/{postgres-migration-BatbEvU6.mjs → postgres-migration-BDaWGYDu.mjs} +3 -3
- package/dist/{postgres-migration-BatbEvU6.mjs.map → postgres-migration-BDaWGYDu.mjs.map} +1 -1
- package/dist/{postgres-migration-DRY8V-bQ.d.mts → postgres-migration-CTtX2IXX.d.mts} +3 -3
- package/dist/{postgres-migration-DRY8V-bQ.d.mts.map → postgres-migration-CTtX2IXX.d.mts.map} +1 -1
- package/dist/{postgres-schema-BxAuNFX0.mjs → postgres-schema-CJH-1qeX.mjs} +27 -12
- package/dist/postgres-schema-CJH-1qeX.mjs.map +1 -0
- package/dist/{render-ops-XhICjX_P.mjs → render-ops-Da7bQcyv.mjs} +1 -1
- package/dist/{render-ops-XhICjX_P.mjs.map → render-ops-Da7bQcyv.mjs.map} +1 -1
- package/dist/render-ops.d.mts +1 -1
- package/dist/render-ops.mjs +1 -1
- package/dist/{render-typescript-K125n-RZ.mjs → render-typescript-DTpTcoNZ.mjs} +1 -1
- package/dist/{render-typescript-K125n-RZ.mjs.map → render-typescript-DTpTcoNZ.mjs.map} +1 -1
- package/dist/render-typescript.mjs +1 -1
- package/dist/runtime.d.mts.map +1 -1
- package/dist/runtime.mjs +1 -1
- package/dist/{shared-Do_a5ymU.d.mts → shared-CHtU3piZ.d.mts} +2 -2
- package/dist/{shared-Do_a5ymU.d.mts.map → shared-CHtU3piZ.d.mts.map} +1 -1
- package/dist/{tables-DoA39Yqo.mjs → tables-DhBnvtOj.mjs} +2 -2
- package/dist/{tables-DoA39Yqo.mjs.map → tables-DhBnvtOj.mjs.map} +1 -1
- package/dist/{types-O40IcFV9.d.mts → types-BFF73W84.d.mts} +1 -1
- package/dist/types-BFF73W84.d.mts.map +1 -0
- package/dist/types.d.mts +16 -11
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs +1 -1
- package/package.json +19 -18
- package/src/contract-free/columns.ts +49 -0
- package/src/contract-free/control-bootstrap.ts +55 -0
- package/src/contract-free/ddl.ts +32 -0
- package/src/core/ast/table-source.ts +23 -0
- package/src/core/codec-ids.ts +1 -0
- package/src/core/codecs.ts +44 -0
- package/src/core/ddl/nodes.ts +59 -0
- package/src/core/descriptor-meta.ts +1 -0
- package/src/core/migrations/control-policy.ts +234 -0
- package/src/core/migrations/issue-planner.ts +3 -3
- package/src/core/migrations/planner-sql-checks.ts +9 -9
- package/src/core/migrations/planner-strategies.ts +16 -10
- package/src/core/migrations/planner.ts +55 -6
- package/src/core/migrations/runner.ts +78 -50
- package/src/core/postgres-contract-serializer.ts +52 -46
- package/src/core/postgres-schema.ts +43 -25
- package/src/exports/contract-free.ts +7 -0
- package/src/exports/ddl.ts +7 -0
- package/dist/codec-ids-C5qzBqus.mjs.map +0 -1
- package/dist/codec-ids-DliyCWPY.d.mts.map +0 -1
- package/dist/codecs-DuP3d9Au.d.mts.map +0 -1
- package/dist/descriptor-meta-Uu8QaClr.mjs.map +0 -1
- package/dist/issue-planner-BtaL6OfW.mjs.map +0 -1
- package/dist/planner-Bjz5pnLa.mjs +0 -177
- package/dist/planner-Bjz5pnLa.mjs.map +0 -1
- package/dist/planner-sql-checks-CfEiTXoQ.mjs.map +0 -1
- package/dist/postgres-contract-serializer-BnOboPWs.mjs.map +0 -1
- package/dist/postgres-schema-BxAuNFX0.mjs.map +0 -1
- package/dist/statement-builders-DVI5IVAa.mjs +0 -131
- package/dist/statement-builders-DVI5IVAa.mjs.map +0 -1
- package/dist/statement-builders.d.mts +0 -51
- package/dist/statement-builders.d.mts.map +0 -1
- package/dist/statement-builders.mjs +0 -2
- package/dist/types-O40IcFV9.d.mts.map +0 -1
- package/src/core/migrations/statement-builders.ts +0 -183
- package/src/exports/statement-builders.ts +0 -8
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_TIMESTAMP_CODEC_ID, SQL_VARCHAR_CODEC_ID } from "@prisma-next/sql-relational-core/ast";
|
|
2
2
|
//#region src/core/codec-ids.ts
|
|
3
3
|
const PG_TEXT_CODEC_ID = "pg/text@1";
|
|
4
|
+
const PG_TEXT_ARRAY_CODEC_ID = "pg/text-array@1";
|
|
4
5
|
const PG_ENUM_CODEC_ID = "pg/enum@1";
|
|
5
6
|
const PG_CHAR_CODEC_ID = "pg/char@1";
|
|
6
7
|
const PG_VARCHAR_CODEC_ID = "pg/varchar@1";
|
|
@@ -24,6 +25,6 @@ const PG_JSON_CODEC_ID = "pg/json@1";
|
|
|
24
25
|
const PG_JSONB_CODEC_ID = "pg/jsonb@1";
|
|
25
26
|
const PG_BYTEA_CODEC_ID = "pg/bytea@1";
|
|
26
27
|
//#endregion
|
|
27
|
-
export {
|
|
28
|
+
export { SQL_VARCHAR_CODEC_ID as A, PG_VARBIT_CODEC_ID as C, SQL_INT_CODEC_ID as D, SQL_FLOAT_CODEC_ID as E, SQL_TEXT_CODEC_ID as O, PG_TIME_CODEC_ID as S, SQL_CHAR_CODEC_ID as T, PG_TEXT_ARRAY_CODEC_ID as _, PG_ENUM_CODEC_ID as a, PG_TIMESTAMP_CODEC_ID as b, PG_FLOAT_CODEC_ID as c, PG_INT8_CODEC_ID as d, PG_INTERVAL_CODEC_ID as f, PG_NUMERIC_CODEC_ID as g, PG_JSON_CODEC_ID as h, PG_CHAR_CODEC_ID as i, SQL_TIMESTAMP_CODEC_ID as k, PG_INT2_CODEC_ID as l, PG_JSONB_CODEC_ID as m, PG_BOOL_CODEC_ID as n, PG_FLOAT4_CODEC_ID as o, PG_INT_CODEC_ID as p, PG_BYTEA_CODEC_ID as r, PG_FLOAT8_CODEC_ID as s, PG_BIT_CODEC_ID as t, PG_INT4_CODEC_ID as u, PG_TEXT_CODEC_ID as v, PG_VARCHAR_CODEC_ID as w, PG_TIMETZ_CODEC_ID as x, PG_TIMESTAMPTZ_CODEC_ID as y };
|
|
28
29
|
|
|
29
|
-
//# sourceMappingURL=codec-ids-
|
|
30
|
+
//# sourceMappingURL=codec-ids-DTqscwN9.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codec-ids-DTqscwN9.mjs","names":[],"sources":["../src/core/codec-ids.ts"],"sourcesContent":["export {\n SQL_CHAR_CODEC_ID,\n SQL_FLOAT_CODEC_ID,\n SQL_INT_CODEC_ID,\n SQL_TEXT_CODEC_ID,\n SQL_TIMESTAMP_CODEC_ID,\n SQL_VARCHAR_CODEC_ID,\n} from '@prisma-next/sql-relational-core/ast';\nexport const PG_TEXT_CODEC_ID = 'pg/text@1' as const;\nexport const PG_TEXT_ARRAY_CODEC_ID = 'pg/text-array@1' as const;\nexport const PG_ENUM_CODEC_ID = 'pg/enum@1' as const;\nexport const PG_CHAR_CODEC_ID = 'pg/char@1' as const;\nexport const PG_VARCHAR_CODEC_ID = 'pg/varchar@1' as const;\nexport const PG_INT_CODEC_ID = 'pg/int@1' as const;\nexport const PG_INT2_CODEC_ID = 'pg/int2@1' as const;\nexport const PG_INT4_CODEC_ID = 'pg/int4@1' as const;\nexport const PG_INT8_CODEC_ID = 'pg/int8@1' as const;\nexport const PG_FLOAT_CODEC_ID = 'pg/float@1' as const;\nexport const PG_FLOAT4_CODEC_ID = 'pg/float4@1' as const;\nexport const PG_FLOAT8_CODEC_ID = 'pg/float8@1' as const;\nexport const PG_NUMERIC_CODEC_ID = 'pg/numeric@1' as const;\nexport const PG_BOOL_CODEC_ID = 'pg/bool@1' as const;\nexport const PG_BIT_CODEC_ID = 'pg/bit@1' as const;\nexport const PG_VARBIT_CODEC_ID = 'pg/varbit@1' as const;\nexport const PG_TIMESTAMP_CODEC_ID = 'pg/timestamp@1' as const;\nexport const PG_TIMESTAMPTZ_CODEC_ID = 'pg/timestamptz@1' as const;\nexport const PG_TIME_CODEC_ID = 'pg/time@1' as const;\nexport const PG_TIMETZ_CODEC_ID = 'pg/timetz@1' as const;\nexport const PG_INTERVAL_CODEC_ID = 'pg/interval@1' as const;\nexport const PG_JSON_CODEC_ID = 'pg/json@1' as const;\nexport const PG_JSONB_CODEC_ID = 'pg/jsonb@1' as const;\nexport const PG_BYTEA_CODEC_ID = 'pg/bytea@1' as const;\n"],"mappings":";;AAQA,MAAa,mBAAmB;AAChC,MAAa,yBAAyB;AACtC,MAAa,mBAAmB;AAChC,MAAa,mBAAmB;AAChC,MAAa,sBAAsB;AACnC,MAAa,kBAAkB;AAC/B,MAAa,mBAAmB;AAChC,MAAa,mBAAmB;AAChC,MAAa,mBAAmB;AAChC,MAAa,oBAAoB;AACjC,MAAa,qBAAqB;AAClC,MAAa,qBAAqB;AAClC,MAAa,sBAAsB;AACnC,MAAa,mBAAmB;AAChC,MAAa,kBAAkB;AAC/B,MAAa,qBAAqB;AAClC,MAAa,wBAAwB;AACrC,MAAa,0BAA0B;AACvC,MAAa,mBAAmB;AAChC,MAAa,qBAAqB;AAClC,MAAa,uBAAuB;AACpC,MAAa,mBAAmB;AAChC,MAAa,oBAAoB;AACjC,MAAa,oBAAoB"}
|
|
@@ -2,6 +2,7 @@ import { SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_TEXT_CODEC
|
|
|
2
2
|
|
|
3
3
|
//#region src/core/codec-ids.d.ts
|
|
4
4
|
declare const PG_TEXT_CODEC_ID: "pg/text@1";
|
|
5
|
+
declare const PG_TEXT_ARRAY_CODEC_ID: "pg/text-array@1";
|
|
5
6
|
declare const PG_ENUM_CODEC_ID: "pg/enum@1";
|
|
6
7
|
declare const PG_CHAR_CODEC_ID: "pg/char@1";
|
|
7
8
|
declare const PG_VARCHAR_CODEC_ID: "pg/varchar@1";
|
|
@@ -25,5 +26,5 @@ declare const PG_JSON_CODEC_ID: "pg/json@1";
|
|
|
25
26
|
declare const PG_JSONB_CODEC_ID: "pg/jsonb@1";
|
|
26
27
|
declare const PG_BYTEA_CODEC_ID: "pg/bytea@1";
|
|
27
28
|
//#endregion
|
|
28
|
-
export {
|
|
29
|
-
//# sourceMappingURL=codec-ids-
|
|
29
|
+
export { SQL_VARCHAR_CODEC_ID as A, PG_VARBIT_CODEC_ID as C, SQL_INT_CODEC_ID as D, SQL_FLOAT_CODEC_ID as E, SQL_TEXT_CODEC_ID as O, PG_TIME_CODEC_ID as S, SQL_CHAR_CODEC_ID as T, PG_TEXT_ARRAY_CODEC_ID as _, PG_ENUM_CODEC_ID as a, PG_TIMESTAMP_CODEC_ID as b, PG_FLOAT_CODEC_ID as c, PG_INT8_CODEC_ID as d, PG_INTERVAL_CODEC_ID as f, PG_NUMERIC_CODEC_ID as g, PG_JSON_CODEC_ID as h, PG_CHAR_CODEC_ID as i, SQL_TIMESTAMP_CODEC_ID as k, PG_INT2_CODEC_ID as l, PG_JSONB_CODEC_ID as m, PG_BOOL_CODEC_ID as n, PG_FLOAT4_CODEC_ID as o, PG_INT_CODEC_ID as p, PG_BYTEA_CODEC_ID as r, PG_FLOAT8_CODEC_ID as s, PG_BIT_CODEC_ID as t, PG_INT4_CODEC_ID as u, PG_TEXT_CODEC_ID as v, PG_VARCHAR_CODEC_ID as w, PG_TIMETZ_CODEC_ID as x, PG_TIMESTAMPTZ_CODEC_ID as y };
|
|
30
|
+
//# sourceMappingURL=codec-ids-FtNuF4-j.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codec-ids-FtNuF4-j.d.mts","names":[],"sources":["../src/core/codec-ids.ts"],"mappings":";;;cAQa,gBAAA;AAAA,cACA,sBAAA;AAAA,cACA,gBAAA;AAAA,cACA,gBAAA;AAAA,cACA,mBAAA;AAAA,cACA,eAAA;AAAA,cACA,gBAAA;AAAA,cACA,gBAAA;AAAA,cACA,gBAAA;AAAA,cACA,iBAAA;AAAA,cACA,kBAAA;AAAA,cACA,kBAAA;AAAA,cACA,mBAAA;AAAA,cACA,gBAAA;AAAA,cACA,eAAA;AAAA,cACA,kBAAA;AAAA,cACA,qBAAA;AAAA,cACA,uBAAA;AAAA,cACA,gBAAA;AAAA,cACA,kBAAA;AAAA,cACA,oBAAA;AAAA,cACA,gBAAA;AAAA,cACA,iBAAA;AAAA,cACA,iBAAA"}
|
package/dist/codec-ids.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
export { PG_BIT_CODEC_ID, PG_BOOL_CODEC_ID, PG_BYTEA_CODEC_ID, PG_CHAR_CODEC_ID, PG_ENUM_CODEC_ID, PG_FLOAT4_CODEC_ID, PG_FLOAT8_CODEC_ID, PG_FLOAT_CODEC_ID, PG_INT2_CODEC_ID, PG_INT4_CODEC_ID, PG_INT8_CODEC_ID, PG_INTERVAL_CODEC_ID, PG_INT_CODEC_ID, PG_JSONB_CODEC_ID, PG_JSON_CODEC_ID, PG_NUMERIC_CODEC_ID, PG_TEXT_CODEC_ID, PG_TIMESTAMPTZ_CODEC_ID, PG_TIMESTAMP_CODEC_ID, PG_TIMETZ_CODEC_ID, PG_TIME_CODEC_ID, PG_VARBIT_CODEC_ID, PG_VARCHAR_CODEC_ID, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_TIMESTAMP_CODEC_ID, SQL_VARCHAR_CODEC_ID };
|
|
1
|
+
import { A as SQL_VARCHAR_CODEC_ID, C as PG_VARBIT_CODEC_ID, D as SQL_INT_CODEC_ID, E as SQL_FLOAT_CODEC_ID, O as SQL_TEXT_CODEC_ID, S as PG_TIME_CODEC_ID, T as SQL_CHAR_CODEC_ID, _ as PG_TEXT_ARRAY_CODEC_ID, a as PG_ENUM_CODEC_ID, b as PG_TIMESTAMP_CODEC_ID, c as PG_FLOAT_CODEC_ID, d as PG_INT8_CODEC_ID, f as PG_INTERVAL_CODEC_ID, g as PG_NUMERIC_CODEC_ID, h as PG_JSON_CODEC_ID, i as PG_CHAR_CODEC_ID, k as SQL_TIMESTAMP_CODEC_ID, l as PG_INT2_CODEC_ID, m as PG_JSONB_CODEC_ID, n as PG_BOOL_CODEC_ID, o as PG_FLOAT4_CODEC_ID, p as PG_INT_CODEC_ID, r as PG_BYTEA_CODEC_ID, s as PG_FLOAT8_CODEC_ID, t as PG_BIT_CODEC_ID, u as PG_INT4_CODEC_ID, v as PG_TEXT_CODEC_ID, w as PG_VARCHAR_CODEC_ID, x as PG_TIMETZ_CODEC_ID, y as PG_TIMESTAMPTZ_CODEC_ID } from "./codec-ids-FtNuF4-j.mjs";
|
|
2
|
+
export { PG_BIT_CODEC_ID, PG_BOOL_CODEC_ID, PG_BYTEA_CODEC_ID, PG_CHAR_CODEC_ID, PG_ENUM_CODEC_ID, PG_FLOAT4_CODEC_ID, PG_FLOAT8_CODEC_ID, PG_FLOAT_CODEC_ID, PG_INT2_CODEC_ID, PG_INT4_CODEC_ID, PG_INT8_CODEC_ID, PG_INTERVAL_CODEC_ID, PG_INT_CODEC_ID, PG_JSONB_CODEC_ID, PG_JSON_CODEC_ID, PG_NUMERIC_CODEC_ID, PG_TEXT_ARRAY_CODEC_ID, PG_TEXT_CODEC_ID, PG_TIMESTAMPTZ_CODEC_ID, PG_TIMESTAMP_CODEC_ID, PG_TIMETZ_CODEC_ID, PG_TIME_CODEC_ID, PG_VARBIT_CODEC_ID, PG_VARCHAR_CODEC_ID, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_TIMESTAMP_CODEC_ID, SQL_VARCHAR_CODEC_ID };
|
package/dist/codec-ids.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
export { PG_BIT_CODEC_ID, PG_BOOL_CODEC_ID, PG_BYTEA_CODEC_ID, PG_CHAR_CODEC_ID, PG_ENUM_CODEC_ID, PG_FLOAT4_CODEC_ID, PG_FLOAT8_CODEC_ID, PG_FLOAT_CODEC_ID, PG_INT2_CODEC_ID, PG_INT4_CODEC_ID, PG_INT8_CODEC_ID, PG_INTERVAL_CODEC_ID, PG_INT_CODEC_ID, PG_JSONB_CODEC_ID, PG_JSON_CODEC_ID, PG_NUMERIC_CODEC_ID, PG_TEXT_CODEC_ID, PG_TIMESTAMPTZ_CODEC_ID, PG_TIMESTAMP_CODEC_ID, PG_TIMETZ_CODEC_ID, PG_TIME_CODEC_ID, PG_VARBIT_CODEC_ID, PG_VARCHAR_CODEC_ID, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_TIMESTAMP_CODEC_ID, SQL_VARCHAR_CODEC_ID };
|
|
1
|
+
import { A as SQL_VARCHAR_CODEC_ID, C as PG_VARBIT_CODEC_ID, D as SQL_INT_CODEC_ID, E as SQL_FLOAT_CODEC_ID, O as SQL_TEXT_CODEC_ID, S as PG_TIME_CODEC_ID, T as SQL_CHAR_CODEC_ID, _ as PG_TEXT_ARRAY_CODEC_ID, a as PG_ENUM_CODEC_ID, b as PG_TIMESTAMP_CODEC_ID, c as PG_FLOAT_CODEC_ID, d as PG_INT8_CODEC_ID, f as PG_INTERVAL_CODEC_ID, g as PG_NUMERIC_CODEC_ID, h as PG_JSON_CODEC_ID, i as PG_CHAR_CODEC_ID, k as SQL_TIMESTAMP_CODEC_ID, l as PG_INT2_CODEC_ID, m as PG_JSONB_CODEC_ID, n as PG_BOOL_CODEC_ID, o as PG_FLOAT4_CODEC_ID, p as PG_INT_CODEC_ID, r as PG_BYTEA_CODEC_ID, s as PG_FLOAT8_CODEC_ID, t as PG_BIT_CODEC_ID, u as PG_INT4_CODEC_ID, v as PG_TEXT_CODEC_ID, w as PG_VARCHAR_CODEC_ID, x as PG_TIMETZ_CODEC_ID, y as PG_TIMESTAMPTZ_CODEC_ID } from "./codec-ids-DTqscwN9.mjs";
|
|
2
|
+
export { PG_BIT_CODEC_ID, PG_BOOL_CODEC_ID, PG_BYTEA_CODEC_ID, PG_CHAR_CODEC_ID, PG_ENUM_CODEC_ID, PG_FLOAT4_CODEC_ID, PG_FLOAT8_CODEC_ID, PG_FLOAT_CODEC_ID, PG_INT2_CODEC_ID, PG_INT4_CODEC_ID, PG_INT8_CODEC_ID, PG_INTERVAL_CODEC_ID, PG_INT_CODEC_ID, PG_JSONB_CODEC_ID, PG_JSON_CODEC_ID, PG_NUMERIC_CODEC_ID, PG_TEXT_ARRAY_CODEC_ID, PG_TEXT_CODEC_ID, PG_TIMESTAMPTZ_CODEC_ID, PG_TIMESTAMP_CODEC_ID, PG_TIMETZ_CODEC_ID, PG_TIME_CODEC_ID, PG_VARBIT_CODEC_ID, PG_VARCHAR_CODEC_ID, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_TIMESTAMP_CODEC_ID, SQL_VARCHAR_CODEC_ID };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as PgVarcharDescriptor, S as PgVarbitDescriptor, _ as PgTextDescriptor, a as PgEnumDescriptor, b as PgTimestamptzDescriptor, c as PgFloatDescriptor, d as PgInt8Descriptor, f as PgIntDescriptor, g as PgNumericDescriptor, h as PgJsonbDescriptor, i as PgCharDescriptor, l as PgInt2Descriptor, m as PgJsonDescriptor, n as PgBoolDescriptor, o as PgFloat4Descriptor, p as PgIntervalDescriptor, r as PgByteaDescriptor, s as PgFloat8Descriptor, t as PgBitDescriptor, u as PgInt4Descriptor, v as PgTimeDescriptor, x as PgTimetzDescriptor, y as PgTimestampDescriptor } from "./codecs-
|
|
1
|
+
import { C as PgVarcharDescriptor, S as PgVarbitDescriptor, _ as PgTextDescriptor, a as PgEnumDescriptor, b as PgTimestamptzDescriptor, c as PgFloatDescriptor, d as PgInt8Descriptor, f as PgIntDescriptor, g as PgNumericDescriptor, h as PgJsonbDescriptor, i as PgCharDescriptor, l as PgInt2Descriptor, m as PgJsonDescriptor, n as PgBoolDescriptor, o as PgFloat4Descriptor, p as PgIntervalDescriptor, r as PgByteaDescriptor, s as PgFloat8Descriptor, t as PgBitDescriptor, u as PgInt4Descriptor, v as PgTimeDescriptor, x as PgTimetzDescriptor, y as PgTimestampDescriptor } from "./codecs-DTYQIuS9.mjs";
|
|
2
2
|
import * as _$_prisma_next_sql_relational_core_ast0 from "@prisma-next/sql-relational-core/ast";
|
|
3
3
|
import { ExtractCodecTypes } from "@prisma-next/sql-relational-core/ast";
|
|
4
4
|
import { JsonValue as JsonValue$1 } from "@prisma-next/contract/types";
|
|
@@ -76,4 +76,4 @@ type Interval<P extends number | undefined = undefined> = BrandedString<{
|
|
|
76
76
|
}>;
|
|
77
77
|
//#endregion
|
|
78
78
|
export { JsonValue$1 as a, Timestamp as c, VarBit as d, Varchar as f, Interval as i, Timestamptz as l, Char as n, Numeric as o, CodecTypes as r, Time as s, Bit as t, Timetz as u };
|
|
79
|
-
//# sourceMappingURL=codec-types-
|
|
79
|
+
//# sourceMappingURL=codec-types-dvHkxz5r.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codec-types-
|
|
1
|
+
{"version":3,"file":"codec-types-dvHkxz5r.d.mts","names":[],"sources":["../src/core/codec-type-map.ts","../src/exports/codec-types.ts"],"mappings":";;;;;;cA4Ca,kBAAA;EAAA,eA8BH,uCAAA,CAAA,iBAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAEE,OAAA,6BAAoC,CAAA,0BAA2B,CAAA,CAAE,CAAA,IAAK,CAAA,CAAE,CAAA,EAAG,CAAA;AAAA,KAE3E,kBAAA,UAA4B,kBAAkB;AAAA,KAE9C,mBAAA,GAAsB,iBAAiB,CAAC,kBAAA;;;KCrExC,UAAA,GAAa,OAAO,CAAC,mBAAA;AAAA,KAI5B,OAAA,kBAAyB,MAAA,qBAA2B,CAAA,0BAClC,KAAA,GAAQ,KAAA,CAAM,CAAA;AAAA,KAGhC,aAAA,eAA4B,MAAA,qBAA2B,OAAA,SAAgB,KAAA;AAAA,KAEhE,IAAA,qBAAyB,aAAa;EAAG,YAAA,EAAc,CAAA;AAAA;AAAA,KACvD,OAAA,qBAA4B,aAAa;EAAG,eAAA,EAAiB,CAAA;AAAA;AAAA,KAC7D,OAAA,+DAAsE,aAAA;EAChF,kBAAA,EAAoB,CAAA;EACpB,cAAA,EAAgB,CAAA;AAAA;AAAA,KAEN,GAAA,qBAAwB,aAAa;EAAG,WAAA,EAAa,CAAA;AAAA;AAAA,KACrD,MAAA,qBAA2B,aAAa;EAAG,cAAA,EAAgB,CAAA;AAAA;AAAA,KAC3D,SAAA,6CAAsD,aAAa;EAC7E,oBAAA,EAAsB,CAAA;AAAA;AAAA,KAEZ,WAAA,6CAAwD,aAAa;EAC/E,sBAAA,EAAwB,CAAA;AAAA;AAAA,KAEd,IAAA,6CAAiD,aAAa;EAAG,eAAA,EAAiB,CAAA;AAAA;AAAA,KAClF,MAAA,6CAAmD,aAAa;EAC1E,iBAAA,EAAmB,CAAA;AAAA;AAAA,KAET,QAAA,6CAAqD,aAAa;EAC5E,mBAAA,EAAqB,CAAA;AAAA"}
|
package/dist/codec-types.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as JsonValue, c as Timestamp, d as VarBit, f as Varchar, i as Interval, l as Timestamptz, n as Char, o as Numeric, r as CodecTypes, s as Time, t as Bit, u as Timetz } from "./codec-types-
|
|
1
|
+
import { a as JsonValue, c as Timestamp, d as VarBit, f as Varchar, i as Interval, l as Timestamptz, n as Char, o as Numeric, r as CodecTypes, s as Time, t as Bit, u as Timetz } from "./codec-types-dvHkxz5r.mjs";
|
|
2
2
|
export { Bit, Char, CodecTypes, Interval, JsonValue, Numeric, Time, Timestamp, Timestamptz, Timetz, VarBit, Varchar };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as PG_VARBIT_CODEC_ID, S as PG_TIME_CODEC_ID, a as PG_ENUM_CODEC_ID, b as PG_TIMESTAMP_CODEC_ID, d as PG_INT8_CODEC_ID, f as PG_INTERVAL_CODEC_ID, g as PG_NUMERIC_CODEC_ID, h as PG_JSON_CODEC_ID, l as PG_INT2_CODEC_ID, m as PG_JSONB_CODEC_ID, n as PG_BOOL_CODEC_ID, o as PG_FLOAT4_CODEC_ID, r as PG_BYTEA_CODEC_ID, s as PG_FLOAT8_CODEC_ID, t as PG_BIT_CODEC_ID, u as PG_INT4_CODEC_ID, v as PG_TEXT_CODEC_ID, x as PG_TIMETZ_CODEC_ID, y as PG_TIMESTAMPTZ_CODEC_ID } from "./codec-ids-FtNuF4-j.mjs";
|
|
2
2
|
import { SqlCharCodec, SqlFloatCodec, SqlIntCodec, SqlVarcharCodec } from "@prisma-next/sql-relational-core/ast";
|
|
3
3
|
import * as _$_prisma_next_framework_components_codec0 from "@prisma-next/framework-components/codec";
|
|
4
4
|
import { AnyCodecDescriptor, CodecCallContext, CodecDescriptorImpl, CodecImpl, CodecInstanceContext } from "@prisma-next/framework-components/codec";
|
|
@@ -555,4 +555,4 @@ declare class PgFloatDescriptor extends CodecDescriptorImpl<void> {
|
|
|
555
555
|
declare const pgFloatColumn: () => _$_prisma_next_framework_components_codec0.ColumnSpec<SqlFloatCodec, undefined>;
|
|
556
556
|
//#endregion
|
|
557
557
|
export { pgFloatColumn as A, pgTimeColumn as B, PgVarcharDescriptor as C, pgEnumColumn as D, pgCharColumn as E, pgIntervalColumn as F, pgVarcharColumn as G, pgTimestamptzColumn as H, pgJsonColumn as I, pgJsonbColumn as L, pgInt4Column as M, pgInt8Column as N, pgFloat4Column as O, pgIntColumn as P, pgNumericColumn as R, PgVarbitDescriptor as S, pgBoolColumn as T, pgTimetzColumn as U, pgTimestampColumn as V, pgVarbitColumn as W, PgTextDescriptor as _, PgEnumDescriptor as a, PgTimestamptzDescriptor as b, PgFloatDescriptor as c, PgInt8Descriptor as d, PgIntDescriptor as f, PgNumericDescriptor as g, PgJsonbDescriptor as h, PgCharDescriptor as i, pgInt2Column as j, pgFloat8Column as k, PgInt2Descriptor as l, PgJsonDescriptor as m, PgBoolDescriptor as n, PgFloat4Descriptor as o, PgIntervalDescriptor as p, PgByteaDescriptor as r, PgFloat8Descriptor as s, PgBitDescriptor as t, PgInt4Descriptor as u, PgTimeDescriptor as v, pgBitColumn as w, PgTimetzDescriptor as x, PgTimestampDescriptor as y, pgTextColumn as z };
|
|
558
|
-
//# sourceMappingURL=codecs-
|
|
558
|
+
//# sourceMappingURL=codecs-DTYQIuS9.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codecs-DTYQIuS9.d.mts","names":[],"sources":["../src/core/codecs.ts"],"mappings":";;;;;;;;;KAmFK,YAAA;EAAA,SAA0B,MAAM;AAAA;AAAA,KAChC,eAAA;EAAA,SAA6B,SAAS;AAAA;AAAA,KACtC,aAAA;EAAA,SAA2B,SAAA;EAAA,SAA4B,KAAK;AAAA;AAAA,KAC5D,UAAA;EAAA,SAAwB,MAAM;AAAA;AAAA,cAuCtB,WAAA,SAAoB,SAAA,QACxB,gBAAA;EAKD,MAAA,CAAO,KAAA,UAAe,IAAA,EAAM,gBAAA,GAAmB,OAAA;EAG/C,MAAA,CAAO,IAAA,UAAc,IAAA,EAAM,gBAAA,GAAmB,OAAA;EAGpD,UAAA,CAAW,KAAA,WAAgB,SAAA;EAG3B,UAAA,CAAW,IAAA,EAAM,SAAA;AAAA;AAAA,cAKN,gBAAA,SAAyB,mBAAA;EAAA,SAClB,OAAA;EAAA,SACA,MAAA;EAAA,SACA,WAAA;EAAA,SACA,IAAA;IAAA;;;;;;;;WACA,YAAA,EAAc,gB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
|
1
|
-
import { A as pgFloatColumn, B as pgTimeColumn, C as PgVarcharDescriptor, D as pgEnumColumn, E as pgCharColumn, F as pgIntervalColumn, G as pgVarcharColumn, H as pgTimestamptzColumn, I as pgJsonColumn, L as pgJsonbColumn, M as pgInt4Column, N as pgInt8Column, O as pgFloat4Column, P as pgIntColumn, R as pgNumericColumn, S as PgVarbitDescriptor, T as pgBoolColumn, U as pgTimetzColumn, V as pgTimestampColumn, W as pgVarbitColumn, _ as PgTextDescriptor, a as PgEnumDescriptor, b as PgTimestamptzDescriptor, c as PgFloatDescriptor, d as PgInt8Descriptor, f as PgIntDescriptor, g as PgNumericDescriptor, h as PgJsonbDescriptor, i as PgCharDescriptor, j as pgInt2Column, k as pgFloat8Column, l as PgInt2Descriptor, m as PgJsonDescriptor, n as PgBoolDescriptor, o as PgFloat4Descriptor, p as PgIntervalDescriptor, s as PgFloat8Descriptor, t as PgBitDescriptor, u as PgInt4Descriptor, v as PgTimeDescriptor, w as pgBitColumn, x as PgTimetzDescriptor, y as PgTimestampDescriptor, z as pgTextColumn } from "./codecs-
|
|
1
|
+
import { A as pgFloatColumn, B as pgTimeColumn, C as PgVarcharDescriptor, D as pgEnumColumn, E as pgCharColumn, F as pgIntervalColumn, G as pgVarcharColumn, H as pgTimestamptzColumn, I as pgJsonColumn, L as pgJsonbColumn, M as pgInt4Column, N as pgInt8Column, O as pgFloat4Column, P as pgIntColumn, R as pgNumericColumn, S as PgVarbitDescriptor, T as pgBoolColumn, U as pgTimetzColumn, V as pgTimestampColumn, W as pgVarbitColumn, _ as PgTextDescriptor, a as PgEnumDescriptor, b as PgTimestamptzDescriptor, c as PgFloatDescriptor, d as PgInt8Descriptor, f as PgIntDescriptor, g as PgNumericDescriptor, h as PgJsonbDescriptor, i as PgCharDescriptor, j as pgInt2Column, k as pgFloat8Column, l as PgInt2Descriptor, m as PgJsonDescriptor, n as PgBoolDescriptor, o as PgFloat4Descriptor, p as PgIntervalDescriptor, s as PgFloat8Descriptor, t as PgBitDescriptor, u as PgInt4Descriptor, v as PgTimeDescriptor, w as pgBitColumn, x as PgTimetzDescriptor, y as PgTimestampDescriptor, z as pgTextColumn } from "./codecs-DTYQIuS9.mjs";
|
|
2
2
|
import { CodecDescriptorRegistry } from "@prisma-next/sql-relational-core/query-lane-context";
|
|
3
3
|
|
|
4
4
|
//#region src/core/registry.d.ts
|
package/dist/codecs.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as
|
|
1
|
+
import { C as PG_VARBIT_CODEC_ID, S as PG_TIME_CODEC_ID, _ as PG_TEXT_ARRAY_CODEC_ID, a as PG_ENUM_CODEC_ID, b as PG_TIMESTAMP_CODEC_ID, c as PG_FLOAT_CODEC_ID, d as PG_INT8_CODEC_ID, f as PG_INTERVAL_CODEC_ID, g as PG_NUMERIC_CODEC_ID, h as PG_JSON_CODEC_ID, i as PG_CHAR_CODEC_ID, l as PG_INT2_CODEC_ID, m as PG_JSONB_CODEC_ID, n as PG_BOOL_CODEC_ID, o as PG_FLOAT4_CODEC_ID, p as PG_INT_CODEC_ID, r as PG_BYTEA_CODEC_ID, s as PG_FLOAT8_CODEC_ID, t as PG_BIT_CODEC_ID, u as PG_INT4_CODEC_ID, v as PG_TEXT_CODEC_ID, w as PG_VARCHAR_CODEC_ID, x as PG_TIMETZ_CODEC_ID, y as PG_TIMESTAMPTZ_CODEC_ID } from "./codec-ids-DTqscwN9.mjs";
|
|
2
2
|
import { SqlCharCodec, SqlFloatCodec, SqlIntCodec, SqlVarcharCodec, sqlCharDescriptor, sqlFloatDescriptor, sqlIntDescriptor, sqlTextDescriptor, sqlTimestampDescriptor, sqlVarcharDescriptor } from "@prisma-next/sql-relational-core/ast";
|
|
3
3
|
import { CodecDescriptorImpl, CodecImpl, column, voidParamsSchema } from "@prisma-next/framework-components/codec";
|
|
4
4
|
import { type } from "arktype";
|
|
@@ -69,6 +69,7 @@ const numericParamsSchema = type({
|
|
|
69
69
|
});
|
|
70
70
|
const precisionParamsSchema = type({ "precision?": "number.integer >= 0 & number.integer <= 6" });
|
|
71
71
|
const PG_TEXT_META = { db: { sql: { postgres: { nativeType: "text" } } } };
|
|
72
|
+
const PG_TEXT_ARRAY_META = { db: { sql: { postgres: { nativeType: "text[]" } } } };
|
|
72
73
|
const PG_INT4_META = { db: { sql: { postgres: { nativeType: "integer" } } } };
|
|
73
74
|
const PG_INT2_META = { db: { sql: { postgres: { nativeType: "smallint" } } } };
|
|
74
75
|
const PG_INT8_META = { db: { sql: { postgres: { nativeType: "bigint" } } } };
|
|
@@ -116,6 +117,39 @@ var PgTextDescriptor = class extends CodecDescriptorImpl {
|
|
|
116
117
|
};
|
|
117
118
|
const pgTextDescriptor = new PgTextDescriptor();
|
|
118
119
|
const pgTextColumn = () => column(pgTextDescriptor.factory(), pgTextDescriptor.codecId, void 0, "text");
|
|
120
|
+
/**
|
|
121
|
+
* Postgres `text[]` codec. Encode is an identity pass-through: the pg wire
|
|
122
|
+
* driver serialises a JS `string[]` to a Postgres array literal under the
|
|
123
|
+
* `$N::text[]` cast the renderer emits from this codec's `text[]` native type,
|
|
124
|
+
* and decode reads it back as a JS array. Used by the control plane to write
|
|
125
|
+
* the marker's `invariants` column. Not a user-facing scalar — it is not part
|
|
126
|
+
* of the authorable `CodecTypes` surface, only the runtime codec registry.
|
|
127
|
+
*/
|
|
128
|
+
var PgTextArrayCodec = class extends CodecImpl {
|
|
129
|
+
async encode(value, _ctx) {
|
|
130
|
+
return value;
|
|
131
|
+
}
|
|
132
|
+
async decode(wire, _ctx) {
|
|
133
|
+
return wire;
|
|
134
|
+
}
|
|
135
|
+
encodeJson(value) {
|
|
136
|
+
return [...value];
|
|
137
|
+
}
|
|
138
|
+
decodeJson(json) {
|
|
139
|
+
return Array.isArray(json) ? json.map((entry) => String(entry)) : [];
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
var PgTextArrayDescriptor = class extends CodecDescriptorImpl {
|
|
143
|
+
codecId = PG_TEXT_ARRAY_CODEC_ID;
|
|
144
|
+
traits = ["equality"];
|
|
145
|
+
targetTypes = ["text[]"];
|
|
146
|
+
meta = PG_TEXT_ARRAY_META;
|
|
147
|
+
paramsSchema = voidParamsSchema;
|
|
148
|
+
factory() {
|
|
149
|
+
return () => new PgTextArrayCodec(this);
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
const pgTextArrayDescriptor = new PgTextArrayDescriptor();
|
|
119
153
|
var PgInt4Codec = class extends CodecImpl {
|
|
120
154
|
async encode(value, _ctx) {
|
|
121
155
|
return value;
|
|
@@ -731,7 +765,8 @@ const postgresCodecRegistry = buildCodecDescriptorRegistry([
|
|
|
731
765
|
pgIntervalDescriptor,
|
|
732
766
|
pgEnumDescriptor,
|
|
733
767
|
pgJsonDescriptor,
|
|
734
|
-
pgJsonbDescriptor
|
|
768
|
+
pgJsonbDescriptor,
|
|
769
|
+
pgTextArrayDescriptor
|
|
735
770
|
]);
|
|
736
771
|
//#endregion
|
|
737
772
|
export { pgBitColumn, pgBoolColumn, pgCharColumn, pgEnumColumn, pgFloat4Column, pgFloat8Column, pgFloatColumn, pgInt2Column, pgInt4Column, pgInt8Column, pgIntColumn, pgIntervalColumn, pgJsonColumn, pgJsonbColumn, pgNumericColumn, pgTextColumn, pgTimeColumn, pgTimestampColumn, pgTimestamptzColumn, pgTimetzColumn, pgVarbitColumn, pgVarcharColumn, postgresCodecRegistry };
|
package/dist/codecs.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codecs.mjs","names":["arktype"],"sources":["../src/core/codec-helpers.ts","../src/core/codecs.ts","../src/core/registry.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';\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 new Error(\n `renderOutputType: expected integer \"length\" in typeParams for ${typeName}, got ${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 new Error(\n `renderOutputType: expected integer \"precision\" in typeParams for ${typeName}, got ${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 new Error(\n `renderOutputType: expected integer \"precision\" in typeParams for Numeric, got ${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 new Error(\n `renderOutputType: expected integer \"scale\" in typeParams for Numeric, got ${String(scale)}`,\n );\n }\n return `Numeric<${precision}, ${scale}>`;\n};\n\n// ISO 8601 UTC: `YYYY-MM-DDTHH:MM:SS[.mmm…]Z`. Trailing `Z` is required; fractional seconds are optional. Other `Date`-parseable formats (`January 15, 2024`, `01/15/2024`, etc.) are intentionally rejected because those formats are implementation-defined and not the documented contract for `pg/timestamp@1` / `pg/timestamptz@1`.\nconst ISO_8601_UTC = /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$/;\n\nexport const pgTimestampEncodeJson = (value: Date): JsonValue => value.toISOString();\nexport const pgTimestampDecodeJson = (json: JsonValue): Date => {\n if (typeof json !== 'string') {\n throw new Error(`Expected ISO date string for pg/timestamp@1, got ${typeof json}`);\n }\n if (!ISO_8601_UTC.test(json)) {\n throw new Error(`Invalid ISO date string for pg/timestamp@1: ${json}`);\n }\n const date = new Date(json);\n if (Number.isNaN(date.getTime())) {\n throw new Error(`Invalid ISO date string for pg/timestamp@1: ${json}`);\n }\n return date;\n};\n\nexport const pgTimestamptzEncodeJson = (value: Date): JsonValue => value.toISOString();\nexport const pgTimestamptzDecodeJson = (json: JsonValue): Date => {\n if (typeof json !== 'string') {\n throw new Error(`Expected ISO date string for pg/timestamptz@1, got ${typeof json}`);\n }\n if (!ISO_8601_UTC.test(json)) {\n throw new Error(`Invalid ISO date string for pg/timestamptz@1: ${json}`);\n }\n const date = new Date(json);\n if (Number.isNaN(date.getTime())) {\n throw new Error(`Invalid ISO date string for pg/timestamptz@1: ${json}`);\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 pgEnumRenderOutputType = (typeParams: {\n readonly values?: readonly unknown[];\n}): string => {\n const values = typeParams.values;\n if (!Array.isArray(values)) {\n throw new Error(\n `renderOutputType: expected array \"values\" in typeParams for enum, got ${typeof values}`,\n );\n }\n if (!values.every((v): v is string => typeof v === 'string')) {\n throw new Error(`renderOutputType: expected string[] \"values\" in typeParams for enum`);\n }\n return values\n .map((value) => `'${value.replace(/\\\\/g, '\\\\\\\\').replace(/'/g, \"\\\\'\")}'`)\n .join(' | ');\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 CodecDescriptorImpl} declaring the codec id, traits, target types, params schema, meta, and (where applicable)\n * the emit-path `renderOutputType`. 3. A per-codec column helper (`pgXColumn`) that calls `descriptor.factory(...)` directly and packages the result into a {@link 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 AnyCodecDescriptor,\n type CodecCallContext,\n CodecDescriptorImpl,\n CodecImpl,\n type CodecInstanceContext,\n type ColumnHelperFor,\n type ColumnHelperForStrict,\n column,\n voidParamsSchema,\n} from '@prisma-next/framework-components/codec';\nimport {\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 type { StandardSchemaV1 } from '@standard-schema/spec';\nimport { type as arktype } from 'arktype';\nimport {\n pgEnumRenderOutputType,\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_ENUM_CODEC_ID,\n PG_FLOAT_CODEC_ID,\n PG_FLOAT4_CODEC_ID,\n PG_FLOAT8_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_CODEC_ID,\n PG_TIME_CODEC_ID,\n PG_TIMESTAMP_CODEC_ID,\n PG_TIMESTAMPTZ_CODEC_ID,\n PG_TIMETZ_CODEC_ID,\n PG_VARBIT_CODEC_ID,\n PG_VARCHAR_CODEC_ID,\n} from './codec-ids';\n\ntype LengthParams = { readonly length?: number };\ntype PrecisionParams = { readonly precision?: number };\ntype NumericParams = { readonly precision: number; readonly scale?: number };\ntype EnumParams = { readonly values?: readonly string[] };\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_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_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\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 CodecDescriptorImpl<void> {\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 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\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 CodecDescriptorImpl<void> {\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 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 CodecDescriptorImpl<void> {\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 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 CodecDescriptorImpl<void> {\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 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 CodecDescriptorImpl<void> {\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 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 CodecDescriptorImpl<void> {\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 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 CodecDescriptorImpl<void> {\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 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 return value;\n }\n decodeJson(json: JsonValue): string {\n return json as string;\n }\n}\n\nexport class PgNumericDescriptor extends CodecDescriptorImpl<NumericParams> {\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\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 CodecDescriptorImpl<PrecisionParams> {\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 CodecDescriptorImpl<PrecisionParams> {\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 CodecDescriptorImpl<PrecisionParams> {\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 CodecDescriptorImpl<PrecisionParams> {\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 CodecDescriptorImpl<LengthParams> {\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 CodecDescriptorImpl<LengthParams> {\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 Buffer.from(value).toString('base64');\n }\n decodeJson(json: JsonValue): Uint8Array {\n if (typeof json !== 'string') {\n throw new Error(`Expected base64 string for pg/bytea@1, got ${typeof json}`);\n }\n const decoded = Buffer.from(json, 'base64');\n if (decoded.toString('base64') !== json) {\n throw new Error(`Invalid base64 string for pg/bytea@1 (length: ${json.length})`);\n }\n return new Uint8Array(decoded);\n }\n}\n\nexport class PgByteaDescriptor extends CodecDescriptorImpl<void> {\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\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 CodecDescriptorImpl<PrecisionParams> {\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\nconst enumParamsSchema = arktype({\n 'values?': 'string[]',\n});\n\nexport class PgEnumCodec extends CodecImpl<\n typeof PG_ENUM_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 PgEnumDescriptor extends CodecDescriptorImpl<EnumParams> {\n override readonly codecId = PG_ENUM_CODEC_ID;\n override readonly traits = ['equality', 'order'] as const;\n override readonly targetTypes = ['enum'] as const;\n override readonly paramsSchema = enumParamsSchema satisfies StandardSchemaV1<EnumParams>;\n override renderOutputType(params: EnumParams): string | undefined {\n return pgEnumRenderOutputType(params);\n }\n override factory(_params: EnumParams): (ctx: CodecInstanceContext) => PgEnumCodec {\n return () => new PgEnumCodec(this);\n }\n}\n\nexport const pgEnumDescriptor = new PgEnumDescriptor();\n\nexport const pgEnumColumn = (params: EnumParams = {}) =>\n column(pgEnumDescriptor.factory(params), pgEnumDescriptor.codecId, params, 'enum');\n\npgEnumColumn satisfies ColumnHelperFor<PgEnumDescriptor>;\npgEnumColumn satisfies ColumnHelperForStrict<PgEnumDescriptor>;\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 CodecDescriptorImpl<void> {\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 CodecDescriptorImpl<void> {\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 CodecDescriptorImpl<LengthParams> {\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 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 CodecDescriptorImpl<LengthParams> {\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 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 CodecDescriptorImpl<void> {\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 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 CodecDescriptorImpl<void> {\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 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: readonly AnyCodecDescriptor[] = [\n sqlCharDescriptor,\n sqlVarcharDescriptor,\n sqlIntDescriptor,\n sqlFloatDescriptor,\n sqlTextDescriptor,\n sqlTimestampDescriptor,\n pgTextDescriptor,\n pgCharDescriptor,\n pgVarcharDescriptor,\n pgIntDescriptor,\n pgFloatDescriptor,\n pgInt4Descriptor,\n pgInt2Descriptor,\n pgInt8Descriptor,\n pgFloat4Descriptor,\n pgFloat8Descriptor,\n pgNumericDescriptor,\n pgTimestampDescriptor,\n pgTimestamptzDescriptor,\n pgTimeDescriptor,\n pgTimetzDescriptor,\n pgBoolDescriptor,\n pgBitDescriptor,\n pgVarbitDescriptor,\n pgByteaDescriptor,\n pgIntervalDescriptor,\n pgEnumDescriptor,\n pgJsonDescriptor,\n pgJsonbDescriptor,\n];\n","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":";;;;;;AAUA,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,IAAI,MACR,iEAAiE,SAAS,QAAQ,O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rD;CACA,QAAiB,SAAuE;EACtF,aAAa,IAAI,gBAAgB,IAAI;CACvC;AACF;AAEA,MAAa,sBAAsB,IAAI,oBAAoB;AAE3D,MAAa,mBAAmB,SAAuB,CAAC,MACtD,OACE,oBAAoB,QAAQ,MAAM,GAClC,oBAAoB,SACpB,QACA,mBACF;AAIF,IAAa,kBAAb,cAAqC,oBAA0B;CAC7D,UAA4B;CAC5B,cAAgC,CAAC,MAAM;CACvC,OAAyB;CACzB,SAA2B,iBAAiB;CAC5C,eAAiC,iBAAiB;CAClD,UAA+D;EAC7D,aAAa,IAAI,YAAY,IAAI;CACnC;AACF;AAEA,MAAa,kBAAkB,IAAI,gBAAgB;AAEnD,MAAa,oBACX,OAAO,gBAAgB,QAAQ,GAAG,gBAAgB,SAAS,KAAA,GAAW,MAAM;AAI9E,IAAa,oBAAb,cAAuC,oBAA0B;CAC/D,UAA4B;CAC5B,cAAgC,CAAC,QAAQ;CACzC,OAAyB;CACzB,SAA2B,mBAAmB;CAC9C,eAAiC,mBAAmB;CACpD,UAAiE;EAC/D,aAAa,IAAI,cAAc,IAAI;CACrC;AACF;AAEA,MAAa,oBAAoB,IAAI,kBAAkB;AAEvD,MAAa,sBACX,OAAO,kBAAkB,QAAQ,GAAG,kBAAkB,SAAS,KAAA,GAAW,QAAQ;;;;;;;;ACj+BpF,MAAa,wBACX,6BAA6B;CDu+B7B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;ACngC6B,CAAgB"}
|
|
1
|
+
{"version":3,"file":"codecs.mjs","names":["arktype"],"sources":["../src/core/codec-helpers.ts","../src/core/codecs.ts","../src/core/registry.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';\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 new Error(\n `renderOutputType: expected integer \"length\" in typeParams for ${typeName}, got ${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 new Error(\n `renderOutputType: expected integer \"precision\" in typeParams for ${typeName}, got ${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 new Error(\n `renderOutputType: expected integer \"precision\" in typeParams for Numeric, got ${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 new Error(\n `renderOutputType: expected integer \"scale\" in typeParams for Numeric, got ${String(scale)}`,\n );\n }\n return `Numeric<${precision}, ${scale}>`;\n};\n\n// ISO 8601 UTC: `YYYY-MM-DDTHH:MM:SS[.mmm…]Z`. Trailing `Z` is required; fractional seconds are optional. Other `Date`-parseable formats (`January 15, 2024`, `01/15/2024`, etc.) are intentionally rejected because those formats are implementation-defined and not the documented contract for `pg/timestamp@1` / `pg/timestamptz@1`.\nconst ISO_8601_UTC = /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$/;\n\nexport const pgTimestampEncodeJson = (value: Date): JsonValue => value.toISOString();\nexport const pgTimestampDecodeJson = (json: JsonValue): Date => {\n if (typeof json !== 'string') {\n throw new Error(`Expected ISO date string for pg/timestamp@1, got ${typeof json}`);\n }\n if (!ISO_8601_UTC.test(json)) {\n throw new Error(`Invalid ISO date string for pg/timestamp@1: ${json}`);\n }\n const date = new Date(json);\n if (Number.isNaN(date.getTime())) {\n throw new Error(`Invalid ISO date string for pg/timestamp@1: ${json}`);\n }\n return date;\n};\n\nexport const pgTimestamptzEncodeJson = (value: Date): JsonValue => value.toISOString();\nexport const pgTimestamptzDecodeJson = (json: JsonValue): Date => {\n if (typeof json !== 'string') {\n throw new Error(`Expected ISO date string for pg/timestamptz@1, got ${typeof json}`);\n }\n if (!ISO_8601_UTC.test(json)) {\n throw new Error(`Invalid ISO date string for pg/timestamptz@1: ${json}`);\n }\n const date = new Date(json);\n if (Number.isNaN(date.getTime())) {\n throw new Error(`Invalid ISO date string for pg/timestamptz@1: ${json}`);\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 pgEnumRenderOutputType = (typeParams: {\n readonly values?: readonly unknown[];\n}): string => {\n const values = typeParams.values;\n if (!Array.isArray(values)) {\n throw new Error(\n `renderOutputType: expected array \"values\" in typeParams for enum, got ${typeof values}`,\n );\n }\n if (!values.every((v): v is string => typeof v === 'string')) {\n throw new Error(`renderOutputType: expected string[] \"values\" in typeParams for enum`);\n }\n return values\n .map((value) => `'${value.replace(/\\\\/g, '\\\\\\\\').replace(/'/g, \"\\\\'\")}'`)\n .join(' | ');\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 CodecDescriptorImpl} declaring the codec id, traits, target types, params schema, meta, and (where applicable)\n * the emit-path `renderOutputType`. 3. A per-codec column helper (`pgXColumn`) that calls `descriptor.factory(...)` directly and packages the result into a {@link 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 AnyCodecDescriptor,\n type CodecCallContext,\n CodecDescriptorImpl,\n CodecImpl,\n type CodecInstanceContext,\n type ColumnHelperFor,\n type ColumnHelperForStrict,\n column,\n voidParamsSchema,\n} from '@prisma-next/framework-components/codec';\nimport {\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 type { StandardSchemaV1 } from '@standard-schema/spec';\nimport { type as arktype } from 'arktype';\nimport {\n pgEnumRenderOutputType,\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_ENUM_CODEC_ID,\n PG_FLOAT_CODEC_ID,\n PG_FLOAT4_CODEC_ID,\n PG_FLOAT8_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_VARBIT_CODEC_ID,\n PG_VARCHAR_CODEC_ID,\n} from './codec-ids';\n\ntype LengthParams = { readonly length?: number };\ntype PrecisionParams = { readonly precision?: number };\ntype NumericParams = { readonly precision: number; readonly scale?: number };\ntype EnumParams = { readonly values?: readonly string[] };\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_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\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 CodecDescriptorImpl<void> {\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 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 * 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 CodecDescriptorImpl<void> {\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 CodecDescriptorImpl<void> {\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 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 CodecDescriptorImpl<void> {\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 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 CodecDescriptorImpl<void> {\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 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 CodecDescriptorImpl<void> {\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 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 CodecDescriptorImpl<void> {\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 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 CodecDescriptorImpl<void> {\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 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 return value;\n }\n decodeJson(json: JsonValue): string {\n return json as string;\n }\n}\n\nexport class PgNumericDescriptor extends CodecDescriptorImpl<NumericParams> {\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\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 CodecDescriptorImpl<PrecisionParams> {\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 CodecDescriptorImpl<PrecisionParams> {\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 CodecDescriptorImpl<PrecisionParams> {\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 CodecDescriptorImpl<PrecisionParams> {\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 CodecDescriptorImpl<LengthParams> {\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 CodecDescriptorImpl<LengthParams> {\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 Buffer.from(value).toString('base64');\n }\n decodeJson(json: JsonValue): Uint8Array {\n if (typeof json !== 'string') {\n throw new Error(`Expected base64 string for pg/bytea@1, got ${typeof json}`);\n }\n const decoded = Buffer.from(json, 'base64');\n if (decoded.toString('base64') !== json) {\n throw new Error(`Invalid base64 string for pg/bytea@1 (length: ${json.length})`);\n }\n return new Uint8Array(decoded);\n }\n}\n\nexport class PgByteaDescriptor extends CodecDescriptorImpl<void> {\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\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 CodecDescriptorImpl<PrecisionParams> {\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\nconst enumParamsSchema = arktype({\n 'values?': 'string[]',\n});\n\nexport class PgEnumCodec extends CodecImpl<\n typeof PG_ENUM_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 PgEnumDescriptor extends CodecDescriptorImpl<EnumParams> {\n override readonly codecId = PG_ENUM_CODEC_ID;\n override readonly traits = ['equality', 'order'] as const;\n override readonly targetTypes = ['enum'] as const;\n override readonly paramsSchema = enumParamsSchema satisfies StandardSchemaV1<EnumParams>;\n override renderOutputType(params: EnumParams): string | undefined {\n return pgEnumRenderOutputType(params);\n }\n override factory(_params: EnumParams): (ctx: CodecInstanceContext) => PgEnumCodec {\n return () => new PgEnumCodec(this);\n }\n}\n\nexport const pgEnumDescriptor = new PgEnumDescriptor();\n\nexport const pgEnumColumn = (params: EnumParams = {}) =>\n column(pgEnumDescriptor.factory(params), pgEnumDescriptor.codecId, params, 'enum');\n\npgEnumColumn satisfies ColumnHelperFor<PgEnumDescriptor>;\npgEnumColumn satisfies ColumnHelperForStrict<PgEnumDescriptor>;\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 CodecDescriptorImpl<void> {\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 CodecDescriptorImpl<void> {\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 CodecDescriptorImpl<LengthParams> {\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 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 CodecDescriptorImpl<LengthParams> {\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 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 CodecDescriptorImpl<void> {\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 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 CodecDescriptorImpl<void> {\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 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: readonly AnyCodecDescriptor[] = [\n sqlCharDescriptor,\n sqlVarcharDescriptor,\n sqlIntDescriptor,\n sqlFloatDescriptor,\n sqlTextDescriptor,\n sqlTimestampDescriptor,\n pgTextDescriptor,\n pgCharDescriptor,\n pgVarcharDescriptor,\n pgIntDescriptor,\n pgFloatDescriptor,\n pgInt4Descriptor,\n pgInt2Descriptor,\n pgInt8Descriptor,\n pgFloat4Descriptor,\n pgFloat8Descriptor,\n pgNumericDescriptor,\n pgTimestampDescriptor,\n pgTimestamptzDescriptor,\n pgTimeDescriptor,\n pgTimetzDescriptor,\n pgBoolDescriptor,\n pgBitDescriptor,\n pgVarbitDescriptor,\n pgByteaDescriptor,\n pgIntervalDescriptor,\n pgEnumDescriptor,\n pgJsonDescriptor,\n pgJsonbDescriptor,\n pgTextArrayDescriptor,\n];\n","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":";;;;;;AAUA,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,IAAI,MACR,iEAAiE,SAAS,QAAQ,OAAO,MAAM,GACjG;CAEF,OAAO,GAAG,SAAS,GAAG,OAAO;AAC/B;AAEA,SAAgB,gBAAgB,UAAkB,YAA6C;CAC7F,MAAM,YAAY,WAAW;CAC7B,IAAI,cAAc,KAAA,GAChB,OAAO;CAET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AG,kBAAkB,SAAS,KAAA,GAAW,QAAQ;;;;;;;;AC5gCpF,MAAa,wBACX,6BAA6B;CDkhC7B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AC/iC6B,CAAgB"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { n as PostgresCreateSchema, r as PostgresCreateTable } from "./nodes-CpRAsb10.mjs";
|
|
2
|
+
import { AnyFromSource, AstRewriter, DdlColumn, DdlNode, TableSource } from "@prisma-next/sql-relational-core/ast";
|
|
3
|
+
import { ColumnDescriptor, ColumnSchema, TableHandle } from "@prisma-next/sql-relational-core/contract-free";
|
|
4
|
+
|
|
5
|
+
//#region src/contract-free/columns.d.ts
|
|
6
|
+
type ColOpts = {
|
|
7
|
+
readonly nullable?: boolean;
|
|
8
|
+
};
|
|
9
|
+
declare const text: (opts?: ColOpts) => ColumnDescriptor;
|
|
10
|
+
declare const int4: (opts?: ColOpts) => ColumnDescriptor;
|
|
11
|
+
declare const int8: (opts?: ColOpts) => ColumnDescriptor;
|
|
12
|
+
declare const jsonb: (opts?: ColOpts) => ColumnDescriptor;
|
|
13
|
+
declare const textArray: (opts?: ColOpts) => ColumnDescriptor;
|
|
14
|
+
declare const timestamptz: (opts?: ColOpts) => ColumnDescriptor;
|
|
15
|
+
/**
|
|
16
|
+
* Declare a PostgreSQL control-plane table with a typed column schema. Wraps
|
|
17
|
+
* the generic `table()` factory with a `PostgresTableSource` so the renderer
|
|
18
|
+
* qualifies the table name with the optional schema prefix.
|
|
19
|
+
*
|
|
20
|
+
* ```ts
|
|
21
|
+
* const marker = pgTable(
|
|
22
|
+
* { name: 'marker', schema: 'prisma_contract' },
|
|
23
|
+
* { space: text(), core_hash: text(), updated_at: timestamptz() },
|
|
24
|
+
* );
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
declare function pgTable<Schema extends ColumnSchema>(source: {
|
|
28
|
+
readonly name: string;
|
|
29
|
+
readonly schema?: string;
|
|
30
|
+
readonly alias?: string;
|
|
31
|
+
}, columns: Schema): TableHandle<Schema>;
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region src/contract-free/control-bootstrap.d.ts
|
|
34
|
+
declare function buildSignMarkerBootstrapQueries(): readonly DdlNode[];
|
|
35
|
+
declare function buildControlTableBootstrapQueries(): readonly DdlNode[];
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region src/contract-free/ddl.d.ts
|
|
38
|
+
/**
|
|
39
|
+
* Build a Postgres `CREATE TABLE` query node.
|
|
40
|
+
*
|
|
41
|
+
* Precondition: identifiers (`table`, `schema`, column names/types) are
|
|
42
|
+
* emitted to SQL verbatim — they are not quoted or escaped, so callers must
|
|
43
|
+
* pass pre-trusted values (e.g. fixed control-plane identifiers). String-literal
|
|
44
|
+
* default values, by contrast, are single-quote-escaped (embedded `'` doubled)
|
|
45
|
+
* by the renderer. Identifier quoting for untrusted identifiers is added when
|
|
46
|
+
* the migration planner adopts this lowering path.
|
|
47
|
+
*/
|
|
48
|
+
declare function createTable(options: {
|
|
49
|
+
readonly table: string;
|
|
50
|
+
readonly schema?: string;
|
|
51
|
+
readonly ifNotExists?: boolean;
|
|
52
|
+
readonly columns: readonly DdlColumn[];
|
|
53
|
+
}): PostgresCreateTable;
|
|
54
|
+
/**
|
|
55
|
+
* Build a Postgres `CREATE SCHEMA` query node. See {@link createTable} for the
|
|
56
|
+
* pre-trusted-identifier precondition.
|
|
57
|
+
*/
|
|
58
|
+
declare function createSchema(options: {
|
|
59
|
+
readonly schema: string;
|
|
60
|
+
readonly ifNotExists?: boolean;
|
|
61
|
+
}): PostgresCreateSchema;
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region src/core/ast/table-source.d.ts
|
|
64
|
+
declare class PostgresTableSource extends TableSource {
|
|
65
|
+
readonly schema: string | undefined;
|
|
66
|
+
constructor(options: {
|
|
67
|
+
readonly name: string;
|
|
68
|
+
readonly schema?: string;
|
|
69
|
+
readonly alias?: string;
|
|
70
|
+
});
|
|
71
|
+
rewrite(rewriter: AstRewriter): AnyFromSource;
|
|
72
|
+
}
|
|
73
|
+
//#endregion
|
|
74
|
+
export { PostgresTableSource, buildControlTableBootstrapQueries, buildSignMarkerBootstrapQueries, createSchema, createTable, int4, int8, jsonb, pgTable, text, textArray, timestamptz };
|
|
75
|
+
//# sourceMappingURL=contract-free.d.mts.map
|