@prisma/orm-family-sql 8.0.0-rc.21-dev.6 → 8.0.0-rc.21-dev.8

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.
Files changed (112) hide show
  1. package/dist/{attribute-specs-CM_fC-TC.d.mts → attribute-specs-DDpSUaG9.d.mts} +3 -3
  2. package/dist/{attribute-specs-CM_fC-TC.d.mts.map → attribute-specs-DDpSUaG9.d.mts.map} +1 -1
  3. package/dist/{authoring-entity-types-CgKIgWq5--Hjkn72Y.d.mts → authoring-entity-types-CgKIgWq5-BqRjoPFF.d.mts} +2 -2
  4. package/dist/{authoring-entity-types-CgKIgWq5--Hjkn72Y.d.mts.map → authoring-entity-types-CgKIgWq5-BqRjoPFF.d.mts.map} +1 -1
  5. package/dist/{config-types-BvmmK8D-.mjs → config-types-BCXwEBZH.mjs} +2 -2
  6. package/dist/{config-types-BvmmK8D-.mjs.map → config-types-BCXwEBZH.mjs.map} +1 -1
  7. package/dist/{contract-builder-Bk-Co792.mjs → contract-builder-D50r41BU.mjs} +112 -47
  8. package/dist/contract-builder-D50r41BU.mjs.map +1 -0
  9. package/dist/{contract-builder-B8oDZ4aU.d.mts → contract-builder-D6JuOGA6.d.mts} +43 -4
  10. package/dist/{contract-builder-B8oDZ4aU.d.mts.map → contract-builder-D6JuOGA6.d.mts.map} +1 -1
  11. package/dist/contract-prisma7__provider.d.mts +3 -1
  12. package/dist/contract-prisma7__provider.d.mts.map +1 -1
  13. package/dist/contract-prisma7__provider.mjs +60 -24
  14. package/dist/contract-prisma7__provider.mjs.map +1 -1
  15. package/dist/contract-psl.d.mts +1 -1
  16. package/dist/contract-psl.mjs +1 -1
  17. package/dist/contract-psl__attribute-specs.d.mts +1 -1
  18. package/dist/contract-psl__attribute-specs.mjs +1 -1
  19. package/dist/contract-psl__diagnostics.mjs +1 -1
  20. package/dist/contract-psl__provider.mjs +2 -2
  21. package/dist/contract-psl__provider.mjs.map +1 -1
  22. package/dist/contract-ts.d.mts +1 -1
  23. package/dist/contract-ts.mjs +3 -3
  24. package/dist/contract-ts__config-types.mjs +1 -1
  25. package/dist/contract-ts__contract-builder.d.mts +1 -1
  26. package/dist/contract-ts__contract-builder.mjs +2 -2
  27. package/dist/contract.d.mts +2 -2
  28. package/dist/contract.mjs +3 -3
  29. package/dist/contract__data-type.d.mts +2 -2
  30. package/dist/contract__data-type.mjs +2 -2
  31. package/dist/contract__validators.mjs +1 -1
  32. package/dist/{control-B2CeDfVO.d.mts → control-BE7gXqZF.d.mts} +3 -3
  33. package/dist/{control-B2CeDfVO.d.mts.map → control-BE7gXqZF.d.mts.map} +1 -1
  34. package/dist/{control-C1EjGUVq.mjs → control-DPCrkpMS.mjs} +10 -11
  35. package/dist/control-DPCrkpMS.mjs.map +1 -0
  36. package/dist/{control-adapter-SlQkTEwT.mjs → control-adapter-BetaUm2y.mjs} +2 -2
  37. package/dist/{control-adapter-SlQkTEwT.mjs.map → control-adapter-BetaUm2y.mjs.map} +1 -1
  38. package/dist/{data-type-CR0gi2GQ.d.mts → data-type-B-Do6RMA.d.mts} +13 -5
  39. package/dist/data-type-B-Do6RMA.d.mts.map +1 -0
  40. package/dist/{data-type-BFSpaotu.mjs → data-type-BfA5F0Qf.mjs} +2 -2
  41. package/dist/{data-type-BFSpaotu.mjs.map → data-type-BfA5F0Qf.mjs.map} +1 -1
  42. package/dist/{default-mapping-CAOONlKQ-CIg7JCfF.d.mts → default-mapping-CEISdj2g-B50Ag_F_.d.mts} +5 -11
  43. package/dist/default-mapping-CEISdj2g-B50Ag_F_.d.mts.map +1 -0
  44. package/dist/{derived-checks-BuTkSE9l-gyx0d0dX.mjs → derived-checks-D__agoFB-Boa1MHcA.mjs} +4 -4
  45. package/dist/{derived-checks-BuTkSE9l-gyx0d0dX.mjs.map → derived-checks-D__agoFB-Boa1MHcA.mjs.map} +1 -1
  46. package/dist/{diagnostics-C7jR1Jyf.mjs → diagnostics-CoM0OFuR.mjs} +40 -30
  47. package/dist/diagnostics-CoM0OFuR.mjs.map +1 -0
  48. package/dist/{exports-CGzFaakG-4Aw50nT1.mjs → exports-CpIULsPV-Cur2Y5Dx.mjs} +8 -3
  49. package/dist/exports-CpIULsPV-Cur2Y5Dx.mjs.map +1 -0
  50. package/dist/family.d.mts +7 -7
  51. package/dist/family.mjs +9 -9
  52. package/dist/family__control-adapter.mjs +1 -1
  53. package/dist/family__control.d.mts +1 -1
  54. package/dist/family__control.mjs +3 -3
  55. package/dist/family__diff.mjs +1 -1
  56. package/dist/family__ir.mjs +1 -1
  57. package/dist/family__pack.d.mts +1 -1
  58. package/dist/family__pack.mjs +2 -2
  59. package/dist/family__psl-build.d.mts +3 -3
  60. package/dist/family__psl-build.mjs +2 -2
  61. package/dist/family__psl-infer.d.mts +1 -1
  62. package/dist/family__runtime.d.mts +1 -1
  63. package/dist/family__runtime.mjs +1 -1
  64. package/dist/{generator-functions-Hy4pDDr9-BUHOsofo.mjs → generator-functions-Hy4pDDr9-CMfJOBtv.mjs} +2 -2
  65. package/dist/{generator-functions-Hy4pDDr9-BUHOsofo.mjs.map → generator-functions-Hy4pDDr9-CMfJOBtv.mjs.map} +1 -1
  66. package/dist/{index-BAI1gH-I.d.mts → index-hLidCcl6.d.mts} +14 -15
  67. package/dist/index-hLidCcl6.d.mts.map +1 -0
  68. package/dist/{interpreter-CrQFtK4p-CM5k_t4g.mjs → interpreter-ChvVEijY-FeJngsog.mjs} +16 -6
  69. package/dist/interpreter-ChvVEijY-FeJngsog.mjs.map +1 -0
  70. package/dist/orm-client.d.mts +1 -1
  71. package/dist/orm-client.mjs +1 -1
  72. package/dist/{pack-BPbz6RVm.d.mts → pack-DKM1hv1E.d.mts} +3 -3
  73. package/dist/{pack-BPbz6RVm.d.mts.map → pack-DKM1hv1E.d.mts.map} +1 -1
  74. package/dist/psl-build-BA0Ndi1v.mjs +268 -0
  75. package/dist/psl-build-BA0Ndi1v.mjs.map +1 -0
  76. package/dist/{psl-build-CNncjpsa.d.mts → psl-build-DCZaF5g4.d.mts} +44 -15
  77. package/dist/psl-build-DCZaF5g4.d.mts.map +1 -0
  78. package/dist/{psl-column-resolution-djGEITmJ-DfEOkjPf.d.mts → psl-column-resolution-djGEITmJ-C0LSpwl4.d.mts} +2 -2
  79. package/dist/{psl-column-resolution-djGEITmJ-DfEOkjPf.d.mts.map → psl-column-resolution-djGEITmJ-C0LSpwl4.d.mts.map} +1 -1
  80. package/dist/{psl-field-resolution-Bvhx79fP-CuyYFk8z.mjs → psl-field-resolution-BW2_FOb9-DxqR43fo.mjs} +67 -37
  81. package/dist/psl-field-resolution-BW2_FOb9-DxqR43fo.mjs.map +1 -0
  82. package/dist/{psl-infer-BkkoyXmM.d.mts → psl-infer-Cr9AeccU.d.mts} +2 -2
  83. package/dist/{psl-infer-BkkoyXmM.d.mts.map → psl-infer-Cr9AeccU.d.mts.map} +1 -1
  84. package/dist/{runtime-BrBva2ta.d.mts → runtime-CSDcwOEG.d.mts} +4 -3
  85. package/dist/{runtime-BrBva2ta.d.mts.map → runtime-CSDcwOEG.d.mts.map} +1 -1
  86. package/dist/{runtime-CCzfa1mY.mjs → runtime-DkUiQi00.mjs} +12 -4
  87. package/dist/runtime-DkUiQi00.mjs.map +1 -0
  88. package/dist/runtime.d.mts +1 -1
  89. package/dist/runtime.mjs +1 -1
  90. package/dist/{schema-verify-C3wbdviw-mlPO4NkT.mjs → schema-verify-C3wbdviw-nQ4tG9N7.mjs} +2 -2
  91. package/dist/{schema-verify-C3wbdviw-mlPO4NkT.mjs.map → schema-verify-C3wbdviw-nQ4tG9N7.mjs.map} +1 -1
  92. package/dist/{sql-contract-serializer-sMY3prTx-aQd4v3fE.mjs → sql-contract-serializer-sMY3prTx-CBHrlt9O.mjs} +2 -2
  93. package/dist/{sql-contract-serializer-sMY3prTx-aQd4v3fE.mjs.map → sql-contract-serializer-sMY3prTx-CBHrlt9O.mjs.map} +1 -1
  94. package/dist/{sql-data-type-D7M-YTTY-D2vRqDxn.mjs → sql-data-type-LVBldu1a-Bq203xWX.mjs} +13 -7
  95. package/dist/sql-data-type-LVBldu1a-Bq203xWX.mjs.map +1 -0
  96. package/dist/{validators-CnQqLEIi.mjs → validators-qcQteqs2.mjs} +2 -2
  97. package/dist/{validators-CnQqLEIi.mjs.map → validators-qcQteqs2.mjs.map} +1 -1
  98. package/package.json +18 -18
  99. package/dist/contract-builder-Bk-Co792.mjs.map +0 -1
  100. package/dist/control-C1EjGUVq.mjs.map +0 -1
  101. package/dist/data-type-CR0gi2GQ.d.mts.map +0 -1
  102. package/dist/default-mapping-CAOONlKQ-CIg7JCfF.d.mts.map +0 -1
  103. package/dist/diagnostics-C7jR1Jyf.mjs.map +0 -1
  104. package/dist/exports-CGzFaakG-4Aw50nT1.mjs.map +0 -1
  105. package/dist/index-BAI1gH-I.d.mts.map +0 -1
  106. package/dist/interpreter-CrQFtK4p-CM5k_t4g.mjs.map +0 -1
  107. package/dist/psl-build-CNncjpsa.d.mts.map +0 -1
  108. package/dist/psl-build-DqqYhOsa.mjs +0 -426
  109. package/dist/psl-build-DqqYhOsa.mjs.map +0 -1
  110. package/dist/psl-field-resolution-Bvhx79fP-CuyYFk8z.mjs.map +0 -1
  111. package/dist/runtime-CCzfa1mY.mjs.map +0 -1
  112. package/dist/sql-data-type-D7M-YTTY-D2vRqDxn.mjs.map +0 -1
@@ -24,6 +24,8 @@ interface SqlDataTypeSpec<Params extends SqlTypeParams = SqlTypeParams> extends
24
24
  /** The id of the type a column of this type is stored as, with the same parameters. A type stored as another declares no texts. */
25
25
  readonly storedAs?: DataTypeId;
26
26
  readonly normalize?: (params: Params) => Params;
27
+ /** The parameters the database catalog prints for parameters as written, when they are not their normal form: PostgreSQL prints no precision for a bare `timestamptz`, though its normal form has precision 6. */
28
+ readonly catalogParams?: (params: Params) => Params;
27
29
  /** The type's name from its parameters, for a type that claims a kind or whose name is its catalog text. */
28
30
  readonly render?: (params: Params) => string;
29
31
  readonly fromReported?: (reported: ReportedSqlType) => Params;
@@ -40,6 +42,8 @@ interface SqlDataTypeFacts<Params extends SqlTypeParams = SqlTypeParams> {
40
42
  readonly storedAs: DataTypeId | undefined;
41
43
  /** The normal form of `params`; parameters the type's schema refuses are returned as written. */
42
44
  readonly normalize: (params: Params) => Params;
45
+ /** The parameters the catalog prints for `params` as written: the declared {@link SqlDataTypeSpec.catalogParams}, or else the normal form. */
46
+ readonly catalogParams: (params: Params) => Params;
43
47
  readonly render: ((params: Params) => string) | undefined;
44
48
  readonly fromReported: ((reported: ReportedSqlType) => Params) | undefined;
45
49
  readonly nameIsCatalogText: boolean;
@@ -53,6 +57,10 @@ interface ResolvedSqlType {
53
57
  readonly dataType: SqlDataType;
54
58
  readonly typeParams: SqlTypeParams;
55
59
  }
60
+ /** A type a migration writes, read as {@link ResolvedSqlType}, with its parameters also as the text writes them, before the normal form. */
61
+ interface ResolvedWrittenSqlType extends ResolvedSqlType {
62
+ readonly writtenTypeParams: SqlTypeParams;
63
+ }
56
64
  /** Declare a SQL data type, refusing a declaration that breaks a rule of the module. */
57
65
  declare function sqlDataType<Params extends SqlTypeParams = SqlTypeParams>(id: string, spec: SqlDataTypeSpec<Params>): SqlDataType<Params>;
58
66
  /** Whether the name of `type` is the text the database catalog prints, as declared by {@link SqlDataTypeSpec.nameIsCatalogText}. */
@@ -105,7 +113,7 @@ declare function sqlStorageTypeOfCodec(codecId: string, lookups: TypeLookups): S
105
113
  declare function unquotedSqlBaseNameOfCodec(codecId: string, typeParams: SqlTypeParams | undefined, lookups: TypeLookups): string;
106
114
  /** The text a migration writes for `type` with the raw `params`. */
107
115
  declare function renderSqlTypeName<Params extends SqlTypeParams>(type: SqlDataType<Params>, params: SqlTypeParams): string;
108
- /** The text the database catalog prints for `type` with `params`, in their normal form. */
116
+ /** The text the database catalog prints for `type` with `params` as written, from the parameters its catalog prints for them ({@link SqlDataTypeFacts.catalogParams}). */
109
117
  declare function renderSqlCatalogText<Params extends SqlTypeParams>(type: SqlDataType<Params>, params: SqlTypeParams): string;
110
118
  /** Two SQL data types that would both recognise one reported type, and what each claims. */
111
119
  interface SqlDataTypeCollision {
@@ -133,11 +141,11 @@ declare function findSqlDataTypeCollision(types: readonly DataType[]): SqlDataTy
133
141
  declare function resolveReportedSqlType(reported: ReportedSqlType, dataTypes: readonly DataType[]): ResolvedSqlType | undefined;
134
142
  /**
135
143
  * Every data type in `dataTypes` that reads `text` as a migration may write it, with its parameters
136
- * in normal form: any of a type's texts counts, whether written, printed by the catalog or only
144
+ * in normal form and as written: any of a type's texts counts, whether written, printed by the catalog or only
137
145
  * claimed. Empty when no type reads it or its parameters fail the type's schema. A type that claims
138
146
  * a kind has no texts, so it never reads one.
139
147
  */
140
- declare function resolveWrittenSqlTypes(text: string, dataTypes: readonly DataType[]): readonly ResolvedSqlType[];
148
+ declare function resolveWrittenSqlTypes(text: string, dataTypes: readonly DataType[]): readonly ResolvedWrittenSqlType[];
141
149
  //#endregion
142
150
  //#region src/sql-raw.d.ts
143
151
  declare const SQL_RAW_DATA_TYPE_ID: DataTypeId;
@@ -154,5 +162,5 @@ declare function checkRawTypeText(text: string): string | undefined;
154
162
  */
155
163
  declare const sqlRawDataType: SqlDataType<SqlRawTypeParams>;
156
164
  //#endregion
157
- export { unquotedSqlBaseNameOfCodec as A, sqlDataType as C, sqlStorageTypeId as D, sqlStorageType as E, sqlStorageTypeOfCodec as O, sqlColumnLength as S, sqlRawDataType as T, resolveReportedSqlType as _, SqlDataTypeCollision as a, sqlBaseName as b, SqlRawTypeParams as c, checkRawTypeText as d, findSqlDataTypeCollision as f, renderSqlTypeName as g, renderSqlCatalogText as h, SqlDataType as i, validateSqlTypeParams as j, unquotedSqlBaseName as k, SqlTypeParams as l, nameIsCatalogText as m, SQL_RAW_DATA_TYPE_ID as n, SqlDataTypeFacts as o, isSqlDataType as p, SqlColumnTypeFields as r, SqlDataTypeSpec as s, ResolvedSqlType as t, SqlTypeText as u, resolveWrittenSqlTypes as v, sqlDataTypeOfCodec as w, sqlCodecColumnLength as x, sameSqlColumnType as y };
158
- //# sourceMappingURL=data-type-CR0gi2GQ.d.mts.map
165
+ export { unquotedSqlBaseName as A, sqlColumnLength as C, sqlStorageType as D, sqlRawDataType as E, validateSqlTypeParams as M, sqlStorageTypeId as O, sqlCodecColumnLength as S, sqlDataTypeOfCodec as T, renderSqlTypeName as _, SqlDataType as a, sameSqlColumnType as b, SqlDataTypeSpec as c, SqlTypeText as d, checkRawTypeText as f, renderSqlCatalogText as g, nameIsCatalogText as h, SqlColumnTypeFields as i, unquotedSqlBaseNameOfCodec as j, sqlStorageTypeOfCodec as k, SqlRawTypeParams as l, isSqlDataType as m, ResolvedWrittenSqlType as n, SqlDataTypeCollision as o, findSqlDataTypeCollision as p, SQL_RAW_DATA_TYPE_ID as r, SqlDataTypeFacts as s, ResolvedSqlType as t, SqlTypeParams as u, resolveReportedSqlType as v, sqlDataType as w, sqlBaseName as x, resolveWrittenSqlTypes as y };
166
+ //# sourceMappingURL=data-type-B-Do6RMA.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-type-B-Do6RMA.d.mts","names":[],"sources":["../../../../2-sql-family/1-core/contract/dist/data-type.d.mts"],"mappings":";;;;;;;UAKU;;WAEC;;WAEA;;WAEA;;WAEA;;KAEN,gBAAgB,SAAS;UACpB,gBAAgB,eAAe,gBAAgB,uBAAuB,KAAK;WAC1E,SAAS,KAAK;WACd,iBAAiB;;WAEjB;;WAEA,WAAW;WACX,aAAa,QAAQ,WAAW;;WAEhC,iBAAiB,QAAQ,WAAW;;WAEpC,UAAU,QAAQ;WAClB,gBAAgB,UAAU,oBAAoB;;;;;;WAM9C;;UAED,iBAAiB,eAAe,gBAAgB;WAC/C,gBAAgB;WAChB;WACA,UAAU;;WAEV,YAAY,QAAQ,WAAW;;WAE/B,gBAAgB,QAAQ,WAAW;WACnC,UAAU,QAAQ;WAClB,gBAAgB,UAAU,oBAAoB;WAC9C;;UAED,YAAY,eAAe,gBAAgB,uBAAuB;WACjE,SAAS,KAAK;WACd,KAAK,iBAAiB;;;UAGvB;WACC,UAAU;WACV,YAAY;;;UAGb,+BAA+B;WAC9B,mBAAmB;;;iBAGb,YAAY,eAAe,gBAAgB,eAAe,YAAY,MAAM,gBAAgB,UAAU,YAAY;;iBAElH,kBAAkB,eAAe,eAAe,MAAM,YAAY;;iBAElE,cAAc,MAAM,WAAW,QAAQ;;iBAEvC,sBAAsB,eAAe,eAAe,MAAM,YAAY,SAAS,QAAQ,gBAAgB;;;;;;iBAMvG,YAAY,eAAe,eAAe,MAAM,YAAY,SAAS,QAAQ;;;;;;;iBAO7E,oBAAoB,eAAe,eAAe,MAAM,YAAY,SAAS,QAAQ;;iBAErF,mBAAmB,iBAAiB,SAAS,cAAc;;;;iBAI3D,gBAAgB,MAAM,sBAAsB,YAAY,SAAS;;iBAEjE,qBAAqB;WAC3B,QAAQ,KAAK;WACb,kBAAkB,oBAAoB;GAC9C,iBAAiB,YAAY,SAAS;;iBAExB,eAAe,MAAM,aAAa,QAAQ,KAAK,yBAAyB;;iBAExE,iBAAiB,oBAAoB,QAAQ,KAAK;;UAEzD;WACC;WACA,aAAa,SAAS;WACtB;;;;;iBAKM,kBAAkB,GAAG,qBAAqB,GAAG,qBAAqB,QAAQ,KAAK;;iBAE/E,sBAAsB,iBAAiB,SAAS,cAAc;;iBAE9D,2BAA2B,iBAAiB,YAAY,2BAA2B,SAAS;;iBAE5F,kBAAkB,eAAe,eAAe,MAAM,YAAY,SAAS,QAAQ;;iBAEnF,qBAAqB,eAAe,eAAe,MAAM,YAAY,SAAS,QAAQ;;UAE7F;WACC,OAAO;WACP,QAAQ;WACR;aACE;aACA;aACA;;aAEA;aACA;;;;;;;;iBAQI,yBAAyB,gBAAgB,aAAa;;;;;iBAKtD,uBAAuB,UAAU,iBAAiB,oBAAoB,aAAa;;;;;;;iBAOnF,uBAAuB,cAAc,oBAAoB,sBAAsB;;;cAGlF,sBAAsB;KAC/B;WACM;;;iBAGM,iBAAiB;;;;;;;cAOpB,gBAAgB,YAAY"}
@@ -1,4 +1,4 @@
1
- import { f as sqlDataType } from "./sql-data-type-D7M-YTTY-D2vRqDxn.mjs";
1
+ import { f as sqlDataType } from "./sql-data-type-LVBldu1a-Bq203xWX.mjs";
2
2
  import { structuredError } from "@prisma/orm-framework/utils/structured-error";
3
3
  import { dataTypeId } from "@prisma/orm-framework/components/codec";
4
4
  import { type } from "arktype";
@@ -49,4 +49,4 @@ const sqlRawDataType = sqlDataType(SQL_RAW_DATA_TYPE_ID, {
49
49
  //#endregion
50
50
  export { checkRawTypeText as n, sqlRawDataType as r, SQL_RAW_DATA_TYPE_ID as t };
51
51
 
52
- //# sourceMappingURL=data-type-BFSpaotu.mjs.map
52
+ //# sourceMappingURL=data-type-BfA5F0Qf.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"data-type-BFSpaotu.mjs","names":[],"sources":["../../../../2-sql-family/1-core/contract/dist/data-type.mjs"],"sourcesContent":["import { _ as unquotedSqlBaseName, a as renderSqlTypeName, c as sameSqlColumnType, d as sqlColumnLength, f as sqlDataType, g as sqlStorageTypeOfCodec, h as sqlStorageTypeId, i as renderSqlCatalogText, l as sqlBaseName, m as sqlStorageType, n as isSqlDataType, o as resolveReportedSqlType, p as sqlDataTypeOfCodec, r as nameIsCatalogText, s as resolveWrittenSqlTypes, t as findSqlDataTypeCollision, u as sqlCodecColumnLength, v as unquotedSqlBaseNameOfCodec, y as validateSqlTypeParams } from \"./sql-data-type-D7M-YTTY.mjs\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { dataTypeId } from \"@internal/framework-components/codec\";\nimport { type } from \"arktype\";\n//#region src/sql-raw.ts\nconst SQL_RAW_DATA_TYPE_ID = dataTypeId(\"sql/raw\");\nconst NAME = `(?:[A-Za-z0-9_]+|\"(?:[^\"]|\"\")+\")`;\nconst TOKEN = `${NAME}(?:\\\\((?:[A-Za-z0-9_, ]|-(?=[0-9]))*\\\\))?`;\n/**\n* The texts a raw type may be: words and double-quoted names, with each double quote inside doubled, separated by single spaces, the first\n* optionally after one schema name and a dot, each optionally followed by parentheses holding only\n* letters, digits, underscores, commas, spaces and a minus sign before a digit, then at most one\n* `[]`. Postgres prints a schema only for a type off the `search_path` that is not a base type.\n*/\nconst RAW_TYPE_TEXT = new RegExp(`^(?:${NAME}\\\\.)?${TOKEN}(?: ${TOKEN})*(?:\\\\[\\\\])?$`);\n/** Returns undefined when `text` may be written as a column's type, else the reason. */\nfunction checkRawTypeText(text) {\n\treturn RAW_TYPE_TEXT.test(text) ? void 0 : \"A raw type is one type name as the database catalog prints it, such as tsvector, double precision, geometry(Point,4326), app.email or \\\"MyType\\\"[]: words of letters, digits and underscores separated by single spaces, or double-quoted names with each double quote inside doubled; the first optionally after one schema name and a dot; each optionally followed by parentheses holding only letters, digits, underscores, commas, spaces and a minus sign before a digit; and at most one trailing [].\";\n}\nconst sqlRawParams = type({ sql: \"string\" }).narrow((params, ctx) => {\n\tconst refused = checkRawTypeText(params.sql);\n\treturn refused === void 0 || ctx.reject({\n\t\tpath: [\"sql\"],\n\t\tmessage: refused\n\t});\n});\n/**\n* The refusal of a literal value of a raw column, which has none: Prisma does not interpret a raw\n* column's values. Every literal reaches it through the data type's reader.\n*/\nfunction refuseLiteralValue() {\n\tthrow structuredError(\"CONTRACT.LITERAL_VALUES_ABSENT\", \"A raw column has no literal values, so its default cannot be a literal. Write the default as a SQL expression: sql`...`.\", {\n\t\twhy: \"Prisma does not interpret the values of a raw column, so it cannot write or compare a literal of its type.\",\n\t\tfix: \"Write the default as a sql expression, such as @default(sql`...`) in a schema or .default(sql`...`) in TypeScript.\"\n\t});\n}\n/**\n* The data type of a column whose type no other data type claims. Its `sql` parameter is the type\n* exactly as the database catalog prints it, which migrations write and verify compares. It claims\n* no reported type, so introspection never reads a column as raw. It has no literal values: it\n* declares no casts, and its reader refuses every value. ADR 273.\n*/\nconst sqlRawDataType = sqlDataType(SQL_RAW_DATA_TYPE_ID, {\n\tparams: sqlRawParams,\n\tnameIsCatalogText: true,\n\trender: ({ sql }) => sql,\n\tread: refuseLiteralValue\n});\n//#endregion\nexport { SQL_RAW_DATA_TYPE_ID, checkRawTypeText, findSqlDataTypeCollision, isSqlDataType, nameIsCatalogText, renderSqlCatalogText, renderSqlTypeName, resolveReportedSqlType, resolveWrittenSqlTypes, sameSqlColumnType, sqlBaseName, sqlCodecColumnLength, sqlColumnLength, sqlDataType, sqlDataTypeOfCodec, sqlRawDataType, sqlStorageType, sqlStorageTypeId, sqlStorageTypeOfCodec, unquotedSqlBaseName, unquotedSqlBaseNameOfCodec, validateSqlTypeParams };\n\n//# sourceMappingURL=data-type.mjs.map"],"mappings":";;;;;AAKA,MAAM,uBAAuB,WAAW,SAAS;AACjD,MAAM,OAAO;AACb,MAAM,QAAQ,GAAG,KAAK;;;;;;;AAOtB,MAAM,gBAAgB,IAAI,OAAO,OAAO,KAAK,OAAO,MAAM,MAAM,MAAM,eAAe;;AAErF,SAAS,iBAAiB,MAAM;CAC/B,OAAO,cAAc,KAAK,IAAI,IAAI,KAAK,IAAI;AAC5C;AACA,MAAM,eAAe,KAAK,EAAE,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,QAAQ,QAAQ;CACpE,MAAM,UAAU,iBAAiB,OAAO,GAAG;CAC3C,OAAO,YAAY,KAAK,KAAK,IAAI,OAAO;EACvC,MAAM,CAAC,KAAK;EACZ,SAAS;CACV,CAAC;AACF,CAAC;;;;;AAKD,SAAS,qBAAqB;CAC7B,MAAM,gBAAgB,kCAAkC,4HAA4H;EACnL,KAAK;EACL,KAAK;CACN,CAAC;AACF;;;;;;;AAOA,MAAM,iBAAiB,YAAY,sBAAsB;CACxD,QAAQ;CACR,mBAAmB;CACnB,SAAS,EAAE,UAAU;CACrB,MAAM;AACP,CAAC"}
1
+ {"version":3,"file":"data-type-BfA5F0Qf.mjs","names":[],"sources":["../../../../2-sql-family/1-core/contract/dist/data-type.mjs"],"sourcesContent":["import { _ as unquotedSqlBaseName, a as renderSqlTypeName, c as sameSqlColumnType, d as sqlColumnLength, f as sqlDataType, g as sqlStorageTypeOfCodec, h as sqlStorageTypeId, i as renderSqlCatalogText, l as sqlBaseName, m as sqlStorageType, n as isSqlDataType, o as resolveReportedSqlType, p as sqlDataTypeOfCodec, r as nameIsCatalogText, s as resolveWrittenSqlTypes, t as findSqlDataTypeCollision, u as sqlCodecColumnLength, v as unquotedSqlBaseNameOfCodec, y as validateSqlTypeParams } from \"./sql-data-type-LVBldu1a.mjs\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { dataTypeId } from \"@internal/framework-components/codec\";\nimport { type } from \"arktype\";\n//#region src/sql-raw.ts\nconst SQL_RAW_DATA_TYPE_ID = dataTypeId(\"sql/raw\");\nconst NAME = `(?:[A-Za-z0-9_]+|\"(?:[^\"]|\"\")+\")`;\nconst TOKEN = `${NAME}(?:\\\\((?:[A-Za-z0-9_, ]|-(?=[0-9]))*\\\\))?`;\n/**\n* The texts a raw type may be: words and double-quoted names, with each double quote inside doubled, separated by single spaces, the first\n* optionally after one schema name and a dot, each optionally followed by parentheses holding only\n* letters, digits, underscores, commas, spaces and a minus sign before a digit, then at most one\n* `[]`. Postgres prints a schema only for a type off the `search_path` that is not a base type.\n*/\nconst RAW_TYPE_TEXT = new RegExp(`^(?:${NAME}\\\\.)?${TOKEN}(?: ${TOKEN})*(?:\\\\[\\\\])?$`);\n/** Returns undefined when `text` may be written as a column's type, else the reason. */\nfunction checkRawTypeText(text) {\n\treturn RAW_TYPE_TEXT.test(text) ? void 0 : \"A raw type is one type name as the database catalog prints it, such as tsvector, double precision, geometry(Point,4326), app.email or \\\"MyType\\\"[]: words of letters, digits and underscores separated by single spaces, or double-quoted names with each double quote inside doubled; the first optionally after one schema name and a dot; each optionally followed by parentheses holding only letters, digits, underscores, commas, spaces and a minus sign before a digit; and at most one trailing [].\";\n}\nconst sqlRawParams = type({ sql: \"string\" }).narrow((params, ctx) => {\n\tconst refused = checkRawTypeText(params.sql);\n\treturn refused === void 0 || ctx.reject({\n\t\tpath: [\"sql\"],\n\t\tmessage: refused\n\t});\n});\n/**\n* The refusal of a literal value of a raw column, which has none: Prisma does not interpret a raw\n* column's values. Every literal reaches it through the data type's reader.\n*/\nfunction refuseLiteralValue() {\n\tthrow structuredError(\"CONTRACT.LITERAL_VALUES_ABSENT\", \"A raw column has no literal values, so its default cannot be a literal. Write the default as a SQL expression: sql`...`.\", {\n\t\twhy: \"Prisma does not interpret the values of a raw column, so it cannot write or compare a literal of its type.\",\n\t\tfix: \"Write the default as a sql expression, such as @default(sql`...`) in a schema or .default(sql`...`) in TypeScript.\"\n\t});\n}\n/**\n* The data type of a column whose type no other data type claims. Its `sql` parameter is the type\n* exactly as the database catalog prints it, which migrations write and verify compares. It claims\n* no reported type, so introspection never reads a column as raw. It has no literal values: it\n* declares no casts, and its reader refuses every value. ADR 273.\n*/\nconst sqlRawDataType = sqlDataType(SQL_RAW_DATA_TYPE_ID, {\n\tparams: sqlRawParams,\n\tnameIsCatalogText: true,\n\trender: ({ sql }) => sql,\n\tread: refuseLiteralValue\n});\n//#endregion\nexport { SQL_RAW_DATA_TYPE_ID, checkRawTypeText, findSqlDataTypeCollision, isSqlDataType, nameIsCatalogText, renderSqlCatalogText, renderSqlTypeName, resolveReportedSqlType, resolveWrittenSqlTypes, sameSqlColumnType, sqlBaseName, sqlCodecColumnLength, sqlColumnLength, sqlDataType, sqlDataTypeOfCodec, sqlRawDataType, sqlStorageType, sqlStorageTypeId, sqlStorageTypeOfCodec, unquotedSqlBaseName, unquotedSqlBaseNameOfCodec, validateSqlTypeParams };\n\n//# sourceMappingURL=data-type.mjs.map"],"mappings":";;;;;AAKA,MAAM,uBAAuB,WAAW,SAAS;AACjD,MAAM,OAAO;AACb,MAAM,QAAQ,GAAG,KAAK;;;;;;;AAOtB,MAAM,gBAAgB,IAAI,OAAO,OAAO,KAAK,OAAO,MAAM,MAAM,MAAM,eAAe;;AAErF,SAAS,iBAAiB,MAAM;CAC/B,OAAO,cAAc,KAAK,IAAI,IAAI,KAAK,IAAI;AAC5C;AACA,MAAM,eAAe,KAAK,EAAE,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,QAAQ,QAAQ;CACpE,MAAM,UAAU,iBAAiB,OAAO,GAAG;CAC3C,OAAO,YAAY,KAAK,KAAK,IAAI,OAAO;EACvC,MAAM,CAAC,KAAK;EACZ,SAAS;CACV,CAAC;AACF,CAAC;;;;;AAKD,SAAS,qBAAqB;CAC7B,MAAM,gBAAgB,kCAAkC,4HAA4H;EACnL,KAAK;EACL,KAAK;CACN,CAAC;AACF;;;;;;;AAOA,MAAM,iBAAiB,YAAY,sBAAsB;CACxD,QAAQ;CACR,mBAAmB;CACnB,SAAS,EAAE,UAAU;CACrB,MAAM;AACP,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { DataTypeSupport } from "@prisma/orm-framework/components/authoring";
2
- import { ColumnDefault, ColumnDefaultLiteralInputValue, JsonValue } from "@prisma/orm-framework/contract/types";
3
- import { CodecDescriptor, DataTypeId } from "@prisma/orm-framework/components/codec";
4
- //#region ../../../2-sql-family/9-family/dist/default-mapping-CAOONlKQ.d.mts
2
+ import { ColumnDefault } from "@prisma/orm-framework/contract/types";
3
+ import { CodecDescriptor } from "@prisma/orm-framework/components/codec";
4
+ //#region ../../../2-sql-family/9-family/dist/default-mapping-CEISdj2g.d.mts
5
5
  //#region src/core/psl-build/default-mapping.d.ts
6
6
  interface DefaultMappingOptions {
7
7
  readonly functionAttributes?: Readonly<Record<string, string>>;
@@ -28,12 +28,6 @@ type DefaultMappingResult = {
28
28
  * whitespace (ADR 129).
29
29
  */
30
30
  declare function mapDefault(columnDefault: ColumnDefault, options?: DefaultMappingOptions): DefaultMappingResult | undefined;
31
- /**
32
- * `value`, a value of `dataType` as `contract.json` stores it, written as the literal of a type that `dataType` takes, proven to read back as `value`: `255` for `pg/int4`, ``sql`"MyType"[]` `` for `sql/expression`. `undefined` when no literal reads back as it.
33
- */
34
- declare function writeDataTypeValue(value: JsonValue, dataType: DataTypeId, support: DataTypeSupport): string | undefined;
35
- /** The PSL literal a stored value is written as for the column `options` describe, or `undefined` when it has no written form that reads back as that value. */
36
- declare function writeDefaultLiteral(value: ColumnDefaultLiteralInputValue, options: DefaultMappingOptions | undefined): string | undefined;
37
31
  //#endregion
38
- export { writeDefaultLiteral as a, writeDataTypeValue as i, DefaultMappingResult as n, mapDefault as r, DefaultMappingOptions as t };
39
- //# sourceMappingURL=default-mapping-CAOONlKQ-CIg7JCfF.d.mts.map
32
+ export { DefaultMappingResult as n, mapDefault as r, DefaultMappingOptions as t };
33
+ //# sourceMappingURL=default-mapping-CEISdj2g-B50Ag_F_.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default-mapping-CEISdj2g-B50Ag_F_.d.mts","names":[],"sources":["../../../../2-sql-family/9-family/dist/default-mapping-CEISdj2g.d.mts"],"mappings":";;;;;UAIU;WACC,qBAAqB,SAAS;;WAE9B,YAAY;;WAEZ,cAAc,KAAK;;WAEnB;;;;;WAKA;;KAEN;WACM;;;;;;;;;iBASM,WAAW,eAAe,eAAe,UAAU,wBAAwB"}
@@ -4,14 +4,14 @@ import { r as lowerAuthoredIndex } from "./index-naming-BOcJT1B3-D-49owHA.mjs";
4
4
  import { t as lowerAuthoredCheck } from "./authored-check-naming-DTKcH2_d.mjs";
5
5
  import { t as sqlContractCanonicalizationHooks } from "./canonicalization-hooks-Ce1v_TDl.mjs";
6
6
  import { n as resolveColumnValueObject, t as discriminatorValueSet } from "./check-expressions-BDsLvzqN.mjs";
7
- import { p as sqlDataTypeOfCodec, y as validateSqlTypeParams } from "./sql-data-type-D7M-YTTY-D2vRqDxn.mjs";
7
+ import { p as sqlDataTypeOfCodec, y as validateSqlTypeParams } from "./sql-data-type-LVBldu1a-Bq203xWX.mjs";
8
8
  import { i as Index, s as StorageTable, t as CheckConstraint } from "./storage-table-B_MrLtQX-eWx6BgGT.mjs";
9
9
  import { n as checkConstraintInputFromSerialized } from "./serialized-index-BefvjuZ0-Bbsja7If.mjs";
10
10
  import { h as valueSetEntityKind, p as tableEntityKind } from "./entity-kinds-CgEwK0hH-D1NKoKE5.mjs";
11
11
  import { a as materializeForeignKeysAndIndexes } from "./foreign-key-materialization-CCHAR789.mjs";
12
12
  import { t as validateIndexTypes } from "./index-type-validation-DJEMmmw0.mjs";
13
13
  import { c as isMaterializedSqlNamespace, d as nonEmptyTypeParams, f as toStorageTypeInstance, o as SqlStorage, s as applyFkDefaults } from "./types-CISwoRED.mjs";
14
- import { h as validateStorageSemantics } from "./validators-CnQqLEIi.mjs";
14
+ import { h as validateStorageSemantics } from "./validators-qcQteqs2.mjs";
15
15
  import { t as deriveValueSetFromEntity } from "./value-set-derivation-hook-HVaxhALD.mjs";
16
16
  import { isStructuredError, structuredError } from "@prisma/orm-framework/utils/structured-error";
17
17
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
@@ -27,7 +27,7 @@ import { mergeCapabilityMatrices } from "@prisma/orm-framework/components/compon
27
27
  import { encodeEnumTypeMembers, resolveToOneRelationNullable } from "@prisma/orm-framework/contract-authoring";
28
28
  import { buildExecutionSection, computeProfileHash, computeStorageHash } from "@prisma/orm-framework/contract/hashing";
29
29
  import { applySpecifierDefaultControlPolicy } from "@prisma/orm-framework/contract/apply-specifier-default-control-policy";
30
- //#region ../../../2-sql-family/2-authoring/contract-ts/dist/derived-checks-BuTkSE9l.mjs
30
+ //#region ../../../2-sql-family/2-authoring/contract-ts/dist/derived-checks-D__agoFB.mjs
31
31
  function contractError(code, message, options) {
32
32
  return structuredError(code, message, options);
33
33
  }
@@ -1621,4 +1621,4 @@ function withoutDerivedChecks(tableName, table, contractDefault) {
1621
1621
  //#endregion
1622
1622
  export { refuseTypesKey as a, isValueObjectMember as i, buildSqlContractFromDefinition as n, storedAsListColumn as o, contractError as r, toOneNullabilityContradictionMessage as s, applySqlSpecifierControlPolicy as t };
1623
1623
 
1624
- //# sourceMappingURL=derived-checks-BuTkSE9l-gyx0d0dX.mjs.map
1624
+ //# sourceMappingURL=derived-checks-D__agoFB-Boa1MHcA.mjs.map