@prisma/orm-target-postgres 8.0.0-rc.18-dev.29 → 8.0.0-rc.18-dev.30
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/{adapter-CEZ6dg2a.d.mts → adapter-vfsQ80l6.d.mts} +8 -8
- package/dist/{adapter-CEZ6dg2a.d.mts.map → adapter-vfsQ80l6.d.mts.map} +1 -1
- package/dist/adapter.d.mts +1 -1
- package/dist/adapter__adapter.d.mts +1 -1
- package/dist/adapter__control.mjs +13 -133
- package/dist/adapter__control.mjs.map +1 -1
- package/dist/adapter__runtime.mjs +2 -2
- package/dist/adapter__runtime.mjs.map +1 -1
- package/dist/{aggregates-C2xqsGZ2.d.mts → aggregates-B3lIBjGK.d.mts} +8 -8
- package/dist/{aggregates-C2xqsGZ2.d.mts.map → aggregates-B3lIBjGK.d.mts.map} +1 -1
- package/dist/{authoring-DhyLHFHA-pB4NuFxh.mjs → authoring-DtjMn8TZ-sv84Cdw_.mjs} +18 -34
- package/dist/authoring-DtjMn8TZ-sv84Cdw_.mjs.map +1 -0
- package/dist/{control-DmWVxA23.d.mts → control-BRE_BcLl.d.mts} +2 -2
- package/dist/{control-DmWVxA23.d.mts.map → control-BRE_BcLl.d.mts.map} +1 -1
- package/dist/{descriptor-meta-Bzs7kSyA-BjbnpZLW.mjs → descriptor-meta-C0yUaYLH-CUtYbbZp.mjs} +21 -3
- package/dist/descriptor-meta-C0yUaYLH-CUtYbbZp.mjs.map +1 -0
- package/dist/{diff-database-schema-BGcRo8FM.d.mts → diff-database-schema-Diw5m51r.d.mts} +2 -2
- package/dist/{diff-database-schema-BGcRo8FM.d.mts.map → diff-database-schema-Diw5m51r.d.mts.map} +1 -1
- package/dist/{indexes-DtIXFHAb-DBubdl32.d.mts → indexes-BX4ewz3l-CPzMc0-t.d.mts} +3 -3
- package/dist/{indexes-DtIXFHAb-DBubdl32.d.mts.map → indexes-BX4ewz3l-CPzMc0-t.d.mts.map} +1 -1
- package/dist/{issue-planner-DrWlNiAf.d.mts → issue-planner-BT5rqDNx.d.mts} +3 -3
- package/dist/{issue-planner-DrWlNiAf.d.mts.map → issue-planner-BT5rqDNx.d.mts.map} +1 -1
- package/dist/{migration-DST6YA2w.d.mts → migration-BWZskUHP.d.mts} +3 -3
- package/dist/{migration-DST6YA2w.d.mts.map → migration-BWZskUHP.d.mts.map} +1 -1
- package/dist/migration-CbOh59ZJ.mjs.map +1 -1
- package/dist/op-factory-call-CEyI7a78.d.mts +1 -0
- package/dist/{op-factory-call-kdPO0kgG-DV8hS6qA.d.mts → op-factory-call-DILl2zlf-BakJezLJ.d.mts} +4 -4
- package/dist/{op-factory-call-kdPO0kgG-DV8hS6qA.d.mts.map → op-factory-call-DILl2zlf-BakJezLJ.d.mts.map} +1 -1
- package/dist/{pack-CcQNl-gj.d.mts → pack-C-rgdVoH.d.mts} +6 -1
- package/dist/{pack-CcQNl-gj.d.mts.map → pack-C-rgdVoH.d.mts.map} +1 -1
- package/dist/{planner-CE4YoVdA-BfwuVRuT.mjs → planner-BIOXTf-E-CFs_l_0M.mjs} +4 -4
- package/dist/{planner-CE4YoVdA-BfwuVRuT.mjs.map → planner-BIOXTf-E-CFs_l_0M.mjs.map} +1 -1
- package/dist/{planner-D3wWu7Kj.d.mts → planner-Bo92I5YX.d.mts} +3 -3
- package/dist/{planner-D3wWu7Kj.d.mts.map → planner-Bo92I5YX.d.mts.map} +1 -1
- package/dist/{planner-produced-postgres-migration-BRjNXwjn-DhjS0Pbw.d.mts → planner-produced-postgres-migration-C8uYGzUj-DRmZY4_u.d.mts} +3 -3
- package/dist/planner-produced-postgres-migration-C8uYGzUj-DRmZY4_u.d.mts.map +1 -0
- package/dist/planner-produced-postgres-migration-DaDlRTID.d.mts +1 -0
- package/dist/{planner-produced-postgres-migration-F9joIngl-C04yYu-i.mjs → planner-produced-postgres-migration-Y7bMLPPc-tZeIl3hP.mjs} +3 -3
- package/dist/{planner-produced-postgres-migration-F9joIngl-C04yYu-i.mjs.map → planner-produced-postgres-migration-Y7bMLPPc-tZeIl3hP.mjs.map} +1 -1
- package/dist/{planner-sql-checks-CxlrM4J2-VqQpmMwn.d.mts → planner-sql-checks-CWOmxltY-CoWF8Eq0.d.mts} +3 -3
- package/dist/{planner-sql-checks-CxlrM4J2-VqQpmMwn.d.mts.map → planner-sql-checks-CWOmxltY-CoWF8Eq0.d.mts.map} +1 -1
- package/dist/planner-sql-checks-Cp3fcCNc.d.mts +1 -0
- package/dist/{postgres-contract-view-B-bLZB7o-zpuamDXT.mjs → postgres-contract-view-Ctg2ire_-smoqnU-u.mjs} +3 -3
- package/dist/{postgres-contract-view-B-bLZB7o-zpuamDXT.mjs.map → postgres-contract-view-Ctg2ire_-smoqnU-u.mjs.map} +1 -1
- package/dist/{postgres-migration-BbXm1l5I-DDy8IgYB.mjs → postgres-migration-BdFXT6xg-BPApPGX9.mjs} +3 -3
- package/dist/{postgres-migration-BbXm1l5I-DDy8IgYB.mjs.map → postgres-migration-BdFXT6xg-BPApPGX9.mjs.map} +1 -1
- package/dist/{postgres-migration-Crcs_mmg-D1ZyiWtc.d.mts → postgres-migration-HW4fCGNb-CLkytGtG.d.mts} +3 -3
- package/dist/{postgres-migration-Crcs_mmg-D1ZyiWtc.d.mts.map → postgres-migration-HW4fCGNb-CLkytGtG.d.mts.map} +1 -1
- package/dist/{prisma7-binding-C5RLV6kJ.d.mts → prisma7-binding-BXyT6bKE.d.mts} +6 -10
- package/dist/prisma7-binding-BXyT6bKE.d.mts.map +1 -0
- package/dist/{prisma7-binding-CS42flik.mjs → prisma7-binding-DWeHpJrg.mjs} +3 -5
- package/dist/prisma7-binding-DWeHpJrg.mjs.map +1 -0
- package/dist/target.d.mts +15 -15
- package/dist/target.mjs +7 -7
- package/dist/target__aggregates.d.mts +1 -1
- package/dist/target__control.d.mts +1 -1
- package/dist/target__control.mjs +76 -143
- package/dist/target__control.mjs.map +1 -1
- package/dist/target__diff-database-schema.d.mts +1 -1
- package/dist/target__issue-planner.d.mts +1 -1
- package/dist/target__migration.d.mts +2 -2
- package/dist/target__migration.mjs +1 -1
- package/dist/target__op-factory-call.d.mts +2 -2
- package/dist/target__pack.d.mts +1 -1
- package/dist/target__pack.mjs +1 -1
- package/dist/target__planner-produced-postgres-migration.d.mts +2 -2
- package/dist/target__planner-produced-postgres-migration.mjs +1 -1
- package/dist/target__planner-sql-checks.d.mts +2 -2
- package/dist/target__planner.d.mts +1 -1
- package/dist/target__planner.mjs +1 -1
- package/dist/target__prisma7-binding.d.mts +1 -1
- package/dist/target__prisma7-binding.mjs +1 -1
- package/dist/target__runtime.mjs +2 -2
- package/dist/target__runtime.mjs.map +1 -1
- package/dist/{type-constructors-C4QD_3HB-Czhx8fAX.mjs → type-constructors-BEZJxWcZ-Co2GJw1M.mjs} +4 -4
- package/dist/{type-constructors-C4QD_3HB-Czhx8fAX.mjs.map → type-constructors-BEZJxWcZ-Co2GJw1M.mjs.map} +1 -1
- package/package.json +9 -9
- package/dist/authoring-DhyLHFHA-pB4NuFxh.mjs.map +0 -1
- package/dist/descriptor-meta-Bzs7kSyA-BjbnpZLW.mjs.map +0 -1
- package/dist/op-factory-call-CijzNDaJ.d.mts +0 -1
- package/dist/planner-produced-postgres-migration-BRjNXwjn-DhjS0Pbw.d.mts.map +0 -1
- package/dist/planner-produced-postgres-migration-CiHKwaE_.d.mts +0 -1
- package/dist/planner-sql-checks-CB4oLSuZ.d.mts +0 -1
- package/dist/prisma7-binding-C5RLV6kJ.d.mts.map +0 -1
- package/dist/prisma7-binding-CS42flik.mjs.map +0 -1
|
@@ -114,7 +114,7 @@ declare const postgresAdapterContractContributions: {
|
|
|
114
114
|
readonly operation: "sum";
|
|
115
115
|
readonly input: {
|
|
116
116
|
readonly kind: "codec";
|
|
117
|
-
readonly codecId: "pg/int8number@1" | "pg/int4@1" | "pg/int8@1" | "sql/int@1" | "pg/
|
|
117
|
+
readonly codecId: "pg/int8number@1" | "pg/int4@1" | "pg/int8@1" | "sql/int@1" | "pg/int@1" | "pg/int2@1";
|
|
118
118
|
};
|
|
119
119
|
readonly output: {
|
|
120
120
|
readonly kind: "codec";
|
|
@@ -126,7 +126,7 @@ declare const postgresAdapterContractContributions: {
|
|
|
126
126
|
readonly operation: "sumBigInt";
|
|
127
127
|
readonly input: {
|
|
128
128
|
readonly kind: "codec";
|
|
129
|
-
readonly codecId: "pg/int4@1" | "sql/int@1" | "pg/
|
|
129
|
+
readonly codecId: "pg/int4@1" | "sql/int@1" | "pg/int@1" | "pg/int2@1";
|
|
130
130
|
};
|
|
131
131
|
readonly output: {
|
|
132
132
|
readonly kind: "codec";
|
|
@@ -239,7 +239,7 @@ declare const postgresAdapterContractContributions: {
|
|
|
239
239
|
readonly operation: "avg";
|
|
240
240
|
readonly input: {
|
|
241
241
|
readonly kind: "codec";
|
|
242
|
-
readonly codecId: "pg/int8number@1" | "pg/unboundedint@1" | "pg/int4@1" | "pg/int8@1" | "sql/int@1" | "pg/
|
|
242
|
+
readonly codecId: "pg/int8number@1" | "pg/unboundedint@1" | "pg/int4@1" | "pg/int8@1" | "sql/int@1" | "pg/int@1" | "pg/int2@1";
|
|
243
243
|
};
|
|
244
244
|
readonly output: {
|
|
245
245
|
readonly kind: "codec";
|
|
@@ -251,7 +251,7 @@ declare const postgresAdapterContractContributions: {
|
|
|
251
251
|
readonly operation: "avgDecimal";
|
|
252
252
|
readonly input: {
|
|
253
253
|
readonly kind: "codec";
|
|
254
|
-
readonly codecId: "pg/int8number@1" | "pg/unboundedint@1" | "pg/int4@1" | "pg/int8@1" | "pg/numeric@1" | "sql/int@1" | "pg/
|
|
254
|
+
readonly codecId: "pg/int8number@1" | "pg/unboundedint@1" | "pg/int4@1" | "pg/int8@1" | "pg/numeric@1" | "sql/int@1" | "pg/int@1" | "pg/int2@1";
|
|
255
255
|
};
|
|
256
256
|
readonly output: {
|
|
257
257
|
readonly kind: "codec";
|
|
@@ -262,7 +262,7 @@ declare const postgresAdapterContractContributions: {
|
|
|
262
262
|
readonly operation: "avg";
|
|
263
263
|
readonly input: {
|
|
264
264
|
readonly kind: "codec";
|
|
265
|
-
readonly codecId: "pg/float8@1" | "sql/float@1" | "pg/
|
|
265
|
+
readonly codecId: "pg/float8@1" | "sql/float@1" | "pg/float@1" | "pg/float4@1";
|
|
266
266
|
};
|
|
267
267
|
readonly output: {
|
|
268
268
|
readonly kind: "codec";
|
|
@@ -348,7 +348,7 @@ declare const postgresAdapterContractContributions: {
|
|
|
348
348
|
readonly operation: "min";
|
|
349
349
|
readonly input: {
|
|
350
350
|
readonly kind: "codec";
|
|
351
|
-
readonly codecId: "pg/enum@1" | "pg/timestamptz-temporal@1" | "pg/timestamptz-date@1" | "pg/date-temporal@1" | "pg/date-string@1" | "pg/time-temporal@1" | "pg/time-string@1" | "pg/timetz@1" | "pg/timestamp-temporal@1" | "pg/timestamp-string@1" | "pg/timestamptz-string@1" | "pg/
|
|
351
|
+
readonly codecId: "pg/enum@1" | "pg/timestamptz-temporal@1" | "pg/timestamptz-date@1" | "pg/date-temporal@1" | "pg/date-string@1" | "pg/time-temporal@1" | "pg/time-string@1" | "pg/timetz@1" | "pg/timestamp-temporal@1" | "pg/timestamp-string@1" | "pg/timestamptz-string@1" | "pg/text-array@1" | "pg/interval@1" | "pg/inet@1";
|
|
352
352
|
};
|
|
353
353
|
readonly output: {
|
|
354
354
|
readonly kind: "self";
|
|
@@ -389,7 +389,7 @@ declare const postgresAdapterContractContributions: {
|
|
|
389
389
|
readonly operation: "max";
|
|
390
390
|
readonly input: {
|
|
391
391
|
readonly kind: "codec";
|
|
392
|
-
readonly codecId: "pg/enum@1" | "pg/timestamptz-temporal@1" | "pg/timestamptz-date@1" | "pg/date-temporal@1" | "pg/date-string@1" | "pg/time-temporal@1" | "pg/time-string@1" | "pg/timetz@1" | "pg/timestamp-temporal@1" | "pg/timestamp-string@1" | "pg/timestamptz-string@1" | "pg/
|
|
392
|
+
readonly codecId: "pg/enum@1" | "pg/timestamptz-temporal@1" | "pg/timestamptz-date@1" | "pg/date-temporal@1" | "pg/date-string@1" | "pg/time-temporal@1" | "pg/time-string@1" | "pg/timetz@1" | "pg/timestamp-temporal@1" | "pg/timestamp-string@1" | "pg/timestamptz-string@1" | "pg/text-array@1" | "pg/interval@1" | "pg/inet@1";
|
|
393
393
|
};
|
|
394
394
|
readonly output: {
|
|
395
395
|
readonly kind: "self";
|
|
@@ -400,4 +400,4 @@ declare const postgresAdapterContractContributions: {
|
|
|
400
400
|
};
|
|
401
401
|
//#endregion
|
|
402
402
|
export { postgresRawCodecInferer as i, postgresAdapterCapabilities as n, postgresAdapterContractContributions as r, createPostgresAdapter as t };
|
|
403
|
-
//# sourceMappingURL=adapter-
|
|
403
|
+
//# sourceMappingURL=adapter-vfsQ80l6.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter-
|
|
1
|
+
{"version":3,"file":"adapter-vfsQ80l6.d.mts","names":[],"sources":["../../../../3-targets/6-adapters/postgres/dist/adapter.d.mts"],"mappings":";;;;;;;;;;cAOc,+BAA+B,QAAQ,aAAa,kBAAkB;WACzE;WACA;WACA,SAAS;mBACD;mBACA;EACjB,YAAY,eAAe,uBAAuB,gBAAgB,gBAAgB,4BAA4B,YAAY;EAC1H,MAAM,KAAK,cAAc,iBAAiB,SAAS,eAAe,oBAAoB;;;;;;;cAO1E,yBAAyB;iBACtB,sBAAsB,UAAU,yBAAyB,SAAS;;;cAGrE,6BAA6B;WAChC;aACE;aACA;aACA;aACA;aACA;aACA;aACA;aACA;;WAEF;aACE;aACA;aACA;aACA;aACA;aACA;aACA;aACA;aACA;aACA;aACA;aACA;aACA;;;;;;;;cAQC;WACH,cAAc;aACZ;eACE;eACA;eACA;eACA;eACA;eACA;eACA;eACA;;aAEF;eACE;eACA;eACA;eACA;eACA;eACA;eACA;eACA;eACA;eACA;eACA;eACA;eACA;;;WAGJ;aACE;eACE;eACA;iBACE;;eAEF;iBACE;iBACA;;eAEF;eACA;;eAEA;eACA;iBACE;;eAEF;iBACE;iBACA;;eAEF;eACA;eACA,6EAA6E;;eAE7E;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA,6EAA6E;eAC7E;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA,6EAA6E;eAC7E;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA,6EAA6E;eAC7E;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA,6EAA6E;eAC7E;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA,6EAA6E;eAC7E;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;;eAEF"}
|
package/dist/adapter.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as PostgresContract } from "./postgres-schema-Xsjt3RKO-Buv2X8ai.mjs";
|
|
2
2
|
import { a as OrderClause, c as PostgresLoweredStatement, d as StorageTable, i as Expr, l as SelectAst, n as ColumnRef, o as ParamRef, r as Direction, s as PostgresAdapterOptions, t as BinaryExpr, u as StorageColumn } from "./types-D6lgKhE5-CjLf9QtO.mjs";
|
|
3
3
|
import { a as createPostgresCodecRegistryWithBuiltins, i as createPostgresBuiltinCodecLookup, t as PostgresCodecRegistry } from "./codecs-J4SSxTf4.mjs";
|
|
4
|
-
import { i as postgresRawCodecInferer, n as postgresAdapterCapabilities, r as postgresAdapterContractContributions, t as createPostgresAdapter } from "./adapter-
|
|
4
|
+
import { i as postgresRawCodecInferer, n as postgresAdapterCapabilities, r as postgresAdapterContractContributions, t as createPostgresAdapter } from "./adapter-vfsQ80l6.mjs";
|
|
5
5
|
import { C as timestamptzTemporalColumn, E as varcharColumn, S as timestamptzStringColumn, T as varbitColumn, _ as timeStringColumn, a as dateStringColumn, b as timestampTemporalColumn, c as float8Column, d as int8Column, f as intervalColumn, g as textColumn, h as numericColumn, i as charColumn, l as int2Column, m as jsonbColumn, n as boolColumn, o as dateTemporalColumn, p as jsonColumn, r as byteaColumn, s as float4Column, t as bitColumn, u as int4Column, v as timeTemporalColumn, w as timetzColumn, x as timestamptzJsDateColumn, y as timestampStringColumn } from "./column-types-COdejX_b.mjs";
|
|
6
6
|
import { n as qualifyName, r as quoteIdentifier, t as escapeLiteral } from "./sql-utils-B7LfCQCB.mjs";
|
|
7
7
|
import { t as PostgresControlAdapter } from "./control-vBNwKZ7Q.mjs";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as postgresRawCodecInferer, n as postgresAdapterCapabilities, r as postgresAdapterContractContributions, t as createPostgresAdapter } from "./adapter-
|
|
1
|
+
import { i as postgresRawCodecInferer, n as postgresAdapterCapabilities, r as postgresAdapterContractContributions, t as createPostgresAdapter } from "./adapter-vfsQ80l6.mjs";
|
|
2
2
|
export { createPostgresAdapter, postgresAdapterCapabilities, postgresAdapterContractContributions, postgresRawCodecInferer };
|
|
@@ -1,153 +1,33 @@
|
|
|
1
1
|
import { i as quoteIdentifier, n as escapeLiteral, r as qualifyName } from "./sql-utils-Bnw3JbWf-zvWDkyrr.mjs";
|
|
2
2
|
import { i as createPostgresCodecRegistryWithBuiltins, r as createPostgresBuiltinCodecLookup, t as assemblePostgresCodecRegistry } from "./codec-registry-T79ktJL4-B9_zlIhI.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { v as postgresPslTypeConstructors } from "./type-constructors-C4QD_3HB-Czhx8fAX.mjs";
|
|
3
|
+
import { v as postgresPslTypeConstructors } from "./type-constructors-BEZJxWcZ-Co2GJw1M.mjs";
|
|
5
4
|
import { t as PostgresControlAdapter } from "./contract-contributions-CQqafzSC-DrMFSSO4.mjs";
|
|
6
5
|
import { t as postgresAdapterDescriptorMeta } from "./descriptor-meta-DDh7-s6c-D6qC3SDx.mjs";
|
|
7
|
-
import { timestampNowControlDescriptor } from "@prisma/orm-framework/components/control";
|
|
8
|
-
import { int, num, oneOf, optional } from "@prisma/orm-framework/psl-parser";
|
|
9
|
-
import { builtinGeneratorRegistryMetadata } from "@prisma/orm-framework/ids";
|
|
10
6
|
//#region ../../../3-targets/6-adapters/postgres/dist/control.mjs
|
|
11
|
-
function
|
|
12
|
-
return {
|
|
13
|
-
ok: true,
|
|
14
|
-
value: {
|
|
15
|
-
kind: "execution",
|
|
16
|
-
generated: {
|
|
17
|
-
kind: "generator",
|
|
18
|
-
id,
|
|
19
|
-
...params ? { params } : {}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
function lowerAutoincrement() {
|
|
7
|
+
function databaseFunction(expression) {
|
|
25
8
|
return {
|
|
26
9
|
ok: true,
|
|
27
10
|
value: {
|
|
28
11
|
kind: "storage",
|
|
29
12
|
defaultValue: {
|
|
30
13
|
kind: "function",
|
|
31
|
-
expression
|
|
14
|
+
expression
|
|
32
15
|
}
|
|
33
16
|
}
|
|
34
17
|
};
|
|
35
18
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
function lowerUlid() {
|
|
49
|
-
return executionGenerator("ulid");
|
|
50
|
-
}
|
|
51
|
-
function lowerUuid(input) {
|
|
52
|
-
return input.call.args["version"] === 7 ? executionGenerator("uuidv7") : executionGenerator("uuidv4");
|
|
53
|
-
}
|
|
54
|
-
function lowerCuid() {
|
|
55
|
-
return executionGenerator("cuid2");
|
|
56
|
-
}
|
|
57
|
-
function lowerNanoid(input) {
|
|
58
|
-
const size = input.call.args["size"];
|
|
59
|
-
return typeof size === "number" ? executionGenerator("nanoid", { size }) : executionGenerator("nanoid");
|
|
60
|
-
}
|
|
61
|
-
function printNanoidArguments(params) {
|
|
62
|
-
const size = params?.["size"];
|
|
63
|
-
return typeof size === "number" ? String(size) : "";
|
|
64
|
-
}
|
|
65
|
-
const nowSig = { documentation: "Uses the current database timestamp as the default value." };
|
|
66
|
-
const autoincrementSig = { documentation: "Generates an increasing integer value in the database." };
|
|
67
|
-
const ulidSig = { documentation: "Generates a ULID when a value is not supplied." };
|
|
68
|
-
const uuidSig = {
|
|
69
|
-
documentation: "Generates a UUID when a value is not supplied.",
|
|
70
|
-
positional: [{
|
|
71
|
-
key: "version",
|
|
72
|
-
type: optional(oneOf(num(4), num(7))),
|
|
73
|
-
documentation: "The UUID version: `4` or `7`. Defaults to `4`."
|
|
74
|
-
}]
|
|
75
|
-
};
|
|
76
|
-
const cuidSig = {
|
|
77
|
-
documentation: "Generates a CUID2 identifier when a value is not supplied.",
|
|
78
|
-
positional: [{
|
|
79
|
-
key: "version",
|
|
80
|
-
type: num(2),
|
|
81
|
-
documentation: "The CUID version. Only `2` is supported."
|
|
82
|
-
}]
|
|
83
|
-
};
|
|
84
|
-
const nanoidSig = {
|
|
85
|
-
documentation: "Generates a Nano ID when a value is not supplied.",
|
|
86
|
-
positional: [{
|
|
87
|
-
key: "size",
|
|
88
|
-
type: optional(int({
|
|
89
|
-
min: 2,
|
|
90
|
-
max: 255
|
|
91
|
-
})),
|
|
92
|
-
documentation: "The identifier length, from `2` through `255`. Omit to use the generator default."
|
|
93
|
-
}]
|
|
94
|
-
};
|
|
95
|
-
const postgresDefaultFunctionRegistryEntries = [
|
|
96
|
-
["autoincrement", {
|
|
97
|
-
signature: autoincrementSig,
|
|
98
|
-
lower: lowerAutoincrement,
|
|
99
|
-
usageSignatures: ["autoincrement()"]
|
|
100
|
-
}],
|
|
101
|
-
["now", {
|
|
102
|
-
signature: nowSig,
|
|
103
|
-
lower: lowerNow,
|
|
104
|
-
usageSignatures: ["now()"]
|
|
105
|
-
}],
|
|
106
|
-
["uuid", {
|
|
107
|
-
signature: uuidSig,
|
|
108
|
-
lower: lowerUuid,
|
|
109
|
-
usageSignatures: [
|
|
110
|
-
"uuid()",
|
|
111
|
-
"uuid(4)",
|
|
112
|
-
"uuid(7)"
|
|
113
|
-
],
|
|
114
|
-
printArguments: {
|
|
115
|
-
uuidv4: () => "",
|
|
116
|
-
uuidv7: () => "7"
|
|
117
|
-
}
|
|
118
|
-
}],
|
|
119
|
-
["cuid", {
|
|
120
|
-
signature: cuidSig,
|
|
121
|
-
lower: lowerCuid,
|
|
122
|
-
usageSignatures: ["cuid(2)"],
|
|
123
|
-
printArguments: { cuid2: () => "2" }
|
|
124
|
-
}],
|
|
125
|
-
["ulid", {
|
|
126
|
-
signature: ulidSig,
|
|
127
|
-
lower: lowerUlid,
|
|
128
|
-
usageSignatures: ["ulid()"],
|
|
129
|
-
printArguments: { ulid: () => "" }
|
|
130
|
-
}],
|
|
131
|
-
["nanoid", {
|
|
132
|
-
signature: nanoidSig,
|
|
133
|
-
lower: lowerNanoid,
|
|
134
|
-
usageSignatures: ["nanoid()", "nanoid(<2-255>)"],
|
|
135
|
-
printArguments: { nanoid: printNanoidArguments }
|
|
136
|
-
}]
|
|
137
|
-
];
|
|
19
|
+
const postgresDefaultFunctionRegistryEntries = [["autoincrement", {
|
|
20
|
+
signature: { documentation: "Generates an increasing integer value in the database." },
|
|
21
|
+
lower: () => databaseFunction("autoincrement()"),
|
|
22
|
+
usageSignatures: ["autoincrement()"]
|
|
23
|
+
}], ["now", {
|
|
24
|
+
signature: { documentation: "Uses the current database timestamp as the default value." },
|
|
25
|
+
lower: () => databaseFunction("now()"),
|
|
26
|
+
usageSignatures: ["now()"]
|
|
27
|
+
}]];
|
|
138
28
|
function createPostgresDefaultFunctionRegistry() {
|
|
139
29
|
return new Map(postgresDefaultFunctionRegistryEntries);
|
|
140
30
|
}
|
|
141
|
-
function createPostgresMutationDefaultGeneratorDescriptors() {
|
|
142
|
-
return [
|
|
143
|
-
...builtinGeneratorRegistryMetadata.map(({ id, applicableCodecIds }) => ({
|
|
144
|
-
id,
|
|
145
|
-
applicableCodecIds
|
|
146
|
-
})),
|
|
147
|
-
timestampNowControlDescriptor(),
|
|
148
|
-
...postgresNowGeneratorControlDescriptors()
|
|
149
|
-
];
|
|
150
|
-
}
|
|
151
31
|
const postgresAdapterDescriptor = {
|
|
152
32
|
...postgresAdapterDescriptorMeta,
|
|
153
33
|
authoring: {
|
|
@@ -156,7 +36,7 @@ const postgresAdapterDescriptor = {
|
|
|
156
36
|
},
|
|
157
37
|
controlMutationDefaults: {
|
|
158
38
|
defaultFunctionRegistry: createPostgresDefaultFunctionRegistry(),
|
|
159
|
-
generatorDescriptors:
|
|
39
|
+
generatorDescriptors: []
|
|
160
40
|
},
|
|
161
41
|
create(stack) {
|
|
162
42
|
return new PostgresControlAdapter(assemblePostgresCodecRegistry([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter__control.mjs","names":[],"sources":["../../../../3-targets/6-adapters/postgres/dist/control.mjs"],"sourcesContent":["import { n as PostgresControlAdapter } from \"./contract-contributions-CQqafzSC.mjs\";\nimport { t as postgresAdapterDescriptorMeta } from \"./descriptor-meta-DDh7-s6c.mjs\";\nimport {
|
|
1
|
+
{"version":3,"file":"adapter__control.mjs","names":[],"sources":["../../../../3-targets/6-adapters/postgres/dist/control.mjs"],"sourcesContent":["import { n as PostgresControlAdapter } from \"./contract-contributions-CQqafzSC.mjs\";\nimport { t as postgresAdapterDescriptorMeta } from \"./descriptor-meta-DDh7-s6c.mjs\";\nimport { assemblePostgresCodecRegistry, createPostgresBuiltinCodecLookup, createPostgresCodecRegistryWithBuiltins } from \"@internal/target-postgres/codecs\";\nimport { escapeLiteral, qualifyName, quoteIdentifier } from \"@internal/target-postgres/sql-utils\";\nimport { postgresPslTypeConstructors } from \"@internal/target-postgres/control\";\n//#region src/core/control-mutation-defaults.ts\nfunction databaseFunction(expression) {\n\treturn {\n\t\tok: true,\n\t\tvalue: {\n\t\t\tkind: \"storage\",\n\t\t\tdefaultValue: {\n\t\t\t\tkind: \"function\",\n\t\t\t\texpression\n\t\t\t}\n\t\t}\n\t};\n}\nconst postgresDefaultFunctionRegistryEntries = [[\"autoincrement\", {\n\tsignature: { documentation: \"Generates an increasing integer value in the database.\" },\n\tlower: () => databaseFunction(\"autoincrement()\"),\n\tusageSignatures: [\"autoincrement()\"]\n}], [\"now\", {\n\tsignature: { documentation: \"Uses the current database timestamp as the default value.\" },\n\tlower: () => databaseFunction(\"now()\"),\n\tusageSignatures: [\"now()\"]\n}]];\nfunction createPostgresDefaultFunctionRegistry() {\n\treturn new Map(postgresDefaultFunctionRegistryEntries);\n}\n//#endregion\n//#region src/exports/control.ts\nconst postgresAdapterDescriptor = {\n\t...postgresAdapterDescriptorMeta,\n\tauthoring: {\n\t\ttype: postgresPslTypeConstructors,\n\t\tvalueObjectStorageType: \"Jsonb\"\n\t},\n\tcontrolMutationDefaults: {\n\t\tdefaultFunctionRegistry: createPostgresDefaultFunctionRegistry(),\n\t\tgeneratorDescriptors: []\n\t},\n\tcreate(stack) {\n\t\treturn new PostgresControlAdapter(assemblePostgresCodecRegistry([\n\t\t\tstack.target,\n\t\t\t...stack.adapter === void 0 ? [] : [stack.adapter],\n\t\t\t...stack.extensions\n\t\t], stack.dataTypes.lookup), stack.dataTypes.lookup, stack.declaredDataTypes.map(({ type }) => type));\n\t}\n};\n//#endregion\nexport { PostgresControlAdapter, createPostgresBuiltinCodecLookup, createPostgresCodecRegistryWithBuiltins, postgresAdapterDescriptor as default, escapeLiteral, qualifyName, quoteIdentifier };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;;;;;AAMA,SAAS,iBAAiB,YAAY;CACrC,OAAO;EACN,IAAI;EACJ,OAAO;GACN,MAAM;GACN,cAAc;IACb,MAAM;IACN;GACD;EACD;CACD;AACD;AACA,MAAM,yCAAyC,CAAC,CAAC,iBAAiB;CACjE,WAAW,EAAE,eAAe,yDAAyD;CACrF,aAAa,iBAAiB,iBAAiB;CAC/C,iBAAiB,CAAC,iBAAiB;AACpC,CAAC,GAAG,CAAC,OAAO;CACX,WAAW,EAAE,eAAe,4DAA4D;CACxF,aAAa,iBAAiB,OAAO;CACrC,iBAAiB,CAAC,OAAO;AAC1B,CAAC,CAAC;AACF,SAAS,wCAAwC;CAChD,OAAO,IAAI,IAAI,sCAAsC;AACtD;AAGA,MAAM,4BAA4B;CACjC,GAAG;CACH,WAAW;EACV,MAAM;EACN,wBAAwB;CACzB;CACA,yBAAyB;EACxB,yBAAyB,sCAAsC;EAC/D,sBAAsB,CAAC;CACxB;CACA,OAAO,OAAO;EACb,OAAO,IAAI,uBAAuB,8BAA8B;GAC/D,MAAM;GACN,GAAG,MAAM,YAAY,KAAK,IAAI,CAAC,IAAI,CAAC,MAAM,OAAO;GACjD,GAAG,MAAM;EACV,GAAG,MAAM,UAAU,MAAM,GAAG,MAAM,UAAU,QAAQ,MAAM,kBAAkB,KAAK,EAAE,WAAW,IAAI,CAAC;CACpG;AACD"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { o as postgresCodecRegistry, t as assemblePostgresCodecRegistry } from "./codec-registry-T79ktJL4-B9_zlIhI.mjs";
|
|
2
|
-
import { u as postgresNowGenerators } from "./authoring-
|
|
2
|
+
import { u as postgresNowGenerators } from "./authoring-DtjMn8TZ-sv84Cdw_.mjs";
|
|
3
3
|
import { n as createPostgresAdapterWithCodecRegistry, r as postgresRawCodecInferer } from "./adapter-BkfuSVLm-DmjWB5c9.mjs";
|
|
4
4
|
import { t as postgresAdapterDescriptorMeta } from "./descriptor-meta-DDh7-s6c-D6qC3SDx.mjs";
|
|
5
5
|
import { assembleDataTypes } from "@prisma/orm-framework/components/codec";
|
|
6
|
-
import { builtinGeneratorIds } from "@prisma/orm-framework/ids";
|
|
7
6
|
import { timestampNowRuntimeGenerator } from "@prisma/orm-family-sql/family/runtime";
|
|
7
|
+
import { builtinGeneratorIds } from "@prisma/orm-framework/ids";
|
|
8
8
|
import { generateId } from "@prisma/orm-framework/ids/runtime";
|
|
9
9
|
//#region ../../../3-targets/6-adapters/postgres/dist/runtime.mjs
|
|
10
10
|
function createPostgresMutationDefaultGenerators() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter__runtime.mjs","names":[],"sources":["../../../../3-targets/6-adapters/postgres/dist/runtime.mjs"],"sourcesContent":["import { n as createPostgresAdapterWithCodecRegistry, r as postgresRawCodecInferer } from \"./adapter-BkfuSVLm.mjs\";\nimport { t as postgresAdapterDescriptorMeta } from \"./descriptor-meta-DDh7-s6c.mjs\";\nimport { assembleDataTypes } from \"@internal/framework-components/codec\";\nimport { assemblePostgresCodecRegistry, postgresCodecRegistry } from \"@internal/target-postgres/codecs\";\nimport {
|
|
1
|
+
{"version":3,"file":"adapter__runtime.mjs","names":[],"sources":["../../../../3-targets/6-adapters/postgres/dist/runtime.mjs"],"sourcesContent":["import { n as createPostgresAdapterWithCodecRegistry, r as postgresRawCodecInferer } from \"./adapter-BkfuSVLm.mjs\";\nimport { t as postgresAdapterDescriptorMeta } from \"./descriptor-meta-DDh7-s6c.mjs\";\nimport { assembleDataTypes } from \"@internal/framework-components/codec\";\nimport { assemblePostgresCodecRegistry, postgresCodecRegistry } from \"@internal/target-postgres/codecs\";\nimport { timestampNowRuntimeGenerator } from \"@internal/family-sql/runtime\";\nimport { builtinGeneratorIds } from \"@internal/ids\";\nimport { generateId } from \"@internal/ids/runtime\";\nimport { postgresNowGenerators } from \"@internal/target-postgres/runtime\";\n//#region src/exports/runtime.ts\nfunction createPostgresMutationDefaultGenerators() {\n\treturn [\n\t\t...builtinGeneratorIds.map((id) => ({\n\t\t\tid,\n\t\t\tgenerate: (params) => {\n\t\t\t\treturn generateId(params ? {\n\t\t\t\t\tid,\n\t\t\t\t\tparams\n\t\t\t\t} : { id });\n\t\t\t},\n\t\t\tstability: \"field\"\n\t\t})),\n\t\ttimestampNowRuntimeGenerator(),\n\t\t...postgresNowGenerators.map(({ id, generate }) => ({\n\t\t\tid,\n\t\t\tgenerate,\n\t\t\tstability: \"query\"\n\t\t}))\n\t];\n}\nconst postgresRuntimeAdapterDescriptor = {\n\t...postgresAdapterDescriptorMeta,\n\tcodecs: () => Array.from(postgresCodecRegistry.values()),\n\tmutationDefaultGenerators: createPostgresMutationDefaultGenerators,\n\trawCodecInferer: postgresRawCodecInferer,\n\tcreate(stack) {\n\t\tconst components = [\n\t\t\tstack.target,\n\t\t\tstack.adapter,\n\t\t\t...stack.extensions\n\t\t];\n\t\tconst dataTypes = assembleDataTypes(components);\n\t\treturn createPostgresAdapterWithCodecRegistry(assemblePostgresCodecRegistry(components, dataTypes.lookup), dataTypes.lookup, dataTypes.declared.map(({ type }) => type));\n\t}\n};\n//#endregion\nexport { postgresRuntimeAdapterDescriptor as default };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;;;;;;;AASA,SAAS,0CAA0C;CAClD,OAAO;EACN,GAAG,oBAAoB,KAAK,QAAQ;GACnC;GACA,WAAW,WAAW;IACrB,OAAO,WAAW,SAAS;KAC1B;KACA;IACD,IAAI,EAAE,GAAG,CAAC;GACX;GACA,WAAW;EACZ,EAAE;EACF,6BAA6B;EAC7B,GAAG,sBAAsB,KAAK,EAAE,IAAI,gBAAgB;GACnD;GACA;GACA,WAAW;EACZ,EAAE;CACH;AACD;AACA,MAAM,mCAAmC;CACxC,GAAG;CACH,cAAc,MAAM,KAAK,sBAAsB,OAAO,CAAC;CACvD,2BAA2B;CAC3B,iBAAiB;CACjB,OAAO,OAAO;EACb,MAAM,aAAa;GAClB,MAAM;GACN,MAAM;GACN,GAAG,MAAM;EACV;EACA,MAAM,YAAY,kBAAkB,UAAU;EAC9C,OAAO,uCAAuC,8BAA8B,YAAY,UAAU,MAAM,GAAG,UAAU,QAAQ,UAAU,SAAS,KAAK,EAAE,WAAW,IAAI,CAAC;CACxK;AACD"}
|
|
@@ -31,7 +31,7 @@ declare const postgresAggregateDescriptors: readonly [{
|
|
|
31
31
|
readonly operation: "sum";
|
|
32
32
|
readonly input: {
|
|
33
33
|
readonly kind: "codec";
|
|
34
|
-
readonly codecId: "pg/int8number@1" | "pg/int4@1" | "pg/int8@1" | "sql/int@1" | "pg/
|
|
34
|
+
readonly codecId: "pg/int8number@1" | "pg/int4@1" | "pg/int8@1" | "sql/int@1" | "pg/int@1" | "pg/int2@1";
|
|
35
35
|
};
|
|
36
36
|
readonly output: {
|
|
37
37
|
readonly kind: "codec";
|
|
@@ -43,7 +43,7 @@ declare const postgresAggregateDescriptors: readonly [{
|
|
|
43
43
|
readonly operation: "sumBigInt";
|
|
44
44
|
readonly input: {
|
|
45
45
|
readonly kind: "codec";
|
|
46
|
-
readonly codecId: "pg/int4@1" | "sql/int@1" | "pg/
|
|
46
|
+
readonly codecId: "pg/int4@1" | "sql/int@1" | "pg/int@1" | "pg/int2@1";
|
|
47
47
|
};
|
|
48
48
|
readonly output: {
|
|
49
49
|
readonly kind: "codec";
|
|
@@ -156,7 +156,7 @@ declare const postgresAggregateDescriptors: readonly [{
|
|
|
156
156
|
readonly operation: "avg";
|
|
157
157
|
readonly input: {
|
|
158
158
|
readonly kind: "codec";
|
|
159
|
-
readonly codecId: "pg/int8number@1" | "pg/unboundedint@1" | "pg/int4@1" | "pg/int8@1" | "sql/int@1" | "pg/
|
|
159
|
+
readonly codecId: "pg/int8number@1" | "pg/unboundedint@1" | "pg/int4@1" | "pg/int8@1" | "sql/int@1" | "pg/int@1" | "pg/int2@1";
|
|
160
160
|
};
|
|
161
161
|
readonly output: {
|
|
162
162
|
readonly kind: "codec";
|
|
@@ -168,7 +168,7 @@ declare const postgresAggregateDescriptors: readonly [{
|
|
|
168
168
|
readonly operation: "avgDecimal";
|
|
169
169
|
readonly input: {
|
|
170
170
|
readonly kind: "codec";
|
|
171
|
-
readonly codecId: "pg/int8number@1" | "pg/unboundedint@1" | "pg/int4@1" | "pg/int8@1" | "pg/numeric@1" | "sql/int@1" | "pg/
|
|
171
|
+
readonly codecId: "pg/int8number@1" | "pg/unboundedint@1" | "pg/int4@1" | "pg/int8@1" | "pg/numeric@1" | "sql/int@1" | "pg/int@1" | "pg/int2@1";
|
|
172
172
|
};
|
|
173
173
|
readonly output: {
|
|
174
174
|
readonly kind: "codec";
|
|
@@ -179,7 +179,7 @@ declare const postgresAggregateDescriptors: readonly [{
|
|
|
179
179
|
readonly operation: "avg";
|
|
180
180
|
readonly input: {
|
|
181
181
|
readonly kind: "codec";
|
|
182
|
-
readonly codecId: "pg/float8@1" | "sql/float@1" | "pg/
|
|
182
|
+
readonly codecId: "pg/float8@1" | "sql/float@1" | "pg/float@1" | "pg/float4@1";
|
|
183
183
|
};
|
|
184
184
|
readonly output: {
|
|
185
185
|
readonly kind: "codec";
|
|
@@ -265,7 +265,7 @@ declare const postgresAggregateDescriptors: readonly [{
|
|
|
265
265
|
readonly operation: "min";
|
|
266
266
|
readonly input: {
|
|
267
267
|
readonly kind: "codec";
|
|
268
|
-
readonly codecId: "pg/enum@1" | "pg/timestamptz-temporal@1" | "pg/timestamptz-date@1" | "pg/date-temporal@1" | "pg/date-string@1" | "pg/time-temporal@1" | "pg/time-string@1" | "pg/timetz@1" | "pg/timestamp-temporal@1" | "pg/timestamp-string@1" | "pg/timestamptz-string@1" | "pg/
|
|
268
|
+
readonly codecId: "pg/enum@1" | "pg/timestamptz-temporal@1" | "pg/timestamptz-date@1" | "pg/date-temporal@1" | "pg/date-string@1" | "pg/time-temporal@1" | "pg/time-string@1" | "pg/timetz@1" | "pg/timestamp-temporal@1" | "pg/timestamp-string@1" | "pg/timestamptz-string@1" | "pg/text-array@1" | "pg/interval@1" | "pg/inet@1";
|
|
269
269
|
};
|
|
270
270
|
readonly output: {
|
|
271
271
|
readonly kind: "self";
|
|
@@ -306,7 +306,7 @@ declare const postgresAggregateDescriptors: readonly [{
|
|
|
306
306
|
readonly operation: "max";
|
|
307
307
|
readonly input: {
|
|
308
308
|
readonly kind: "codec";
|
|
309
|
-
readonly codecId: "pg/enum@1" | "pg/timestamptz-temporal@1" | "pg/timestamptz-date@1" | "pg/date-temporal@1" | "pg/date-string@1" | "pg/time-temporal@1" | "pg/time-string@1" | "pg/timetz@1" | "pg/timestamp-temporal@1" | "pg/timestamp-string@1" | "pg/timestamptz-string@1" | "pg/
|
|
309
|
+
readonly codecId: "pg/enum@1" | "pg/timestamptz-temporal@1" | "pg/timestamptz-date@1" | "pg/date-temporal@1" | "pg/date-string@1" | "pg/time-temporal@1" | "pg/time-string@1" | "pg/timetz@1" | "pg/timestamp-temporal@1" | "pg/timestamp-string@1" | "pg/timestamptz-string@1" | "pg/text-array@1" | "pg/interval@1" | "pg/inet@1";
|
|
310
310
|
};
|
|
311
311
|
readonly output: {
|
|
312
312
|
readonly kind: "self";
|
|
@@ -315,4 +315,4 @@ declare const postgresAggregateDescriptors: readonly [{
|
|
|
315
315
|
})[]];
|
|
316
316
|
//#endregion
|
|
317
317
|
export { postgresAggregateDescriptors as t };
|
|
318
|
-
//# sourceMappingURL=aggregates-
|
|
318
|
+
//# sourceMappingURL=aggregates-B3lIBjGK.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aggregates-
|
|
1
|
+
{"version":3,"file":"aggregates-B3lIBjGK.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/aggregates.d.mts"],"mappings":";;;;;;cAKc;WACH;WACA;aACE;;WAEF;aACE;aACA;;WAEF;WACA;;WAEA;WACA;aACE;;WAEF;aACE;aACA;;WAEF;WACA;WACA,OAAO;;WAEP;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA,OAAO;WACP;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA,OAAO;WACP;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA,OAAO;WACP;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA,OAAO;WACP;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA,OAAO;WACP;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;;WAEF"}
|
|
@@ -16,7 +16,8 @@ import { TIMESTAMP_NOW_GENERATOR_ID, temporalAuthoringPresets, temporalCodecPres
|
|
|
16
16
|
import { blockAttribute, bool, dataTypeValue, entityRef, fieldRef, identifier, leafDiagnostic, list, mapBlock, modelAttribute, oneOf, optional, str, structBlock } from "@prisma/orm-framework/psl-parser";
|
|
17
17
|
import { exactNameBodyWarning } from "@prisma/orm-family-sql/contract/index-naming";
|
|
18
18
|
import { SQL_EXPRESSION_DATA_TYPE_ID, requireSqlExpression, sqlTextFromStored } from "@prisma/orm-family-sql/contract/sql-expression";
|
|
19
|
-
|
|
19
|
+
import { singleGeneratorBinding } from "@prisma/orm-framework/components/components";
|
|
20
|
+
//#region ../../../3-targets/3-targets/postgres/dist/authoring-DtjMn8TZ.mjs
|
|
20
21
|
/**
|
|
21
22
|
* The Postgres "now" generators, one per date and time codec except `pg/timestamptz-date@1`, which uses the framework's `timestampNow`. All read the clock through `Date.now()` and write UTC. The time generators round down to their `precision` param. The string generators are named after the codec they serve and write the text PostgreSQL prints in a UTC session, with milliseconds and no trailing zeros in the fraction.
|
|
22
23
|
*/
|
|
@@ -128,19 +129,7 @@ const postgresNowGenerators = [
|
|
|
128
129
|
}
|
|
129
130
|
];
|
|
130
131
|
function postgresNowGeneratorControlDescriptors() {
|
|
131
|
-
return postgresNowGenerators.map(({ id }) => ({
|
|
132
|
-
id,
|
|
133
|
-
buildPhases: () => ({
|
|
134
|
-
onCreate: {
|
|
135
|
-
kind: "generator",
|
|
136
|
-
id
|
|
137
|
-
},
|
|
138
|
-
onUpdate: {
|
|
139
|
-
kind: "generator",
|
|
140
|
-
id
|
|
141
|
-
}
|
|
142
|
-
})
|
|
143
|
-
}));
|
|
132
|
+
return postgresNowGenerators.map(({ id }) => ({ id }));
|
|
144
133
|
}
|
|
145
134
|
/** The "now" generator for each codec that has one. The `temporal` field presets read it. */
|
|
146
135
|
const postgresNowGeneratorIds = {
|
|
@@ -155,30 +144,25 @@ const postgresNowGeneratorIds = {
|
|
|
155
144
|
[PG_TIMESTAMPTZ_STRING_CODEC_ID]: TIMESTAMPTZ_STRING_NOW_GENERATOR_ID,
|
|
156
145
|
[PG_TIMESTAMPTZ_DATE_CODEC_ID]: TIMESTAMP_NOW_GENERATOR_ID
|
|
157
146
|
};
|
|
158
|
-
|
|
159
|
-
function postgresNowGeneratorIdFor(codecId) {
|
|
160
|
-
return nowGeneratorIdByCodecId.get(codecId);
|
|
161
|
-
}
|
|
147
|
+
new Map(Object.entries(postgresNowGeneratorIds));
|
|
162
148
|
/** The codecs whose "now" generator takes the column's precision, so that it rounds down where PostgreSQL would round a time up to `24:00:00`. */
|
|
163
149
|
const postgresNowGeneratorTakesPrecision = {
|
|
164
150
|
[PG_TIME_TEMPORAL_CODEC_ID]: true,
|
|
165
151
|
[PG_TIME_STRING_CODEC_ID]: true,
|
|
166
152
|
[PG_TIMETZ_CODEC_ID]: true
|
|
167
153
|
};
|
|
168
|
-
/** The
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
};
|
|
181
|
-
}
|
|
154
|
+
/** The `now` generator function bound to each Postgres date and time codec, with the column's precision on the three time codecs. */
|
|
155
|
+
const postgresNowGeneratorFunction = {
|
|
156
|
+
name: "now",
|
|
157
|
+
bindings: Object.entries(postgresNowGeneratorIds).map(([codecId, generatorId]) => singleGeneratorBinding({
|
|
158
|
+
codecIds: [codecId],
|
|
159
|
+
generatorId,
|
|
160
|
+
paramsFromField: (column) => {
|
|
161
|
+
const precision = column.typeParams?.["precision"];
|
|
162
|
+
return Object.hasOwn(postgresNowGeneratorTakesPrecision, codecId) && typeof precision === "number" ? { precision } : void 0;
|
|
163
|
+
}
|
|
164
|
+
}))
|
|
165
|
+
};
|
|
182
166
|
const PSL_POLICY_INVALID_MAP = "PSL_POLICY_INVALID_MAP";
|
|
183
167
|
const PSL_FULL_TEXT_INDEX_TOO_MANY_GROUPS = "PSL_FULL_TEXT_INDEX_TOO_MANY_GROUPS";
|
|
184
168
|
const PSL_FULL_TEXT_INDEX_EMPTY_GROUP = "PSL_FULL_TEXT_INDEX_EMPTY_GROUP";
|
|
@@ -958,6 +942,6 @@ function postgresLowerEntityHandles(input) {
|
|
|
958
942
|
return rows;
|
|
959
943
|
}
|
|
960
944
|
//#endregion
|
|
961
|
-
export { postgresAuthoringPslBlockDescriptors as a, postgresNowGeneratorControlDescriptors as c, postgresAuthoringModelAttributes as i,
|
|
945
|
+
export { postgresAuthoringPslBlockDescriptors as a, postgresNowGeneratorControlDescriptors as c, postgresAuthoringModelAttributes as i, postgresNowGeneratorFunction as l, postgresAuthoringEntityTypes as n, postgresAuthoringTypes as o, postgresAuthoringFieldPresets as r, postgresLowerEntityHandles as s, POLICY_BLOCK_KEYWORDS as t, postgresNowGenerators as u };
|
|
962
946
|
|
|
963
|
-
//# sourceMappingURL=authoring-
|
|
947
|
+
//# sourceMappingURL=authoring-DtjMn8TZ-sv84Cdw_.mjs.map
|