@prisma/orm-target-sqlite 8.0.0-rc.25-dev.24 → 8.0.0-rc.25-dev.25
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-DwKhx_Xu.d.mts → adapter-BQZBUROY.d.mts} +6 -6
- package/dist/{adapter-DwKhx_Xu.d.mts.map → adapter-BQZBUROY.d.mts.map} +1 -1
- package/dist/{adapter-CxzIV2_z-BBps74Fk.mjs → adapter-CxzIV2_z-DKbo2Ebu.mjs} +7 -7
- package/dist/{adapter-CxzIV2_z-BBps74Fk.mjs.map → adapter-CxzIV2_z-DKbo2Ebu.mjs.map} +1 -1
- package/dist/adapter.d.mts +1 -1
- package/dist/adapter.mjs +3 -3
- package/dist/adapter__adapter.d.mts +1 -1
- package/dist/adapter__adapter.mjs +1 -1
- package/dist/adapter__control.mjs +4 -4
- package/dist/adapter__runtime.mjs +4 -4
- package/dist/adapter__sql-renderer.mjs +1 -1
- package/dist/{aggregates-Bee9csBL.d.mts → aggregates--0FaH9Te.d.mts} +6 -6
- package/dist/{aggregates-Bee9csBL.d.mts.map → aggregates--0FaH9Te.d.mts.map} +1 -1
- package/dist/{codecs-EhvrdV8v.mjs → codecs-BO3frExA.mjs} +2 -2
- package/dist/{codecs-EhvrdV8v.mjs.map → codecs-BO3frExA.mjs.map} +1 -1
- package/dist/{codecs-CE5McdzP-CZ5F4Trz.mjs → codecs-izq9l1NG-Bb2RnXsx.mjs} +3 -3
- package/dist/{codecs-CE5McdzP-CZ5F4Trz.mjs.map → codecs-izq9l1NG-Bb2RnXsx.mjs.map} +1 -1
- package/dist/{contract-free-CJlg0xGJ.mjs → contract-free-B5S1OSEd.mjs} +2 -2
- package/dist/{contract-free-CJlg0xGJ.mjs.map → contract-free-B5S1OSEd.mjs.map} +1 -1
- package/dist/{data-type-entries-C0WkKiPF-CKPYj4OT.mjs → data-type-entries-DaT4D2GV-DE0V_N6k.mjs} +3 -3
- package/dist/{data-type-entries-C0WkKiPF-CKPYj4OT.mjs.map → data-type-entries-DaT4D2GV-DE0V_N6k.mjs.map} +1 -1
- package/dist/{data-types-C_NKe4Ni-D7r8QkSb.mjs → data-types-Djvapurb-BR-Y4NWN.mjs} +6 -3
- package/dist/data-types-Djvapurb-BR-Y4NWN.mjs.map +1 -0
- package/dist/{date-time-now-generators-DtRz9c2R-BkrBeLl2.mjs → date-time-now-generators-DUb3x91B-D0keGG59.mjs} +3 -3
- package/dist/{date-time-now-generators-DtRz9c2R-BkrBeLl2.mjs.map → date-time-now-generators-DUb3x91B-D0keGG59.mjs.map} +1 -1
- package/dist/{datetime-text-nkVy_w0q-DZnIEmgr.mjs → datetime-text-DPjoF6HJ-se0mLEbc.mjs} +3 -3
- package/dist/{datetime-text-nkVy_w0q-DZnIEmgr.mjs.map → datetime-text-DPjoF6HJ-se0mLEbc.mjs.map} +1 -1
- package/dist/{default-normalizer-Xsys5QJm-bPQiHGKp.mjs → default-normalizer-BANdMVGr-BiUHyBX1.mjs} +3 -3
- package/dist/{default-normalizer-Xsys5QJm-bPQiHGKp.mjs.map → default-normalizer-BANdMVGr-BiUHyBX1.mjs.map} +1 -1
- package/dist/{descriptor-meta-CafFMPhN-Cedi6Vwa.mjs → descriptor-meta-CafFMPhN-x3YQXDSX.mjs} +2 -2
- package/dist/{descriptor-meta-CafFMPhN-Cedi6Vwa.mjs.map → descriptor-meta-CafFMPhN-x3YQXDSX.mjs.map} +1 -1
- package/dist/{descriptor-meta-uVTby90Y-CUfrzHVW.mjs → descriptor-meta-DEr1ALec-DvT6glGq.mjs} +5 -5
- package/dist/{descriptor-meta-uVTby90Y-CUfrzHVW.mjs.map → descriptor-meta-DEr1ALec-DvT6glGq.mjs.map} +1 -1
- package/dist/driver__runtime.mjs +1 -1
- package/dist/{migration-BZoV6EvH.mjs → migration-BYRMZiPU.mjs} +2 -2
- package/dist/{migration-BZoV6EvH.mjs.map → migration-BYRMZiPU.mjs.map} +1 -1
- package/dist/{op-factory-call-2IWWs4es-CajfeAMX.mjs → op-factory-call-DjbjegGT-DsQBI5Ll.mjs} +9 -6
- package/dist/op-factory-call-DjbjegGT-DsQBI5Ll.mjs.map +1 -0
- package/dist/{pack-CHESErO8.d.mts → pack-BG5STIN9.d.mts} +2 -2
- package/dist/{pack-CHESErO8.d.mts.map → pack-BG5STIN9.d.mts.map} +1 -1
- package/dist/{planner-B3kx0r5b-ByQSd1xn.mjs → planner-C1OMkqV5-BAv-WPw6.mjs} +5 -5
- package/dist/{planner-B3kx0r5b-ByQSd1xn.mjs.map → planner-C1OMkqV5-BAv-WPw6.mjs.map} +1 -1
- package/dist/{planner-produced-sqlite-migration-B_LI7-Li-BjO08-5q.mjs → planner-produced-sqlite-migration-CrbMD1ch-O7Mh_aKY.mjs} +5 -5
- package/dist/{planner-produced-sqlite-migration-B_LI7-Li-BjO08-5q.mjs.map → planner-produced-sqlite-migration-CrbMD1ch-O7Mh_aKY.mjs.map} +1 -1
- package/dist/{render-ops-BdrBMvjY-CyVOYy9i.mjs → render-ops-CQ-Kf4P0-DDUU4OFY.mjs} +3 -3
- package/dist/{render-ops-BdrBMvjY-CyVOYy9i.mjs.map → render-ops-CQ-Kf4P0-DDUU4OFY.mjs.map} +1 -1
- package/dist/{runtime-DQll1Swl.mjs → runtime-C43fN_cJ.mjs} +2 -2
- package/dist/{runtime-DQll1Swl.mjs.map → runtime-C43fN_cJ.mjs.map} +1 -1
- package/dist/{runtime-JuCbuSJz.d.mts → runtime-DqzT70C4.d.mts} +2 -2
- package/dist/{runtime-JuCbuSJz.d.mts.map → runtime-DqzT70C4.d.mts.map} +1 -1
- package/dist/{sqlite-contract-view-6qHjyMcG-BHZ8iO5v.mjs → sqlite-contract-view-c-qO_pKt-DOCoqwrD.mjs} +4 -4
- package/dist/sqlite-contract-view-c-qO_pKt-DOCoqwrD.mjs.map +1 -0
- package/dist/{sqlite-migration-BNMabSfq-C-TEN2jV.mjs → sqlite-migration-Cmzykasm--GxBXXny.mjs} +7 -7
- package/dist/{sqlite-migration-BNMabSfq-C-TEN2jV.mjs.map → sqlite-migration-Cmzykasm--GxBXXny.mjs.map} +1 -1
- package/dist/target.d.mts +3 -3
- package/dist/target.mjs +17 -17
- package/dist/target__aggregates.d.mts +1 -1
- package/dist/target__codecs.mjs +3 -3
- package/dist/target__contract-free.mjs +1 -1
- package/dist/target__control.mjs +28 -8
- package/dist/target__control.mjs.map +1 -1
- package/dist/target__data-types.mjs +2 -2
- package/dist/target__default-normalizer.mjs +1 -1
- package/dist/target__migration.mjs +2 -2
- package/dist/target__op-factory-call.mjs +1 -1
- package/dist/target__pack.d.mts +1 -1
- package/dist/target__pack.mjs +1 -1
- package/dist/target__planner-produced-sqlite-migration.mjs +1 -1
- package/dist/target__planner.mjs +1 -1
- package/dist/target__render-ops.mjs +1 -1
- package/dist/target__runtime.d.mts +1 -1
- package/dist/target__runtime.mjs +3 -3
- package/package.json +13 -13
- package/dist/data-types-C_NKe4Ni-D7r8QkSb.mjs.map +0 -1
- package/dist/op-factory-call-2IWWs4es-CajfeAMX.mjs.map +0 -1
- package/dist/sqlite-contract-view-6qHjyMcG-BHZ8iO5v.mjs.map +0 -1
|
@@ -6,7 +6,7 @@ import { withThreeFractionDigits, withoutZerosBelowAMillisecond } from "@prisma/
|
|
|
6
6
|
import { isDecimalText, printedDecimalText } from "@prisma/orm-framework/type-implementations/decimal";
|
|
7
7
|
import { ISO_DURATION_AS_WRITTEN } from "@prisma/orm-framework/type-implementations/duration";
|
|
8
8
|
import { type } from "arktype";
|
|
9
|
-
//#region ../../../3-targets/sqlite/1-target/dist/data-types-
|
|
9
|
+
//#region ../../../3-targets/sqlite/1-target/dist/data-types-Djvapurb.mjs
|
|
10
10
|
/** Digit text as `real` stores it: the nearest double, as SQLite converts an integer to a real. */
|
|
11
11
|
const asReal = (value) => typeof value === "string" ? Number(value) : refuseWrongShape(value, "digit text");
|
|
12
12
|
/** A type written and reported by `name` and nothing else. */
|
|
@@ -51,7 +51,10 @@ function sqliteBlobFromHexText(text) {
|
|
|
51
51
|
return text.toUpperCase();
|
|
52
52
|
}
|
|
53
53
|
/** The length of `character` and `character varying`, which SQLite accepts and does not enforce, up to SQLite's largest string length, so a double holds every accepted length exactly. */
|
|
54
|
-
const sqliteCharacterLengthParams = type({
|
|
54
|
+
const sqliteCharacterLengthParams = type({
|
|
55
|
+
"+": "reject",
|
|
56
|
+
"length?": `number.integer >= 1 & number.integer <= 2147483647`
|
|
57
|
+
});
|
|
55
58
|
/** A character type is written without its length, so its normal form has none. */
|
|
56
59
|
const withoutLength = ({ length: _length, ...rest }) => rest;
|
|
57
60
|
const sqliteCharacter = sqlDataType("sqlite/character", {
|
|
@@ -233,4 +236,4 @@ const sqliteTextDataTypes = [
|
|
|
233
236
|
//#endregion
|
|
234
237
|
export { sqliteTimeText as C, sqliteTime as S, sqliteInteger as _, sqliteCharacterLengthParams as a, sqliteText as b, sqliteDate as c, sqliteDatetimeText as d, sqliteDatetimeTextAtMilliseconds as f, sqliteDurationText as g, sqliteDuration as h, sqliteCharacter as i, sqliteDateText as l, sqliteDecimalText as m, sqliteBlobFromHexText as n, sqliteCharacterVarying as o, sqliteDecimal as p, sqliteBoolean as r, sqliteDataTypes as s, sqliteBlob as t, sqliteDatetime as u, sqliteJson as v, sqliteTextDataTypes as x, sqliteReal as y };
|
|
235
238
|
|
|
236
|
-
//# sourceMappingURL=data-types-
|
|
239
|
+
//# sourceMappingURL=data-types-Djvapurb-BR-Y4NWN.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-types-Djvapurb-BR-Y4NWN.mjs","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/data-types-Djvapurb.mjs"],"sourcesContent":["import { INT64_RANGE, castUnchanged, dateTimeStoredText, isoDateStringText, readJsonBoolean, readJsonFloat, readJsonIntegerText, readJsonMatching, readJsonString, refuseJsonValue, refuseWrongShape } from \"@internal/framework-components/codec\";\nimport { canonicalizeJson } from \"@internal/framework-components/utils\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { sqlDataType, sqlRawDataType } from \"@internal/sql-contract/data-type\";\nimport { withThreeFractionDigits, withoutZerosBelowAMillisecond } from \"@internal/type-implementations/date\";\nimport { isDecimalText, printedDecimalText } from \"@internal/type-implementations/decimal\";\nimport { ISO_DURATION_AS_WRITTEN } from \"@internal/type-implementations/duration\";\nimport { type } from \"arktype\";\n//#region src/core/data-types.ts\n/** Digit text as `real` stores it: the nearest double, as SQLite converts an integer to a real. */\nconst asReal = (value) => typeof value === \"string\" ? Number(value) : refuseWrongShape(value, \"digit text\");\n/** A type written and reported by `name` and nothing else. */\nconst storedAs = (id, name, read, casts = {}) => sqlDataType(id, {\n\ttexts: [{\n\t\ttext: name,\n\t\twritten: true,\n\t\tcatalog: true\n\t}],\n\tread,\n\tcasts\n});\nconst readText = (json) => readJsonString(\"sqlite/text\", json);\nconst UPPERCASE_HEX = /^(?:[0-9A-F]{2})*$/;\nconst sqliteText = storedAs(\"sqlite/text\", \"text\", readText);\n/** Digit text, which holds every 64-bit integer exactly; SQLite reads an INTEGER default back as a number. */\nconst sqliteInteger = sqlDataType(\"sqlite/integer\", {\n\ttexts: [{\n\t\ttext: \"integer\",\n\t\twritten: true,\n\t\tcatalog: true\n\t}],\n\tread: (json) => {\n\t\treadJsonIntegerText(\"sqlite/integer\", json, INT64_RANGE);\n\t\treturn json;\n\t},\n\tcasts: {}\n});\n/** SQLite cannot store NaN, but a codec refuses it, as ADR 254 places that limit, so the type reads it. */\nconst sqliteReal = storedAs(\"sqlite/real\", \"real\", (json) => {\n\treadJsonFloat(\"sqlite/real\", json);\n\treturn json;\n}, { [sqliteInteger.id]: asReal });\nconst sqliteBlob = storedAs(\"sqlite/blob\", \"blob\", (json) => readJsonMatching(\"sqlite/blob\", json, UPPERCASE_HEX, \"uppercase hexadecimal text\"), {});\nconst HEX_TEXT = /^(?:[0-9A-Fa-f]{2})*$/;\n/** The upper-case hex `sqlite/blob` stores for the hex text a `blob` tag holds, `68656c6c6f`. */\nfunction sqliteBlobFromHexText(text) {\n\tif (!HEX_TEXT.test(text)) throw structuredError(\"CONTRACT.CAST_REFUSED\", `\"${text}\" is not hex text: write two hexadecimal digits for each byte, as in blob\\`68656c6c6f\\`.`, {\n\t\twhy: \"The blob tag reads bytes as hex text, two digits for each byte.\",\n\t\tfix: \"Write the bytes in hex, as in blob`68656c6c6f`.\"\n\t});\n\treturn text.toUpperCase();\n}\n/** The length of `character` and `character varying`, which SQLite accepts and does not enforce, up to SQLite's largest string length, so a double holds every accepted length exactly. */\nconst sqliteCharacterLengthParams = type({\n\t\"+\": \"reject\",\n\t\"length?\": `number.integer >= 1 & number.integer <= 2147483647`\n});\n/** A character type is written without its length, so its normal form has none. */\nconst withoutLength = ({ length: _length, ...rest }) => rest;\nconst sqliteCharacter = sqlDataType(\"sqlite/character\", {\n\tparams: sqliteCharacterLengthParams,\n\ttexts: [{\n\t\ttext: \"character\",\n\t\twritten: true,\n\t\tcatalog: true\n\t}],\n\tread: (json) => readJsonString(\"sqlite/character\", json),\n\tnormalize: withoutLength,\n\tcasts: { [sqliteText.id]: castUnchanged }\n});\nconst sqliteCharacterVarying = sqlDataType(\"sqlite/character-varying\", {\n\tparams: sqliteCharacterLengthParams,\n\ttexts: [{\n\t\ttext: \"character varying\",\n\t\twritten: true,\n\t\tcatalog: true\n\t}],\n\tread: (json) => readJsonString(\"sqlite/character-varying\", json),\n\tnormalize: withoutLength,\n\tcasts: { [sqliteText.id]: castUnchanged }\n});\n/**\n* The value of `sqlite/datetime` (ADR 254): the text `toISOString()` writes for every row. The range and the millisecond precision are those of a JavaScript `Date`, the codec's value.\n*/\nconst sqliteDatetimeText = (text) => isoDateStringText(text, \"sqlite/datetime\");\n/** What `sqliteDatetimeText` writes for `text`, or `undefined` when it names no instant the type holds. */\nfunction storedDatetime(text) {\n\ttry {\n\t\treturn sqliteDatetimeText(text);\n\t} catch {\n\t\treturn;\n\t}\n}\n/** Reads an instant in any spelling the `datetime` tag reads; `spellDatetime` gives it the one it stores. */\nconst readDatetime = (json) => typeof json === \"string\" && storedDatetime(json) !== void 0 ? json : refuseJsonValue(\"sqlite/datetime\", \"ISO 8601 date and time text with a UTC offset and at most three fraction digits, as in \\\"2024-01-01T00:00:00Z\\\"\", json);\n/** An instant is stored in UTC with three fraction digits. */\nconst spellDatetime = (json) => typeof json === \"string\" ? storedDatetime(json) ?? json : json;\n/** The years SQLite's date and time functions read, which are also the years whose text sorts in date order. */\nconst SQLITE_DATE_RANGE = {\n\tearliest: \"0000-01-01\",\n\tlatest: \"9999-12-31\"\n};\n/**\n* The value of `sqlite/date`: a calendar date as ISO 8601 text, `2024-02-29`, in the years `0000` to `9999` that SQLite's `date()` reads. Throws `CONTRACT.CAST_REFUSED` for text that names no such date.\n*/\nfunction sqliteDateText(text) {\n\treturn dateTimeStoredText(text, {\n\t\tshape: \"date\",\n\t\townerId: \"sqlite/date\",\n\t\trange: SQLITE_DATE_RANGE\n\t});\n}\n/**\n* The value of `sqlite/time`: a time of day with exactly three fraction digits, `09:30:00.000`, as SQLite's `strftime('%H:%M:%f')` writes it, so the text sorts in the order of the times. Zeros past the third fraction digit are dropped; any other digit there is refused. Throws `CONTRACT.CAST_REFUSED` for text that names no such time.\n*/\nfunction sqliteTimeText(text) {\n\treturn withThreeFractionDigits(dateTimeStoredText(withoutZerosBelowAMillisecond(text), {\n\t\tshape: \"time\",\n\t\townerId: \"sqlite/time\",\n\t\tmaxFractionDigits: 3\n\t}, text));\n}\n/**\n* An instant as `sqlite/datetime` stores it, from ISO 8601 text with a UTC offset in which zeros past the third fraction digit are dropped. Throws `CONTRACT.CAST_REFUSED` for text that names no instant the type holds, including text with a digit below a millisecond.\n*/\nfunction sqliteDatetimeTextAtMilliseconds(text) {\n\treturn sqliteDatetimeText(withoutZerosBelowAMillisecond(text));\n}\n/** The value of `sqlite/duration`: an ISO 8601 duration, stored as written. Throws `CONTRACT.CAST_REFUSED` for other text. */\nfunction sqliteDurationText(text) {\n\tif (ISO_DURATION_AS_WRITTEN.test(text)) return text;\n\tthrow structuredError(\"CONTRACT.CAST_REFUSED\", `sqlite/duration cannot read \"${text}\". Write an ISO 8601 duration, as in \"PT1H30M\".`, {\n\t\twhy: \"sqlite/duration holds an ISO 8601 duration as Temporal.Duration writes it: an optional sign, P, then years, months, weeks and days, then T and hours, minutes and seconds. A sign on each component instead is read too.\",\n\t\tfix: \"Write the duration in ISO 8601, as in \\\"P1Y2M3DT4H5M6.5S\\\".\"\n\t});\n}\n/**\n* The value of `sqlite/decimal`: decimal text without an exponent, as in `-12.50`, stored without leading zeros or a minus sign on zero. Trailing zeros stay, because they are the scale the value was written with. Throws `CONTRACT.CAST_REFUSED` for other text.\n*/\nfunction sqliteDecimalText(text) {\n\tif (isDecimalText(text)) return printedDecimalText(text);\n\tthrow structuredError(\"CONTRACT.CAST_REFUSED\", `sqlite/decimal cannot read \"${text}\". Write decimal text, as in \"12.50\".`, {\n\t\twhy: \"sqlite/decimal holds decimal text: an optional minus sign, digits, and an optional fraction, with no exponent.\",\n\t\tfix: \"Write the decimal as text, as in \\\"12.50\\\" or \\\"-3\\\".\"\n\t});\n}\n/** What `read` writes for `text`, or `undefined` when `read` refuses it. */\nfunction storedOrUndefined(read, text) {\n\ttry {\n\t\treturn read(text);\n\t} catch {\n\t\treturn;\n\t}\n}\n/** A text data type stored in one form for each value: it reads any spelling `stored` takes and spells each value in the form `stored` writes. */\nfunction storedTextDataType(id, stored, expected, options) {\n\tconst read = (json) => typeof json === \"string\" && storedOrUndefined(stored, json) !== void 0 ? json : refuseJsonValue(id, expected, json);\n\tconst spell = (json) => typeof json === \"string\" ? storedOrUndefined(stored, json) ?? json : json;\n\treturn sqlDataType(id, {\n\t\tstoredAs: sqliteText.id,\n\t\tread,\n\t\t...options.respell ? { spell } : {}\n\t});\n}\n/** The document JSON text holds, or `undefined` when the text is not JSON. */\nfunction documentOf(text) {\n\ttry {\n\t\treturn { value: JSON.parse(text) };\n\t} catch {\n\t\treturn;\n\t}\n}\n/** Reads the JSON text of a document, in any spelling; `spellJson` gives it the one it stores. */\nconst readJson = (json) => typeof json === \"string\" && documentOf(json) !== void 0 ? json : refuseJsonValue(\"sqlite/json\", \"the JSON text of a document\", json);\n/** A document is stored as its JSON text with sorted keys and no added whitespace. */\nconst spellJson = (json) => {\n\tconst document = typeof json === \"string\" ? documentOf(json) : void 0;\n\treturn document === void 0 ? json : canonicalizeJson(document.value);\n};\n/** An instant, stored as text in the form `toISOString()` writes. */\nconst sqliteDatetime = sqlDataType(\"sqlite/datetime\", {\n\tstoredAs: sqliteText.id,\n\tread: readDatetime,\n\tspell: spellDatetime\n});\n/** A calendar date, stored as text in the form `2024-02-29`. */\nconst sqliteDate = storedTextDataType(\"sqlite/date\", sqliteDateText, \"ISO 8601 date text, as in \\\"2024-02-29\\\"\", { respell: true });\n/** A time of day, stored as text with three fraction digits, `09:30:00.000`. */\nconst sqliteTime = storedTextDataType(\"sqlite/time\", sqliteTimeText, \"ISO 8601 time of day text with at most three fraction digits, as in \\\"09:30:00\\\"\", { respell: true });\n/** A length of time, stored as the ISO 8601 duration it was written as, `PT1H30M`. Equal durations can be written differently, `P1D` and `PT24H`, so a duration keeps its spelling. */\nconst sqliteDuration = storedTextDataType(\"sqlite/duration\", sqliteDurationText, \"an ISO 8601 duration, as in \\\"PT1H30M\\\"\", { respell: false });\n/** A decimal, stored as text without leading zeros or a minus sign on zero, `12.50`. Text compares by its characters, so `1.5` and `1.50` are different values. A default is written as text, or as a whole number. */\nconst sqliteDecimal = sqlDataType(\"sqlite/decimal\", {\n\tstoredAs: sqliteText.id,\n\tread: (json) => typeof json === \"string\" && isDecimalText(json) ? json : refuseJsonValue(\"sqlite/decimal\", \"decimal text, as in \\\"12.50\\\"\", json),\n\tspell: (json) => typeof json === \"string\" ? printedDecimalText(json) : json,\n\tcasts: {\n\t\t[sqliteText.id]: (value) => typeof value === \"string\" ? sqliteDecimalText(value) : refuseWrongShape(value, \"text\"),\n\t\t[sqliteInteger.id]: castUnchanged\n\t}\n});\n/** A boolean, stored as the integer 0 or 1, which is what SQLite's own `FALSE` and `TRUE` are. A default is written `true` or `false`. */\nconst sqliteBoolean = sqlDataType(\"sqlite/boolean\", {\n\tstoredAs: sqliteInteger.id,\n\tread: (json) => readJsonBoolean(\"sqlite/boolean\", json)\n});\n/** A JSON document, stored as its JSON text with sorted keys and no added whitespace. A column declared `JSON` would have numeric affinity and store the document `\"42\"` as the integer 42. */\nconst sqliteJson = sqlDataType(\"sqlite/json\", {\n\tstoredAs: sqliteText.id,\n\tread: readJson,\n\tspell: spellJson\n});\n/** Every data type this target registers. */\nconst sqliteDataTypes = [\n\tsqliteText,\n\tsqliteInteger,\n\tsqliteReal,\n\tsqliteBlob,\n\tsqliteCharacter,\n\tsqliteCharacterVarying,\n\tsqliteDatetime,\n\tsqliteDate,\n\tsqliteTime,\n\tsqliteDuration,\n\tsqliteJson,\n\tsqliteDecimal,\n\tsqliteBoolean,\n\tsqlRawDataType\n];\n/** SQLite's text data types: `text`, `character(n)` and `character varying(n)`. */\nconst sqliteTextDataTypes = [\n\tsqliteText.id,\n\tsqliteCharacter.id,\n\tsqliteCharacterVarying.id\n];\n//#endregion\nexport { sqliteTimeText as C, sqliteTime as S, sqliteInteger as _, sqliteCharacterLengthParams as a, sqliteText as b, sqliteDate as c, sqliteDatetimeText as d, sqliteDatetimeTextAtMilliseconds as f, sqliteDurationText as g, sqliteDuration as h, sqliteCharacter as i, sqliteDateText as l, sqliteDecimalText as m, sqliteBlobFromHexText as n, sqliteCharacterVarying as o, sqliteDecimal as p, sqliteBoolean as r, sqliteDataTypes as s, sqliteBlob as t, sqliteDatetime as u, sqliteJson as v, sqliteTextDataTypes as x, sqliteReal as y };\n\n//# sourceMappingURL=data-types-Djvapurb.mjs.map"],"mappings":";;;;;;;;;;AAUA,MAAM,UAAU,UAAU,OAAO,UAAU,WAAW,OAAO,KAAK,IAAI,iBAAiB,OAAO,YAAY;;AAE1G,MAAM,YAAY,IAAI,MAAM,MAA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SAAS,OAAO,SAAS,WAAW,mBAAmB,IAAI,IAAI;CACvE,OAAO;GACL,WAAW,MAAM,UAAU,OAAO,UAAU,WAAW,kBAAkB,KAAK,IAAI,iBAAiB,OAAO,MAAM;GAChH,cAAc,KAAK;CACrB;AACD,CAAC;;AAED,MAAM,gBAAgB,YAAY,kBAAkB;CACnD,UAAU,cAAc;CACxB,OAAO,SAAS,gBAAgB,kBAAkB,IAAI;AACvD,CAAC;;AAED,MAAM,aAAa,YAAY,eAAe;CAC7C,UAAU,WAAW;CACrB,MAAM;CACN,OAAO;AACR,CAAC;;AAED,MAAM,kBAAkB;CACvB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA,MAAM,sBAAsB;CAC3B,WAAW;CACX,gBAAgB;CAChB,uBAAuB;AACxB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { s as sqliteDataTypes } from "./data-types-
|
|
1
|
+
import { s as sqliteDataTypes } from "./data-types-Djvapurb-BR-Y4NWN.mjs";
|
|
2
2
|
import { t as requireTemporal } from "./require-temporal-CHWqSDF3-ElFTiAh6.mjs";
|
|
3
3
|
import * as nowValues from "@prisma/orm-framework/type-implementations/now";
|
|
4
4
|
import { DATE_STRING_NOW_GENERATOR_ID, INSTANT_NOW_GENERATOR_ID, INSTANT_STRING_NOW_GENERATOR_ID, PLAIN_DATE_NOW_GENERATOR_ID, PLAIN_TIME_NOW_GENERATOR_ID, TIME_STRING_NOW_GENERATOR_ID } from "@prisma/orm-framework/type-implementations/now";
|
|
5
|
-
//#region ../../../3-targets/sqlite/1-target/dist/date-time-now-generators-
|
|
5
|
+
//#region ../../../3-targets/sqlite/1-target/dist/date-time-now-generators-DUb3x91B.mjs
|
|
6
6
|
const sqliteTargetDescriptorMetaRuntime = {
|
|
7
7
|
kind: "target",
|
|
8
8
|
familyId: "sql",
|
|
@@ -61,4 +61,4 @@ const sqliteNowGenerators = [
|
|
|
61
61
|
//#endregion
|
|
62
62
|
export { sqliteTargetDescriptorMetaRuntime as n, sqliteNowGenerators as t };
|
|
63
63
|
|
|
64
|
-
//# sourceMappingURL=date-time-now-generators-
|
|
64
|
+
//# sourceMappingURL=date-time-now-generators-DUb3x91B-D0keGG59.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-time-now-generators-
|
|
1
|
+
{"version":3,"file":"date-time-now-generators-DUb3x91B-D0keGG59.mjs","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/date-time-now-generators-DUb3x91B.mjs"],"sourcesContent":["import { s as sqliteDataTypes } from \"./data-types-Djvapurb.mjs\";\nimport { t as requireTemporal } from \"./require-temporal-CHWqSDF3.mjs\";\nimport * as nowValues from \"@internal/type-implementations/now\";\nimport { DATE_STRING_NOW_GENERATOR_ID, INSTANT_NOW_GENERATOR_ID, INSTANT_STRING_NOW_GENERATOR_ID, PLAIN_DATE_NOW_GENERATOR_ID, PLAIN_TIME_NOW_GENERATOR_ID, TIME_STRING_NOW_GENERATOR_ID } from \"@internal/type-implementations/now\";\nconst sqliteTargetDescriptorMetaRuntime = {\n\tkind: \"target\",\n\tfamilyId: \"sql\",\n\ttargetId: \"sqlite\",\n\tid: \"sqlite\",\n\tversion: \"0.0.1\",\n\tcapabilities: {},\n\tdataTypes: sqliteDataTypes\n};\n//#endregion\n//#region src/core/date-time-now-generators.ts\n/** SQLite's date and time types hold milliseconds. */\nconst MILLISECOND_DIGITS = 3;\nfunction instantNow() {\n\treturn nowValues.instantNow(requireTemporal({ generatorId: INSTANT_NOW_GENERATOR_ID }), MILLISECOND_DIGITS);\n}\nfunction plainDateNow() {\n\treturn nowValues.plainDateNow(requireTemporal({ generatorId: PLAIN_DATE_NOW_GENERATOR_ID }));\n}\nfunction plainTimeNow() {\n\treturn nowValues.plainTimeNow(requireTemporal({ generatorId: PLAIN_TIME_NOW_GENERATOR_ID }), MILLISECOND_DIGITS);\n}\nfunction instantStringNow() {\n\treturn nowValues.instantStringNow(MILLISECOND_DIGITS, \"fixed\");\n}\nfunction timeStringNow() {\n\treturn nowValues.timeStringNow(MILLISECOND_DIGITS, \"fixed\");\n}\n/**\n* The SQLite \"now\" generators, one per date and time codec except `sqlite/datetime@1`, which uses the SQL family's `timestampNow`. All read the clock through `Date.now()`, write UTC and keep milliseconds, which every SQLite date and time type holds. The string generators write the text their type stores, with three fraction digits.\n*/\nconst sqliteNowGenerators = [\n\t{\n\t\tid: INSTANT_NOW_GENERATOR_ID,\n\t\tgenerate: instantNow\n\t},\n\t{\n\t\tid: PLAIN_DATE_NOW_GENERATOR_ID,\n\t\tgenerate: plainDateNow\n\t},\n\t{\n\t\tid: PLAIN_TIME_NOW_GENERATOR_ID,\n\t\tgenerate: plainTimeNow\n\t},\n\t{\n\t\tid: INSTANT_STRING_NOW_GENERATOR_ID,\n\t\tgenerate: instantStringNow\n\t},\n\t{\n\t\tid: DATE_STRING_NOW_GENERATOR_ID,\n\t\tgenerate: nowValues.dateStringNow\n\t},\n\t{\n\t\tid: TIME_STRING_NOW_GENERATOR_ID,\n\t\tgenerate: timeStringNow\n\t}\n];\n//#endregion\nexport { sqliteTargetDescriptorMetaRuntime as n, sqliteNowGenerators as t };\n\n//# sourceMappingURL=date-time-now-generators-DUb3x91B.mjs.map"],"mappings":";;;;;AAIA,MAAM,oCAAoC;CACzC,MAAM;CACN,UAAU;CACV,UAAU;CACV,IAAI;CACJ,SAAS;CACT,cAAc,CAAC;CACf,WAAW;AACZ;;AAIA,MAAM,qBAAqB;AAC3B,SAAS,aAAa;CACrB,OAAO,UAAU,WAAW,gBAAgB,EAAE,aAAa,yBAAyB,CAAC,GAAG,kBAAkB;AAC3G;AACA,SAAS,eAAe;CACvB,OAAO,UAAU,aAAa,gBAAgB,EAAE,aAAa,4BAA4B,CAAC,CAAC;AAC5F;AACA,SAAS,eAAe;CACvB,OAAO,UAAU,aAAa,gBAAgB,EAAE,aAAa,4BAA4B,CAAC,GAAG,kBAAkB;AAChH;AACA,SAAS,mBAAmB;CAC3B,OAAO,UAAU,iBAAiB,oBAAoB,OAAO;AAC9D;AACA,SAAS,gBAAgB;CACxB,OAAO,UAAU,cAAc,oBAAoB,OAAO;AAC3D;;;;AAIA,MAAM,sBAAsB;CAC3B;EACC,IAAI;EACJ,UAAU;CACX;CACA;EACC,IAAI;EACJ,UAAU;CACX;CACA;EACC,IAAI;EACJ,UAAU;CACX;CACA;EACC,IAAI;EACJ,UAAU;CACX;CACA;EACC,IAAI;EACJ,UAAU,UAAU;CACrB;CACA;EACC,IAAI;EACJ,UAAU;CACX;AACD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { S as sqliteTime, b as sqliteText, c as sqliteDate, i as sqliteCharacter, o as sqliteCharacterVarying, u as sqliteDatetime } from "./data-types-
|
|
1
|
+
import { S as sqliteTime, b as sqliteText, c as sqliteDate, i as sqliteCharacter, o as sqliteCharacterVarying, u as sqliteDatetime } from "./data-types-Djvapurb-BR-Y4NWN.mjs";
|
|
2
2
|
import { sqlRawDataType } from "@prisma/orm-family-sql/contract/data-type";
|
|
3
|
-
//#region ../../../3-targets/sqlite/1-target/dist/datetime-text-
|
|
3
|
+
//#region ../../../3-targets/sqlite/1-target/dist/datetime-text-DPjoF6HJ.mjs
|
|
4
4
|
/** The `strftime` format for the text `encodeSqliteDatetime` writes. */
|
|
5
5
|
const SQLITE_DATETIME_TEXT_FORMAT = "%Y-%m-%dT%H:%M:%fZ";
|
|
6
6
|
/** The SQLite expression for the current instant, as the text `encodeSqliteDatetime` writes. */
|
|
@@ -29,4 +29,4 @@ function sqliteNowExpressionFor(dataTypeId) {
|
|
|
29
29
|
//#endregion
|
|
30
30
|
export { SQLITE_TIME_TEXT_FORMAT as a, SQLITE_TIME_NOW_EXPRESSION as i, SQLITE_DATE_NOW_EXPRESSION as n, sqliteNowExpressionFor as o, SQLITE_NOW_EXPRESSION as r, SQLITE_DATETIME_TEXT_FORMAT as t };
|
|
31
31
|
|
|
32
|
-
//# sourceMappingURL=datetime-text-
|
|
32
|
+
//# sourceMappingURL=datetime-text-DPjoF6HJ-se0mLEbc.mjs.map
|
package/dist/{datetime-text-nkVy_w0q-DZnIEmgr.mjs.map → datetime-text-DPjoF6HJ-se0mLEbc.mjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datetime-text-
|
|
1
|
+
{"version":3,"file":"datetime-text-DPjoF6HJ-se0mLEbc.mjs","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/datetime-text-DPjoF6HJ.mjs"],"sourcesContent":["import { S as sqliteTime, b as sqliteText, c as sqliteDate, i as sqliteCharacter, o as sqliteCharacterVarying, u as sqliteDatetime } from \"./data-types-Djvapurb.mjs\";\nimport { sqlRawDataType } from \"@internal/sql-contract/data-type\";\n//#region src/core/datetime-text.ts\n/** The `strftime` format for the text `encodeSqliteDatetime` writes. */\nconst SQLITE_DATETIME_TEXT_FORMAT = \"%Y-%m-%dT%H:%M:%fZ\";\n/** The SQLite expression for the current instant, as the text `encodeSqliteDatetime` writes. */\nconst SQLITE_NOW_EXPRESSION = `strftime('${SQLITE_DATETIME_TEXT_FORMAT}','now')`;\n/** The SQLite expression for the current date in UTC, as `sqlite/date` stores it. */\nconst SQLITE_DATE_NOW_EXPRESSION = \"date('now')\";\n/** The `strftime` format for the text `sqlite/time` stores. */\nconst SQLITE_TIME_TEXT_FORMAT = \"%H:%M:%f\";\n/** The SQLite expression for the current time of day in UTC, as `sqlite/time` stores it. */\nconst SQLITE_TIME_NOW_EXPRESSION = `strftime('${SQLITE_TIME_TEXT_FORMAT}','now')`;\nconst NOW_EXPRESSION_BY_DATA_TYPE = /* @__PURE__ */ new Map([\n\t[sqliteDatetime.id, SQLITE_NOW_EXPRESSION],\n\t[sqliteDate.id, SQLITE_DATE_NOW_EXPRESSION],\n\t[sqliteTime.id, SQLITE_TIME_NOW_EXPRESSION],\n\t[sqliteText.id, SQLITE_NOW_EXPRESSION],\n\t[sqliteCharacter.id, SQLITE_NOW_EXPRESSION],\n\t[sqliteCharacterVarying.id, SQLITE_NOW_EXPRESSION],\n\t[sqlRawDataType.id, SQLITE_NOW_EXPRESSION]\n]);\n/**\n* The expression a `now()` default is written as on a column of `dataTypeId`: the current date or time of day on `sqlite/date` and `sqlite/time`, the current instant on `sqlite/datetime`, on text, on a raw column, whose values Prisma does not read, and on a column of no known data type. `undefined` on a data type that stores no date or time, such as `sqlite/duration` or `sqlite/integer`, as PostgreSQL refuses `now()` on an `interval` or an `integer` column.\n*/\nfunction sqliteNowExpressionFor(dataTypeId) {\n\treturn dataTypeId === void 0 ? SQLITE_NOW_EXPRESSION : NOW_EXPRESSION_BY_DATA_TYPE.get(dataTypeId);\n}\n//#endregion\nexport { SQLITE_TIME_TEXT_FORMAT as a, SQLITE_TIME_NOW_EXPRESSION as i, SQLITE_DATE_NOW_EXPRESSION as n, sqliteNowExpressionFor as o, SQLITE_NOW_EXPRESSION as r, SQLITE_DATETIME_TEXT_FORMAT as t };\n\n//# sourceMappingURL=datetime-text-DPjoF6HJ.mjs.map"],"mappings":";;;;AAIA,MAAM,8BAA8B;;AAEpC,MAAM,wBAAwB,aAAa,4BAA4B;;AAEvE,MAAM,6BAA6B;;AAEnC,MAAM,0BAA0B;;AAEhC,MAAM,6BAA6B,aAAa,wBAAwB;AACxE,MAAM,8CAA8C,IAAI,IAAI;CAC3D,CAAC,eAAe,IAAI,qBAAqB;CACzC,CAAC,WAAW,IAAI,0BAA0B;CAC1C,CAAC,WAAW,IAAI,0BAA0B;CAC1C,CAAC,WAAW,IAAI,qBAAqB;CACrC,CAAC,gBAAgB,IAAI,qBAAqB;CAC1C,CAAC,uBAAuB,IAAI,qBAAqB;CACjD,CAAC,eAAe,IAAI,qBAAqB;AAC1C,CAAC;;;;AAID,SAAS,uBAAuB,YAAY;CAC3C,OAAO,eAAe,KAAK,IAAI,wBAAwB,4BAA4B,IAAI,UAAU;AAClG"}
|
package/dist/{default-normalizer-Xsys5QJm-bPQiHGKp.mjs → default-normalizer-BANdMVGr-BiUHyBX1.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as SQLITE_TIME_TEXT_FORMAT, i as SQLITE_TIME_NOW_EXPRESSION, n as SQLITE_DATE_NOW_EXPRESSION, o as sqliteNowExpressionFor, t as SQLITE_DATETIME_TEXT_FORMAT } from "./datetime-text-
|
|
2
|
-
//#region ../../../3-targets/sqlite/1-target/dist/default-normalizer-
|
|
1
|
+
import { a as SQLITE_TIME_TEXT_FORMAT, i as SQLITE_TIME_NOW_EXPRESSION, n as SQLITE_DATE_NOW_EXPRESSION, o as sqliteNowExpressionFor, t as SQLITE_DATETIME_TEXT_FORMAT } from "./datetime-text-DPjoF6HJ-se0mLEbc.mjs";
|
|
2
|
+
//#region ../../../3-targets/sqlite/1-target/dist/default-normalizer-BANdMVGr.mjs
|
|
3
3
|
const NULL_PATTERN = /^NULL$/i;
|
|
4
4
|
const INTEGER_PATTERN = /^[+-]?\d+$/;
|
|
5
5
|
const REAL_PATTERN = /^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/;
|
|
@@ -121,4 +121,4 @@ function sqliteResolveDefault(def, column) {
|
|
|
121
121
|
//#endregion
|
|
122
122
|
export { sqliteResolveDefault as n, stripOuterParens as r, readSqliteDefault as t };
|
|
123
123
|
|
|
124
|
-
//# sourceMappingURL=default-normalizer-
|
|
124
|
+
//# sourceMappingURL=default-normalizer-BANdMVGr-BiUHyBX1.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-normalizer-
|
|
1
|
+
{"version":3,"file":"default-normalizer-BANdMVGr-BiUHyBX1.mjs","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/default-normalizer-BANdMVGr.mjs"],"sourcesContent":["import { a as SQLITE_TIME_TEXT_FORMAT, i as SQLITE_TIME_NOW_EXPRESSION, n as SQLITE_DATE_NOW_EXPRESSION, o as sqliteNowExpressionFor, t as SQLITE_DATETIME_TEXT_FORMAT } from \"./datetime-text-DPjoF6HJ.mjs\";\n//#region src/core/default-normalizer.ts\nconst NULL_PATTERN = /^NULL$/i;\nconst INTEGER_PATTERN = /^[+-]?\\d+$/;\nconst REAL_PATTERN = /^[+-]?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:[eE][+-]?\\d+)?$/;\nconst STRING_LITERAL_PATTERN = /^'((?:[^']|'')*)'$/;\nconst STRFTIME_NOW_PATTERN = /^strftime\\s*\\(\\s*(['\"])([^'\"]*)\\1\\s*,\\s*(['\"])now\\3\\s*\\)$/i;\nconst DATE_NOW_PATTERN = /^date\\s*\\(\\s*(['\"])now\\1\\s*\\)$/i;\n/** The name of the current instant, as a contract writes it. */\nconst INSTANT_NOW = \"now()\";\n/**\n* The name of the current value `expression` writes: `now()` for the current instant, in any of the forms SQLite writes it, and the expression a `now()` default is written as for the current date and for the current time of day, since those hold different text. `undefined` for any other expression.\n*/\nfunction currentValueNamed(expression) {\n\tconst lower = expression.toLowerCase();\n\tif (lower === \"current_timestamp\" || lower === \"datetime('now')\" || lower === \"datetime(\\\"now\\\")\") return INSTANT_NOW;\n\tif (lower === \"current_date\" || DATE_NOW_PATTERN.test(expression)) return SQLITE_DATE_NOW_EXPRESSION;\n\tswitch (expression.match(STRFTIME_NOW_PATTERN)?.[2]) {\n\t\tcase SQLITE_DATETIME_TEXT_FORMAT: return INSTANT_NOW;\n\t\tcase SQLITE_TIME_TEXT_FORMAT: return SQLITE_TIME_NOW_EXPRESSION;\n\t\tdefault: return;\n\t}\n}\n/**\n* Strips a single matched wrapping pair of outer parens from `s`. Conservative:\n* only strips when the leading `(` is matched by the trailing `)` (so\n* `(a) + (b)` is returned unchanged). Mirrors SQLite's own\n* `pragma_table_info.dflt_value` normalization for expression defaults, and\n* is shared with the recreate-table postcheck builder so both sides agree\n* on the text.\n*/\nfunction stripOuterParens(s) {\n\tif (!s.startsWith(\"(\") || !s.endsWith(\")\")) return s;\n\tlet depth = 0;\n\tfor (let i = 0; i < s.length; i++) if (s[i] === \"(\") depth += 1;\n\telse if (s[i] === \")\") {\n\t\tdepth -= 1;\n\t\tif (depth === 0 && i < s.length - 1) return s;\n\t}\n\treturn s.slice(1, -1);\n}\n/** The type affinity SQLite gives a column of `declaredType`, by its rules in order. */\nfunction affinityOf(declaredType) {\n\tconst upper = declaredType.toUpperCase();\n\tif (upper.includes(\"INT\")) return \"integer\";\n\tif (upper.includes(\"CHAR\") || upper.includes(\"CLOB\") || upper.includes(\"TEXT\")) return \"text\";\n\tif (upper.includes(\"BLOB\") || upper.trim() === \"\") return \"blob\";\n\tif (upper.includes(\"REAL\") || upper.includes(\"FLOA\") || upper.includes(\"DOUB\")) return \"real\";\n\treturn \"numeric\";\n}\n/** A numeral as the driver returns it: a number, or digit text for an integer no double holds exactly. */\nfunction numberBody(numeral) {\n\tif (INTEGER_PATTERN.test(numeral)) {\n\t\tconst integer = BigInt(numeral);\n\t\treturn Number.isSafeInteger(Number(integer)) ? Number(integer) : integer.toString();\n\t}\n\treturn Number(numeral);\n}\n/** What the column stores for a literal written as `text` (quoted) or as a numeral, by its affinity. */\nfunction bodyFor(literal, quoted, affinity) {\n\tconst numeral = INTEGER_PATTERN.test(literal) || REAL_PATTERN.test(literal);\n\tif (affinity === \"text\") return literal;\n\tif (affinity === \"blob\") return quoted || !numeral ? literal : numberBody(literal);\n\treturn numeral ? numberBody(literal) : literal;\n}\n/** A blob literal: `X'` or `x'`, an even number of hexadecimal digits, `'`. */\nconst BLOB_LITERAL_PATTERN = /^[xX]'((?:[0-9a-fA-F]{2})*)'$/;\n/**\n* Reads a column's reported default. `CURRENT_TIMESTAMP`, `datetime('now')` and the expression a `now()` default is written as for an instant are `now()`; `date('now')` and `CURRENT_DATE`, which writes the same text, are read as `date('now')`, and the expression for the current time of day keeps its own name, so a default that writes a date is never read as one that writes an instant. `CURRENT_TIME` writes no fraction of a second, which is not the text `sqlite/time` stores, so it is kept as reported. A quoted string, a numeral or a blob literal (`X'6869'`, read as its bytes) is a literal; any other expression is a function default, kept as reported.\n*/\nfunction readSqliteDefault(rawDefault, declaredType) {\n\tlet trimmed = rawDefault.trim();\n\twhile (true) {\n\t\tconst stripped = stripOuterParens(trimmed).trim();\n\t\tif (stripped === trimmed) break;\n\t\ttrimmed = stripped;\n\t}\n\tconst currentValue = currentValueNamed(trimmed);\n\tif (currentValue !== void 0) return {\n\t\tkind: \"function\",\n\t\texpression: currentValue\n\t};\n\tif (NULL_PATTERN.test(trimmed)) return { kind: \"null\" };\n\tconst affinity = affinityOf(declaredType);\n\tconst quoted = STRING_LITERAL_PATTERN.exec(trimmed)?.[1];\n\tif (quoted !== void 0) return {\n\t\tkind: \"literal\",\n\t\tliteral: {\n\t\t\tkind: \"value\",\n\t\t\tbody: bodyFor(quoted.replace(/''/g, \"'\"), true, affinity)\n\t\t}\n\t};\n\tconst blobHex = BLOB_LITERAL_PATTERN.exec(trimmed)?.[1];\n\tif (blobHex !== void 0) return {\n\t\tkind: \"literal\",\n\t\tliteral: {\n\t\t\tkind: \"value\",\n\t\t\tbody: new Uint8Array(Buffer.from(blobHex, \"hex\"))\n\t\t}\n\t};\n\tif (INTEGER_PATTERN.test(trimmed) || REAL_PATTERN.test(trimmed)) return {\n\t\tkind: \"literal\",\n\t\tliteral: {\n\t\t\tkind: \"value\",\n\t\t\tbody: bodyFor(trimmed, false, affinity)\n\t\t}\n\t};\n\treturn {\n\t\tkind: \"function\",\n\t\texpression: trimmed\n\t};\n}\n/**\n* Names a contract's expression default the way {@link readSqliteDefault} names the same function in the database, so `` sql`CURRENT_TIMESTAMP` `` and the database's `datetime('now')` compare equal. A `now()` default is named as the expression the column's data type writes it as, so a `now()` on a date column and one on a date and time column differ, as their stored text does. A literal default, and an expression that writes a literal, pass through unchanged; introspection reads the latter's literal with the column's codec, and the diff compares the values.\n*/\nfunction sqliteResolveDefault(def, column) {\n\tif (def.kind !== \"function\") return def;\n\tconst read = readSqliteDefault(def.expression === INSTANT_NOW ? sqliteNowExpressionFor(column.dataTypeId) ?? def.expression : def.expression, column.typeText);\n\treturn read.kind === \"function\" ? read : def;\n}\n//#endregion\nexport { sqliteResolveDefault as n, stripOuterParens as r, readSqliteDefault as t };\n\n//# sourceMappingURL=default-normalizer-BANdMVGr.mjs.map"],"mappings":";;AAEA,MAAM,eAAe;AACrB,MAAM,kBAAkB;AACxB,MAAM,eAAe;AACrB,MAAM,yBAAyB;AAC/B,MAAM,uBAAuB;AAC7B,MAAM,mBAAmB;;AAEzB,MAAM,cAAc;;;;AAIpB,SAAS,kBAAkB,YAAY;CACtC,MAAM,QAAQ,WAAW,YAAY;CACrC,IAAI,UAAU,uBAAuB,UAAU,qBAAqB,UAAU,qBAAqB,OAAO;CAC1G,IAAI,UAAU,kBAAkB,iBAAiB,KAAK,UAAU,GAAG,OAAO;CAC1E,QAAQ,WAAW,MAAM,oBAAoB,CAAC,GAAG,IAAjD;EACC,KAAK,6BAA6B,OAAO;EACzC,KAAK,yBAAyB,OAAO;EACrC,SAAS;CACV;AACD;;;;;;;;;AASA,SAAS,iBAAiB,GAAG;CAC5B,IAAI,CAAC,EAAE,WAAW,GAAG,KAAK,CAAC,EAAE,SAAS,GAAG,GAAG,OAAO;CACnD,IAAI,QAAQ;CACZ,KAAK,IAAI,IAAI,GAAG,IAAI,EAAE,QAAQ,KAAK,IAAI,EAAE,OAAO,KAAK,SAAS;MACzD,IAAI,EAAE,OAAO,KAAK;EACtB,SAAS;EACT,IAAI,UAAU,KAAK,IAAI,EAAE,SAAS,GAAG,OAAO;CAC7C;CACA,OAAO,EAAE,MAAM,GAAG,EAAE;AACrB;;AAEA,SAAS,WAAW,cAAc;CACjC,MAAM,QAAQ,aAAa,YAAY;CACvC,IAAI,MAAM,SAAS,KAAK,GAAG,OAAO;CAClC,IAAI,MAAM,SAAS,MAAM,KAAK,MAAM,SAAS,MAAM,KAAK,MAAM,SAAS,MAAM,GAAG,OAAO;CACvF,IAAI,MAAM,SAAS,MAAM,KAAK,MAAM,KAAK,MAAM,IAAI,OAAO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O;EAC9B,MAAM;EACN,SAAS;GACR,MAAM;GACN,MAAM,IAAI,WAAW,OAAO,KAAK,SAAS,KAAK,CAAC;EACjD;CACD;CACA,IAAI,gBAAgB,KAAK,OAAO,KAAK,aAAa,KAAK,OAAO,GAAG,OAAO;EACvE,MAAM;EACN,SAAS;GACR,MAAM;GACN,MAAM,QAAQ,SAAS,OAAO,QAAQ;EACvC;CACD;CACA,OAAO;EACN,MAAM;EACN,YAAY;CACb;AACD;;;;AAIA,SAAS,qBAAqB,KAAK,QAAQ;CAC1C,IAAI,IAAI,SAAS,YAAY,OAAO;CACpC,MAAM,OAAO,kBAAkB,IAAI,eAAe,cAAc,uBAAuB,OAAO,UAAU,KAAK,IAAI,aAAa,IAAI,YAAY,OAAO,QAAQ;CAC7J,OAAO,KAAK,SAAS,aAAa,OAAO;AAC1C"}
|
package/dist/{descriptor-meta-CafFMPhN-Cedi6Vwa.mjs → descriptor-meta-CafFMPhN-x3YQXDSX.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as sqliteCodecRegistry } from "./codecs-
|
|
1
|
+
import { a as sqliteCodecRegistry } from "./codecs-BO3frExA.mjs";
|
|
2
2
|
import { n as sqliteAdapterContractContributions } from "./contract-contributions-DEePsuJb-CXE-f6pP.mjs";
|
|
3
3
|
//#region ../../../3-targets/sqlite/2-adapter/dist/descriptor-meta-CafFMPhN.mjs
|
|
4
4
|
const sqliteAdapterDescriptorMeta = {
|
|
@@ -23,4 +23,4 @@ const sqliteAdapterDescriptorMeta = {
|
|
|
23
23
|
//#endregion
|
|
24
24
|
export { sqliteAdapterDescriptorMeta as t };
|
|
25
25
|
|
|
26
|
-
//# sourceMappingURL=descriptor-meta-CafFMPhN-
|
|
26
|
+
//# sourceMappingURL=descriptor-meta-CafFMPhN-x3YQXDSX.mjs.map
|
package/dist/{descriptor-meta-CafFMPhN-Cedi6Vwa.mjs.map → descriptor-meta-CafFMPhN-x3YQXDSX.mjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"descriptor-meta-CafFMPhN-
|
|
1
|
+
{"version":3,"file":"descriptor-meta-CafFMPhN-x3YQXDSX.mjs","names":[],"sources":["../../../../3-targets/sqlite/2-adapter/dist/descriptor-meta-CafFMPhN.mjs"],"sourcesContent":["import { t as sqliteAdapterContractContributions } from \"./contract-contributions-DEePsuJb.mjs\";\nimport { sqliteCodecRegistry } from \"@internal/target-sqlite/codecs\";\n//#region src/core/module-base.ts\nconst moduleBase = typeof __PRISMA_PUBLISHED_MODULE_BASE__ADAPTER_SQLITE === \"string\" ? __PRISMA_PUBLISHED_MODULE_BASE__ADAPTER_SQLITE : \"@internal/adapter-sqlite\";\n//#endregion\n//#region src/core/descriptor-meta.ts\nconst sqliteAdapterDescriptorMeta = {\n\tkind: \"adapter\",\n\tfamilyId: \"sql\",\n\ttargetId: \"sqlite\",\n\tid: \"sqlite\",\n\tversion: \"0.0.1\",\n\tcapabilities: sqliteAdapterContractContributions.capabilities,\n\ttypes: {\n\t\taggregateDescriptors: sqliteAdapterContractContributions.types.aggregateDescriptors,\n\t\tcodecTypes: {\n\t\t\tcodecDescriptors: Array.from(sqliteCodecRegistry.values()),\n\t\t\timport: {\n\t\t\t\tpackage: `${moduleBase}/codec-types`,\n\t\t\t\tnamed: \"CodecTypes\",\n\t\t\t\talias: \"SqliteTypes\"\n\t\t\t}\n\t\t}\n\t}\n};\n//#endregion\nexport { sqliteAdapterDescriptorMeta as t };\n\n//# sourceMappingURL=descriptor-meta-CafFMPhN.mjs.map"],"mappings":";;;AAMA,MAAM,8BAA8B;CACnC,MAAM;CACN,UAAU;CACV,UAAU;CACV,IAAI;CACJ,SAAS;CACT,cAAc,mCAAmC;CACjD,OAAO;EACN,sBAAsB,mCAAmC,MAAM;EAC/D,YAAY;GACX,kBAAkB,MAAM,KAAK,oBAAoB,OAAO,CAAC;GACzD,QAAQ;IACP,SAAS;IACT,OAAO;IACP,OAAO;GACR;EACD;CACD;AACD"}
|
package/dist/{descriptor-meta-uVTby90Y-CUfrzHVW.mjs → descriptor-meta-DEr1ALec-DvT6glGq.mjs}
RENAMED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { _ as SQLITE_TIME_TEMPORAL_CODEC_ID, a as SQLITE_DATETIME_CODEC_ID, c as SQLITE_DATE_STRING_CODEC_ID, d as SQLITE_DURATION_STRING_CODEC_ID, f as SQLITE_INTEGER_CODEC_ID, g as SQLITE_TIME_STRING_CODEC_ID, h as SQLITE_TEXT_CODEC_ID, i as SQLITE_BOOLEAN_CODEC_ID, l as SQLITE_DATE_TEMPORAL_CODEC_ID, m as SQLITE_REAL_CODEC_ID, o as SQLITE_DATETIME_STRING_CODEC_ID, p as SQLITE_JSON_CODEC_ID, r as SQLITE_BLOB_CODEC_ID, s as SQLITE_DATETIME_TEMPORAL_CODEC_ID, t as SQLITE_BIGINT_CODEC_ID, u as SQLITE_DECIMAL_CODEC_ID } from "./codec-ids-CTshXpbg-tcdbf_VC.mjs";
|
|
2
|
-
import { _ as sqliteInteger, x as sqliteTextDataTypes } from "./data-types-
|
|
3
|
-
import { t as sqliteDataTypeEntries } from "./data-type-entries-
|
|
4
|
-
import { n as sqliteTargetDescriptorMetaRuntime, t as sqliteNowGenerators } from "./date-time-now-generators-
|
|
2
|
+
import { _ as sqliteInteger, x as sqliteTextDataTypes } from "./data-types-Djvapurb-BR-Y4NWN.mjs";
|
|
3
|
+
import { t as sqliteDataTypeEntries } from "./data-type-entries-DaT4D2GV-DE0V_N6k.mjs";
|
|
4
|
+
import { n as sqliteTargetDescriptorMetaRuntime, t as sqliteNowGenerators } from "./date-time-now-generators-DUb3x91B-D0keGG59.mjs";
|
|
5
5
|
import { DATE_STRING_NOW_GENERATOR_ID, INSTANT_NOW_GENERATOR_ID, INSTANT_STRING_NOW_GENERATOR_ID, PLAIN_DATE_NOW_GENERATOR_ID, PLAIN_TIME_NOW_GENERATOR_ID, TIME_STRING_NOW_GENERATOR_ID } from "@prisma/orm-framework/type-implementations/now";
|
|
6
6
|
import { UNBOUND_NAMESPACE_ID } from "@prisma/orm-framework/components/ir";
|
|
7
7
|
import { idGeneratorFunctionBindings, sqlIntegerArgumentGeneratorFunctions, sqlTargetTypeConstructors } from "@prisma/orm-family-sql/family/pack";
|
|
8
8
|
import { TIMESTAMP_NOW_GENERATOR_ID, temporalTypeAliases } from "@prisma/orm-framework/components/authoring";
|
|
9
9
|
import { singleGeneratorBinding } from "@prisma/orm-framework/components/components";
|
|
10
|
-
//#region ../../../3-targets/sqlite/1-target/dist/descriptor-meta-
|
|
10
|
+
//#region ../../../3-targets/sqlite/1-target/dist/descriptor-meta-DEr1ALec.mjs
|
|
11
11
|
const sqliteAuthoringTypes = {
|
|
12
12
|
.../* @__PURE__ */ sqlTargetTypeConstructors({ sizeType: "sqlite/real" }),
|
|
13
13
|
temporal: /* @__PURE__ */ temporalTypeAliases({ codecId: "sqlite/datetime@1" }, "a JavaScript Date")
|
|
@@ -382,4 +382,4 @@ const sqliteTargetDescriptorMeta = {
|
|
|
382
382
|
//#endregion
|
|
383
383
|
export { sqliteTargetDescriptorMeta as n, sqliteScalarTypeConstructors as t };
|
|
384
384
|
|
|
385
|
-
//# sourceMappingURL=descriptor-meta-
|
|
385
|
+
//# sourceMappingURL=descriptor-meta-DEr1ALec-DvT6glGq.mjs.map
|
package/dist/{descriptor-meta-uVTby90Y-CUfrzHVW.mjs.map → descriptor-meta-DEr1ALec-DvT6glGq.mjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"descriptor-meta-uVTby90Y-CUfrzHVW.mjs","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/descriptor-meta-uVTby90Y.mjs"],"sourcesContent":["import { _ as SQLITE_TIME_TEMPORAL_CODEC_ID, a as SQLITE_DATETIME_CODEC_ID, c as SQLITE_DATE_STRING_CODEC_ID, d as SQLITE_DURATION_STRING_CODEC_ID, f as SQLITE_INTEGER_CODEC_ID, g as SQLITE_TIME_STRING_CODEC_ID, h as SQLITE_TEXT_CODEC_ID, i as SQLITE_BOOLEAN_CODEC_ID, l as SQLITE_DATE_TEMPORAL_CODEC_ID, m as SQLITE_REAL_CODEC_ID, o as SQLITE_DATETIME_STRING_CODEC_ID, p as SQLITE_JSON_CODEC_ID, r as SQLITE_BLOB_CODEC_ID, s as SQLITE_DATETIME_TEMPORAL_CODEC_ID, t as SQLITE_BIGINT_CODEC_ID, u as SQLITE_DECIMAL_CODEC_ID } from \"./codec-ids-CTshXpbg.mjs\";\nimport { _ as sqliteInteger, x as sqliteTextDataTypes } from \"./data-types-C_NKe4Ni.mjs\";\nimport { t as sqliteDataTypeEntries } from \"./data-type-entries-C0WkKiPF.mjs\";\nimport { n as sqliteTargetDescriptorMetaRuntime, t as sqliteNowGenerators } from \"./date-time-now-generators-DtRz9c2R.mjs\";\nimport { UNBOUND_NAMESPACE_ID } from \"@internal/framework-components/ir\";\nimport { idGeneratorFunctionBindings, sqlIntegerArgumentGeneratorFunctions, sqlTargetTypeConstructors } from \"@internal/family-sql/pack\";\nimport { TIMESTAMP_NOW_GENERATOR_ID, temporalTypeAliases } from \"@internal/framework-components/authoring\";\nimport { singleGeneratorBinding } from \"@internal/framework-components/components\";\nimport { DATE_STRING_NOW_GENERATOR_ID, INSTANT_NOW_GENERATOR_ID, INSTANT_STRING_NOW_GENERATOR_ID, PLAIN_DATE_NOW_GENERATOR_ID, PLAIN_TIME_NOW_GENERATOR_ID, TIME_STRING_NOW_GENERATOR_ID } from \"@internal/type-implementations/now\";\n//#region src/core/authoring.ts\nconst sqliteAuthoringTypes = {\n\t.../* @__PURE__ */ sqlTargetTypeConstructors({ sizeType: \"sqlite/real\" }),\n\ttemporal: /* @__PURE__ */ temporalTypeAliases({ codecId: \"sqlite/datetime@1\" }, \"a JavaScript Date\")\n};\n//#endregion\n//#region src/core/generator-functions.ts\n/** The \"now\" generator for each codec that has one. The `now` generator function binds it. */\nconst sqliteNowGeneratorIds = {\n\t[SQLITE_DATETIME_CODEC_ID]: TIMESTAMP_NOW_GENERATOR_ID,\n\t[SQLITE_DATETIME_TEMPORAL_CODEC_ID]: INSTANT_NOW_GENERATOR_ID,\n\t[SQLITE_DATETIME_STRING_CODEC_ID]: INSTANT_STRING_NOW_GENERATOR_ID,\n\t[SQLITE_DATE_STRING_CODEC_ID]: DATE_STRING_NOW_GENERATOR_ID,\n\t[SQLITE_DATE_TEMPORAL_CODEC_ID]: PLAIN_DATE_NOW_GENERATOR_ID,\n\t[SQLITE_TIME_STRING_CODEC_ID]: TIME_STRING_NOW_GENERATOR_ID,\n\t[SQLITE_TIME_TEMPORAL_CODEC_ID]: PLAIN_TIME_NOW_GENERATOR_ID\n};\nconst sqliteGeneratorFunctions = [\n\t...sqlIntegerArgumentGeneratorFunctions({ integer: sqliteInteger.id }),\n\t{\n\t\tname: \"now\",\n\t\tbindings: Object.entries(sqliteNowGeneratorIds).map(([codecId, generatorId]) => singleGeneratorBinding({\n\t\t\tcodecIds: [codecId],\n\t\t\tgeneratorId\n\t\t}))\n\t},\n\t...idGeneratorFunctionBindings({ text: [SQLITE_TEXT_CODEC_ID] })\n];\n/** The `now` generators SQLite binds. The SQL family registers the identifier generators. */\nconst sqliteGeneratorDescriptors = [{ id: TIMESTAMP_NOW_GENERATOR_ID }, ...sqliteNowGenerators.map(({ id }) => ({ id }))];\n//#endregion\n//#region src/core/type-constructors.ts\nconst integerNumber = {\n\tkind: \"typeConstructor\",\n\tdocumentation: \"An integer read as a JavaScript number within its safe integer range, stored as SQLite integer.\",\n\toutput: { codecId: SQLITE_INTEGER_CODEC_ID }\n};\n/**\n* The explicit SQLite scalar types. An explicit type is named after the SQLite column type that stores it: `Text`, `Real` and `Blob`. `integer` is read by more than one codec of its data type, so those types carry the value too: `IntegerNumber` and `IntegerBigInt`. A type with a data type of its own, which a `text` column stores, is named after that data type, as ADR 315 and rule 7 of ADR 322 give it: `DecimalString`, `PlainJson` and the date and time types. `IntegerBoolean` is an exception that rule 7 records: `sqlite/boolean` is a data type of its own, which an `integer` column stores, and its name takes the form of the other `integer` types. PSL writes them as field types and the TypeScript builder calls them as `type.X()`. ADR 315, ADR 322.\n*/\nconst sqliteExplicitScalarTypes = {\n\tIntegerNumber: integerNumber,\n\tIntegerBigInt: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"An integer read as a JavaScript bigint, stored as SQLite integer.\",\n\t\toutput: { codecId: SQLITE_BIGINT_CODEC_ID }\n\t},\n\tReal: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A floating-point number, stored as SQLite real.\",\n\t\toutput: { codecId: SQLITE_REAL_CODEC_ID }\n\t},\n\tDecimalString: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"An exact decimal number read as decimal text such as \\\"12.50\\\", stored as SQLite text. Text compares by its characters, so a field of this type can be compared for equality but not ordered or summed.\",\n\t\toutput: { codecId: SQLITE_DECIMAL_CODEC_ID }\n\t},\n\tText: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"Text, stored as SQLite text.\",\n\t\toutput: { codecId: SQLITE_TEXT_CODEC_ID }\n\t},\n\tIntegerBoolean: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A boolean, stored as SQLite integer: 0 for false and 1 for true, as SQLite writes FALSE and TRUE.\",\n\t\toutput: { codecId: SQLITE_BOOLEAN_CODEC_ID }\n\t},\n\tBlob: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"Binary data read as a Uint8Array, stored as SQLite blob.\",\n\t\toutput: { codecId: SQLITE_BLOB_CODEC_ID }\n\t},\n\tPlainJson: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A JSON value, serialized and stored as SQLite text.\",\n\t\toutput: { codecId: SQLITE_JSON_CODEC_ID }\n\t}\n};\nfunction storageOption(storage) {\n\treturn {\n\t\tkind: \"option\",\n\t\tname: \"storage\",\n\t\tvalues: [storage],\n\t\tdefault: storage,\n\t\toptional: true\n\t};\n}\n/**\n* The convenience types of SQLite's scalars. Each is a type choice: `storage` names the SQLite column type that stores the value and, for `BigInt`, `as` chooses the application value. `Int` comes before `BigInt`, so `IntegerNumber`, which both can choose, is written `Int`. ADR 279, ADR 322.\n*/\nconst sqliteConvenienceScalarTypes = {\n\tInt: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"An integer read as a JavaScript number within its safe integer range, stored as SQLite integer.\",\n\t\targs: [storageOption(\"integer\")],\n\t\tchoices: [{\n\t\t\twhen: { storage: \"integer\" },\n\t\t\ttype: \"IntegerNumber\"\n\t\t}]\n\t},\n\tBigInt: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"An integer that may exceed the safe integer range, stored as SQLite integer. `as` is what the application reads: bigint, or number within the safe integer range.\",\n\t\targs: [{\n\t\t\tkind: \"option\",\n\t\t\tname: \"as\",\n\t\t\tvalues: [\"bigint\", \"number\"],\n\t\t\tdefault: \"bigint\",\n\t\t\toptional: true\n\t\t}, storageOption(\"integer\")],\n\t\tchoices: [{\n\t\t\twhen: {\n\t\t\t\tas: \"bigint\",\n\t\t\t\tstorage: \"integer\"\n\t\t\t},\n\t\t\ttype: \"IntegerBigInt\"\n\t\t}, {\n\t\t\twhen: {\n\t\t\t\tas: \"number\",\n\t\t\t\tstorage: \"integer\"\n\t\t\t},\n\t\t\ttype: \"IntegerNumber\"\n\t\t}]\n\t},\n\tFloat: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"A floating-point number, stored as SQLite real.\",\n\t\targs: [storageOption(\"real\")],\n\t\tchoices: [{\n\t\t\twhen: { storage: \"real\" },\n\t\t\ttype: \"Real\"\n\t\t}]\n\t},\n\tDecimal: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"An exact decimal number read as decimal text such as \\\"12.50\\\", stored as SQLite text. It can be compared for equality but not ordered or summed.\",\n\t\targs: [storageOption(\"text\")],\n\t\tchoices: [{\n\t\t\twhen: { storage: \"text\" },\n\t\t\ttype: \"DecimalString\"\n\t\t}]\n\t},\n\tString: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"Text, stored as SQLite text.\",\n\t\targs: [storageOption(\"text\")],\n\t\tchoices: [{\n\t\t\twhen: { storage: \"text\" },\n\t\t\ttype: \"Text\"\n\t\t}]\n\t},\n\tBoolean: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"A boolean, stored as SQLite integer: 0 for false and 1 for true, as SQLite writes FALSE and TRUE.\",\n\t\targs: [storageOption(\"integer\")],\n\t\tchoices: [{\n\t\t\twhen: { storage: \"integer\" },\n\t\t\ttype: \"IntegerBoolean\"\n\t\t}]\n\t},\n\tBytes: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"Binary data read as a Uint8Array, stored as SQLite blob.\",\n\t\targs: [storageOption(\"blob\")],\n\t\tchoices: [{\n\t\t\twhen: { storage: \"blob\" },\n\t\t\ttype: \"Blob\"\n\t\t}]\n\t},\n\tJson: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"A JSON value, serialized and stored as SQLite text.\",\n\t\targs: [storageOption(\"text\")],\n\t\tchoices: [{\n\t\t\twhen: { storage: \"text\" },\n\t\t\ttype: \"PlainJson\"\n\t\t}]\n\t}\n};\n/**\n* The explicit types' former names, kept for one release line as deprecated aliases. Each gives the same codec as its replacement, and the PSL interpreter warns where one is written (ADR 257).\n*/\nconst sqliteDeprecatedScalarTypes = { BigIntNumber: {\n\t...integerNumber,\n\tdeprecated: { replacement: \"IntegerNumber\" }\n} };\n/**\n* SQLite's scalar types other than the date and time types: the explicit types, the convenience types and the deprecated aliases. `sqliteScalarTypeConstructors` adds the date and time types.\n*/\nconst sqliteScalarAuthoringTypes = {\n\t...sqliteExplicitScalarTypes,\n\t...sqliteConvenienceScalarTypes,\n\t...sqliteDeprecatedScalarTypes\n};\n/**\n* The explicit date and time types. SQLite has no date or time column type, so each is stored as text, in one form for each value, and its name says what the text holds and what the application reads. ADR 315.\n*/\nconst sqliteDateTimeTypeConstructors = {\n\tDatetimeJsDate: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"An instant stored as SQLite text, 2024-01-01T00:00:00.000Z, and represented as a JavaScript Date.\",\n\t\toutput: { codecId: SQLITE_DATETIME_CODEC_ID }\n\t},\n\tDatetimeTemporal: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"An instant stored as SQLite text, 2024-01-01T00:00:00.000Z, and represented as Temporal.Instant.\",\n\t\toutput: { codecId: SQLITE_DATETIME_TEMPORAL_CODEC_ID }\n\t},\n\tDatetimeString: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"An instant stored as SQLite text and represented as that text, 2024-01-01T00:00:00.000Z, the instant in UTC.\",\n\t\toutput: { codecId: SQLITE_DATETIME_STRING_CODEC_ID }\n\t},\n\tDateString: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A calendar date stored as SQLite text and represented as that text, 2024-02-29.\",\n\t\toutput: { codecId: SQLITE_DATE_STRING_CODEC_ID }\n\t},\n\tDateTemporal: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A calendar date stored as SQLite text, 2024-02-29, and represented as Temporal.PlainDate.\",\n\t\toutput: { codecId: SQLITE_DATE_TEMPORAL_CODEC_ID }\n\t},\n\tTimeString: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A time of day stored as SQLite text and represented as that text, 09:30:00.000, always with three fraction digits.\",\n\t\toutput: { codecId: SQLITE_TIME_STRING_CODEC_ID }\n\t},\n\tTimeTemporal: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A time of day stored as SQLite text, 09:30:00.000, and represented as Temporal.PlainTime.\",\n\t\toutput: { codecId: SQLITE_TIME_TEMPORAL_CODEC_ID }\n\t},\n\tDurationString: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A length of time stored as SQLite text and represented as the ISO 8601 duration it was written as, such as PT1H30M.\",\n\t\toutput: { codecId: SQLITE_DURATION_STRING_CODEC_ID }\n\t}\n};\nconst textStorage = storageOption(\"text\");\n/**\n* The convenience date and time types. Each is a type choice: its `as` argument chooses the explicit type it becomes. Every SQLite date and time type is stored as text, so `storage` is text only. ADR 279, ADR 315.\n*/\nconst sqliteConvenienceDateTimeTypes = {\n\tDateTime: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"A moment in time, stored as SQLite text. `as` is what the application reads: jsDate (a JavaScript Date), temporal (Temporal.Instant) or string, such as \\\"2024-01-01T00:00:00.000Z\\\".\",\n\t\targs: [{\n\t\t\tkind: \"option\",\n\t\t\tname: \"as\",\n\t\t\tvalues: [\n\t\t\t\t\"jsDate\",\n\t\t\t\t\"temporal\",\n\t\t\t\t\"string\"\n\t\t\t],\n\t\t\tdefault: \"jsDate\",\n\t\t\toptional: true\n\t\t}, textStorage],\n\t\tchoices: [\n\t\t\t{\n\t\t\t\twhen: {\n\t\t\t\t\tas: \"jsDate\",\n\t\t\t\t\tstorage: \"text\"\n\t\t\t\t},\n\t\t\t\ttype: \"DatetimeJsDate\"\n\t\t\t},\n\t\t\t{\n\t\t\t\twhen: {\n\t\t\t\t\tas: \"temporal\",\n\t\t\t\t\tstorage: \"text\"\n\t\t\t\t},\n\t\t\t\ttype: \"DatetimeTemporal\"\n\t\t\t},\n\t\t\t{\n\t\t\t\twhen: {\n\t\t\t\t\tas: \"string\",\n\t\t\t\t\tstorage: \"text\"\n\t\t\t\t},\n\t\t\t\ttype: \"DatetimeString\"\n\t\t\t}\n\t\t]\n\t},\n\tDate: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"A calendar date, stored as SQLite text. `as` is what the application reads: string, such as \\\"2024-02-29\\\", or temporal (Temporal.PlainDate).\",\n\t\targs: [{\n\t\t\tkind: \"option\",\n\t\t\tname: \"as\",\n\t\t\tvalues: [\"string\", \"temporal\"],\n\t\t\tdefault: \"string\",\n\t\t\toptional: true\n\t\t}, textStorage],\n\t\tchoices: [{\n\t\t\twhen: {\n\t\t\t\tas: \"string\",\n\t\t\t\tstorage: \"text\"\n\t\t\t},\n\t\t\ttype: \"DateString\"\n\t\t}, {\n\t\t\twhen: {\n\t\t\t\tas: \"temporal\",\n\t\t\t\tstorage: \"text\"\n\t\t\t},\n\t\t\ttype: \"DateTemporal\"\n\t\t}]\n\t},\n\tTime: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"A time of day, stored as SQLite text. `as` is what the application reads: string, such as \\\"09:30:00.000\\\", or temporal (Temporal.PlainTime).\",\n\t\targs: [{\n\t\t\tkind: \"option\",\n\t\t\tname: \"as\",\n\t\t\tvalues: [\"string\", \"temporal\"],\n\t\t\tdefault: \"string\",\n\t\t\toptional: true\n\t\t}, textStorage],\n\t\tchoices: [{\n\t\t\twhen: {\n\t\t\t\tas: \"string\",\n\t\t\t\tstorage: \"text\"\n\t\t\t},\n\t\t\ttype: \"TimeString\"\n\t\t}, {\n\t\t\twhen: {\n\t\t\t\tas: \"temporal\",\n\t\t\t\tstorage: \"text\"\n\t\t\t},\n\t\t\ttype: \"TimeTemporal\"\n\t\t}]\n\t},\n\tDuration: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"A length of time, stored as SQLite text. `as` is what the application reads: string, an ISO 8601 duration such as \\\"PT1H30M\\\".\",\n\t\targs: [{\n\t\t\tkind: \"option\",\n\t\t\tname: \"as\",\n\t\t\tvalues: [\"string\"],\n\t\t\tdefault: \"string\",\n\t\t\toptional: true\n\t\t}, textStorage],\n\t\tchoices: [{\n\t\t\twhen: {\n\t\t\t\tas: \"string\",\n\t\t\t\tstorage: \"text\"\n\t\t\t},\n\t\t\ttype: \"DurationString\"\n\t\t}]\n\t}\n};\n/**\n* The scalar types, the explicit date and time types and the convenience date and time types. The target contributes them, so PSL and the TypeScript builder's `type.*` see the same names.\n*/\nconst sqliteScalarTypeConstructors = {\n\t...sqliteScalarAuthoringTypes,\n\t...sqliteDateTimeTypeConstructors,\n\t...sqliteConvenienceDateTimeTypes\n};\nconst sqliteTargetDescriptorMeta = {\n\t...sqliteTargetDescriptorMetaRuntime,\n\tdefaultNamespaceId: UNBOUND_NAMESPACE_ID,\n\tsupportsNamespaces: false,\n\tdisplayName: \"SQLite\",\n\tauthoring: {\n\t\ttype: {\n\t\t\t...sqliteScalarTypeConstructors,\n\t\t\t...sqliteAuthoringTypes\n\t\t},\n\t\tdataTypes: sqliteDataTypeEntries(),\n\t\ttextDataTypes: sqliteTextDataTypes\n\t},\n\tgeneratorFunctions: sqliteGeneratorFunctions,\n\tcontrolMutationDefaults: {\n\t\tdefaultFunctionRegistry: /* @__PURE__ */ new Map(),\n\t\tgeneratorDescriptors: sqliteGeneratorDescriptors\n\t}\n};\n//#endregion\nexport { sqliteScalarTypeConstructors as n, sqliteTargetDescriptorMeta as t };\n\n//# sourceMappingURL=descriptor-meta-uVTby90Y.mjs.map"],"mappings":";;;;;;;;;;AAUA,MAAM,uBAAuB;CAC5B,GAAmB,0CAA0B,EAAE,UAAU,cAAc,CAAC;CACxE,UAA0B,oCAAoB,EAAE,SAAS,oBAAoB,GAAG,mBAAmB;AACpG;;AAIA,MAAM,wBAAwB;EAC5B,2BAA2B;EAC3B,oCAAoC;EACpC,kCAAkC;EAClC,8BAA8B;EAC9B,gCAAgC;EAChC,8BAA8B;EAC9B,gCAAgC;AAClC;AACA,MAAM,2BAA2B;CAChC,GAAG,qCAAqC,EAAE,SAAS,cAAc,GAAG,CAAC;CACrE;EACC,MAAM;EACN,UAAU,OAAO,QAAQ,qBAAqB,CAAC,CAAC,KAAK,CAAC,SAAS,iBAAiB,uBAAuB;GACtG,UAAU,CAAC,OAAO;GAClB;EACD,CAAC,CAAC;CACH;CACA,GAAG,4BAA4B,EAAE,MAAM,CAAC,oBAAoB,EAAE,CAAC;AAChE;;AAEA,MAAM,6BAA6B,CAAC,EAAE,IAAI,2BAA2B,GAAG,GAAG,oBAAoB,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC;AAGxH,MAAM,gBAAgB;CACrB,MAAM;CACN,eAAe;CACf,QAAQ,EAAE,SAAS,wB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J,SAAS;GACV;GACA,MAAM;EACP,CAAC;CACF;CACA,UAAU;EACT,MAAM;EACN,eAAe;EACf,MAAM,CAAC;GACN,MAAM;GACN,MAAM;GACN,QAAQ,CAAC,QAAQ;GACjB,SAAS;GACT,UAAU;EACX,GAAG,WAAW;EACd,SAAS,CAAC;GACT,MAAM;IACL,IAAI;IACJ,SAAS;GACV;GACA,MAAM;EACP,CAAC;CACF;AACD;;;;AAIA,MAAM,+BAA+B;CACpC,GAAG;CACH,GAAG;CACH,GAAG;AACJ;AACA,MAAM,6BAA6B;CAClC,GAAG;CACH,oBAAoB;CACpB,oBAAoB;CACpB,aAAa;CACb,WAAW;EACV,MAAM;GACL,GAAG;GACH,GAAG;EACJ;EACA,WAAW,sBAAsB;EACjC,eAAe;CAChB;CACA,oBAAoB;CACpB,yBAAyB;EACxB,yCAAyC,IAAI,IAAI;EACjD,sBAAsB;CACvB;AACD"}
|
|
1
|
+
{"version":3,"file":"descriptor-meta-DEr1ALec-DvT6glGq.mjs","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/descriptor-meta-DEr1ALec.mjs"],"sourcesContent":["import { _ as SQLITE_TIME_TEMPORAL_CODEC_ID, a as SQLITE_DATETIME_CODEC_ID, c as SQLITE_DATE_STRING_CODEC_ID, d as SQLITE_DURATION_STRING_CODEC_ID, f as SQLITE_INTEGER_CODEC_ID, g as SQLITE_TIME_STRING_CODEC_ID, h as SQLITE_TEXT_CODEC_ID, i as SQLITE_BOOLEAN_CODEC_ID, l as SQLITE_DATE_TEMPORAL_CODEC_ID, m as SQLITE_REAL_CODEC_ID, o as SQLITE_DATETIME_STRING_CODEC_ID, p as SQLITE_JSON_CODEC_ID, r as SQLITE_BLOB_CODEC_ID, s as SQLITE_DATETIME_TEMPORAL_CODEC_ID, t as SQLITE_BIGINT_CODEC_ID, u as SQLITE_DECIMAL_CODEC_ID } from \"./codec-ids-CTshXpbg.mjs\";\nimport { _ as sqliteInteger, x as sqliteTextDataTypes } from \"./data-types-Djvapurb.mjs\";\nimport { t as sqliteDataTypeEntries } from \"./data-type-entries-DaT4D2GV.mjs\";\nimport { n as sqliteTargetDescriptorMetaRuntime, t as sqliteNowGenerators } from \"./date-time-now-generators-DUb3x91B.mjs\";\nimport { UNBOUND_NAMESPACE_ID } from \"@internal/framework-components/ir\";\nimport { idGeneratorFunctionBindings, sqlIntegerArgumentGeneratorFunctions, sqlTargetTypeConstructors } from \"@internal/family-sql/pack\";\nimport { TIMESTAMP_NOW_GENERATOR_ID, temporalTypeAliases } from \"@internal/framework-components/authoring\";\nimport { singleGeneratorBinding } from \"@internal/framework-components/components\";\nimport { DATE_STRING_NOW_GENERATOR_ID, INSTANT_NOW_GENERATOR_ID, INSTANT_STRING_NOW_GENERATOR_ID, PLAIN_DATE_NOW_GENERATOR_ID, PLAIN_TIME_NOW_GENERATOR_ID, TIME_STRING_NOW_GENERATOR_ID } from \"@internal/type-implementations/now\";\n//#region src/core/authoring.ts\nconst sqliteAuthoringTypes = {\n\t.../* @__PURE__ */ sqlTargetTypeConstructors({ sizeType: \"sqlite/real\" }),\n\ttemporal: /* @__PURE__ */ temporalTypeAliases({ codecId: \"sqlite/datetime@1\" }, \"a JavaScript Date\")\n};\n//#endregion\n//#region src/core/generator-functions.ts\n/** The \"now\" generator for each codec that has one. The `now` generator function binds it. */\nconst sqliteNowGeneratorIds = {\n\t[SQLITE_DATETIME_CODEC_ID]: TIMESTAMP_NOW_GENERATOR_ID,\n\t[SQLITE_DATETIME_TEMPORAL_CODEC_ID]: INSTANT_NOW_GENERATOR_ID,\n\t[SQLITE_DATETIME_STRING_CODEC_ID]: INSTANT_STRING_NOW_GENERATOR_ID,\n\t[SQLITE_DATE_STRING_CODEC_ID]: DATE_STRING_NOW_GENERATOR_ID,\n\t[SQLITE_DATE_TEMPORAL_CODEC_ID]: PLAIN_DATE_NOW_GENERATOR_ID,\n\t[SQLITE_TIME_STRING_CODEC_ID]: TIME_STRING_NOW_GENERATOR_ID,\n\t[SQLITE_TIME_TEMPORAL_CODEC_ID]: PLAIN_TIME_NOW_GENERATOR_ID\n};\nconst sqliteGeneratorFunctions = [\n\t...sqlIntegerArgumentGeneratorFunctions({ integer: sqliteInteger.id }),\n\t{\n\t\tname: \"now\",\n\t\tbindings: Object.entries(sqliteNowGeneratorIds).map(([codecId, generatorId]) => singleGeneratorBinding({\n\t\t\tcodecIds: [codecId],\n\t\t\tgeneratorId\n\t\t}))\n\t},\n\t...idGeneratorFunctionBindings({ text: [SQLITE_TEXT_CODEC_ID] })\n];\n/** The `now` generators SQLite binds. The SQL family registers the identifier generators. */\nconst sqliteGeneratorDescriptors = [{ id: TIMESTAMP_NOW_GENERATOR_ID }, ...sqliteNowGenerators.map(({ id }) => ({ id }))];\n//#endregion\n//#region src/core/type-constructors.ts\nconst integerNumber = {\n\tkind: \"typeConstructor\",\n\tdocumentation: \"An integer read as a JavaScript number within its safe integer range, stored as SQLite integer.\",\n\toutput: { codecId: SQLITE_INTEGER_CODEC_ID }\n};\n/**\n* The explicit SQLite scalar types. An explicit type is named after the SQLite column type that stores it: `Text`, `Real` and `Blob`. `integer` is read by more than one codec of its data type, so those types carry the value too: `IntegerNumber` and `IntegerBigInt`. A type with a data type of its own, which a `text` column stores, is named after that data type, as ADR 315 and rule 7 of ADR 322 give it: `DecimalString`, `PlainJson` and the date and time types. `IntegerBoolean` is an exception that rule 7 records: `sqlite/boolean` is a data type of its own, which an `integer` column stores, and its name takes the form of the other `integer` types. PSL writes them as field types and the TypeScript builder calls them as `type.X()`. ADR 315, ADR 322.\n*/\nconst sqliteExplicitScalarTypes = {\n\tIntegerNumber: integerNumber,\n\tIntegerBigInt: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"An integer read as a JavaScript bigint, stored as SQLite integer.\",\n\t\toutput: { codecId: SQLITE_BIGINT_CODEC_ID }\n\t},\n\tReal: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A floating-point number, stored as SQLite real.\",\n\t\toutput: { codecId: SQLITE_REAL_CODEC_ID }\n\t},\n\tDecimalString: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"An exact decimal number read as decimal text such as \\\"12.50\\\", stored as SQLite text. Text compares by its characters, so a field of this type can be compared for equality but not ordered or summed.\",\n\t\toutput: { codecId: SQLITE_DECIMAL_CODEC_ID }\n\t},\n\tText: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"Text, stored as SQLite text.\",\n\t\toutput: { codecId: SQLITE_TEXT_CODEC_ID }\n\t},\n\tIntegerBoolean: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A boolean, stored as SQLite integer: 0 for false and 1 for true, as SQLite writes FALSE and TRUE.\",\n\t\toutput: { codecId: SQLITE_BOOLEAN_CODEC_ID }\n\t},\n\tBlob: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"Binary data read as a Uint8Array, stored as SQLite blob.\",\n\t\toutput: { codecId: SQLITE_BLOB_CODEC_ID }\n\t},\n\tPlainJson: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A JSON value, serialized and stored as SQLite text.\",\n\t\toutput: { codecId: SQLITE_JSON_CODEC_ID }\n\t}\n};\nfunction storageOption(storage) {\n\treturn {\n\t\tkind: \"option\",\n\t\tname: \"storage\",\n\t\tvalues: [storage],\n\t\tdefault: storage,\n\t\toptional: true\n\t};\n}\n/**\n* The convenience types of SQLite's scalars. Each is a type choice: `storage` names the SQLite column type that stores the value and, for `BigInt`, `as` chooses the application value. `Int` comes before `BigInt`, so `IntegerNumber`, which both can choose, is written `Int`. ADR 279, ADR 322.\n*/\nconst sqliteConvenienceScalarTypes = {\n\tInt: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"An integer read as a JavaScript number within its safe integer range, stored as SQLite integer.\",\n\t\targs: [storageOption(\"integer\")],\n\t\tchoices: [{\n\t\t\twhen: { storage: \"integer\" },\n\t\t\ttype: \"IntegerNumber\"\n\t\t}]\n\t},\n\tBigInt: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"An integer that may exceed the safe integer range, stored as SQLite integer. `as` is what the application reads: bigint, or number within the safe integer range.\",\n\t\targs: [{\n\t\t\tkind: \"option\",\n\t\t\tname: \"as\",\n\t\t\tvalues: [\"bigint\", \"number\"],\n\t\t\tdefault: \"bigint\",\n\t\t\toptional: true\n\t\t}, storageOption(\"integer\")],\n\t\tchoices: [{\n\t\t\twhen: {\n\t\t\t\tas: \"bigint\",\n\t\t\t\tstorage: \"integer\"\n\t\t\t},\n\t\t\ttype: \"IntegerBigInt\"\n\t\t}, {\n\t\t\twhen: {\n\t\t\t\tas: \"number\",\n\t\t\t\tstorage: \"integer\"\n\t\t\t},\n\t\t\ttype: \"IntegerNumber\"\n\t\t}]\n\t},\n\tFloat: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"A floating-point number, stored as SQLite real.\",\n\t\targs: [storageOption(\"real\")],\n\t\tchoices: [{\n\t\t\twhen: { storage: \"real\" },\n\t\t\ttype: \"Real\"\n\t\t}]\n\t},\n\tDecimal: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"An exact decimal number read as decimal text such as \\\"12.50\\\", stored as SQLite text. It can be compared for equality but not ordered or summed.\",\n\t\targs: [storageOption(\"text\")],\n\t\tchoices: [{\n\t\t\twhen: { storage: \"text\" },\n\t\t\ttype: \"DecimalString\"\n\t\t}]\n\t},\n\tString: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"Text, stored as SQLite text.\",\n\t\targs: [storageOption(\"text\")],\n\t\tchoices: [{\n\t\t\twhen: { storage: \"text\" },\n\t\t\ttype: \"Text\"\n\t\t}]\n\t},\n\tBoolean: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"A boolean, stored as SQLite integer: 0 for false and 1 for true, as SQLite writes FALSE and TRUE.\",\n\t\targs: [storageOption(\"integer\")],\n\t\tchoices: [{\n\t\t\twhen: { storage: \"integer\" },\n\t\t\ttype: \"IntegerBoolean\"\n\t\t}]\n\t},\n\tBytes: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"Binary data read as a Uint8Array, stored as SQLite blob.\",\n\t\targs: [storageOption(\"blob\")],\n\t\tchoices: [{\n\t\t\twhen: { storage: \"blob\" },\n\t\t\ttype: \"Blob\"\n\t\t}]\n\t},\n\tJson: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"A JSON value, serialized and stored as SQLite text.\",\n\t\targs: [storageOption(\"text\")],\n\t\tchoices: [{\n\t\t\twhen: { storage: \"text\" },\n\t\t\ttype: \"PlainJson\"\n\t\t}]\n\t}\n};\n/**\n* The explicit types' former names, kept for one release line as deprecated aliases. Each gives the same codec as its replacement, and the PSL interpreter warns where one is written (ADR 257).\n*/\nconst sqliteDeprecatedScalarTypes = { BigIntNumber: {\n\t...integerNumber,\n\tdeprecated: { replacement: \"IntegerNumber\" }\n} };\n/**\n* SQLite's scalar types other than the date and time types: the explicit types, the convenience types and the deprecated aliases. `sqliteScalarTypeConstructors` adds the date and time types.\n*/\nconst sqliteScalarAuthoringTypes = {\n\t...sqliteExplicitScalarTypes,\n\t...sqliteConvenienceScalarTypes,\n\t...sqliteDeprecatedScalarTypes\n};\n/**\n* The explicit date and time types. SQLite has no date or time column type, so each is stored as text, in one form for each value, and its name says what the text holds and what the application reads. ADR 315.\n*/\nconst sqliteDateTimeTypeConstructors = {\n\tDatetimeJsDate: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"An instant stored as SQLite text, 2024-01-01T00:00:00.000Z, and represented as a JavaScript Date.\",\n\t\toutput: { codecId: SQLITE_DATETIME_CODEC_ID }\n\t},\n\tDatetimeTemporal: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"An instant stored as SQLite text, 2024-01-01T00:00:00.000Z, and represented as Temporal.Instant.\",\n\t\toutput: { codecId: SQLITE_DATETIME_TEMPORAL_CODEC_ID }\n\t},\n\tDatetimeString: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"An instant stored as SQLite text and represented as that text, 2024-01-01T00:00:00.000Z, the instant in UTC.\",\n\t\toutput: { codecId: SQLITE_DATETIME_STRING_CODEC_ID }\n\t},\n\tDateString: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A calendar date stored as SQLite text and represented as that text, 2024-02-29.\",\n\t\toutput: { codecId: SQLITE_DATE_STRING_CODEC_ID }\n\t},\n\tDateTemporal: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A calendar date stored as SQLite text, 2024-02-29, and represented as Temporal.PlainDate.\",\n\t\toutput: { codecId: SQLITE_DATE_TEMPORAL_CODEC_ID }\n\t},\n\tTimeString: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A time of day stored as SQLite text and represented as that text, 09:30:00.000, always with three fraction digits.\",\n\t\toutput: { codecId: SQLITE_TIME_STRING_CODEC_ID }\n\t},\n\tTimeTemporal: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A time of day stored as SQLite text, 09:30:00.000, and represented as Temporal.PlainTime.\",\n\t\toutput: { codecId: SQLITE_TIME_TEMPORAL_CODEC_ID }\n\t},\n\tDurationString: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A length of time stored as SQLite text and represented as the ISO 8601 duration it was written as, such as PT1H30M.\",\n\t\toutput: { codecId: SQLITE_DURATION_STRING_CODEC_ID }\n\t}\n};\nconst textStorage = storageOption(\"text\");\n/**\n* The convenience date and time types. Each is a type choice: its `as` argument chooses the explicit type it becomes. Every SQLite date and time type is stored as text, so `storage` is text only. ADR 279, ADR 315.\n*/\nconst sqliteConvenienceDateTimeTypes = {\n\tDateTime: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"A moment in time, stored as SQLite text. `as` is what the application reads: jsDate (a JavaScript Date), temporal (Temporal.Instant) or string, such as \\\"2024-01-01T00:00:00.000Z\\\".\",\n\t\targs: [{\n\t\t\tkind: \"option\",\n\t\t\tname: \"as\",\n\t\t\tvalues: [\n\t\t\t\t\"jsDate\",\n\t\t\t\t\"temporal\",\n\t\t\t\t\"string\"\n\t\t\t],\n\t\t\tdefault: \"jsDate\",\n\t\t\toptional: true\n\t\t}, textStorage],\n\t\tchoices: [\n\t\t\t{\n\t\t\t\twhen: {\n\t\t\t\t\tas: \"jsDate\",\n\t\t\t\t\tstorage: \"text\"\n\t\t\t\t},\n\t\t\t\ttype: \"DatetimeJsDate\"\n\t\t\t},\n\t\t\t{\n\t\t\t\twhen: {\n\t\t\t\t\tas: \"temporal\",\n\t\t\t\t\tstorage: \"text\"\n\t\t\t\t},\n\t\t\t\ttype: \"DatetimeTemporal\"\n\t\t\t},\n\t\t\t{\n\t\t\t\twhen: {\n\t\t\t\t\tas: \"string\",\n\t\t\t\t\tstorage: \"text\"\n\t\t\t\t},\n\t\t\t\ttype: \"DatetimeString\"\n\t\t\t}\n\t\t]\n\t},\n\tDate: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"A calendar date, stored as SQLite text. `as` is what the application reads: string, such as \\\"2024-02-29\\\", or temporal (Temporal.PlainDate).\",\n\t\targs: [{\n\t\t\tkind: \"option\",\n\t\t\tname: \"as\",\n\t\t\tvalues: [\"string\", \"temporal\"],\n\t\t\tdefault: \"string\",\n\t\t\toptional: true\n\t\t}, textStorage],\n\t\tchoices: [{\n\t\t\twhen: {\n\t\t\t\tas: \"string\",\n\t\t\t\tstorage: \"text\"\n\t\t\t},\n\t\t\ttype: \"DateString\"\n\t\t}, {\n\t\t\twhen: {\n\t\t\t\tas: \"temporal\",\n\t\t\t\tstorage: \"text\"\n\t\t\t},\n\t\t\ttype: \"DateTemporal\"\n\t\t}]\n\t},\n\tTime: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"A time of day, stored as SQLite text. `as` is what the application reads: string, such as \\\"09:30:00.000\\\", or temporal (Temporal.PlainTime).\",\n\t\targs: [{\n\t\t\tkind: \"option\",\n\t\t\tname: \"as\",\n\t\t\tvalues: [\"string\", \"temporal\"],\n\t\t\tdefault: \"string\",\n\t\t\toptional: true\n\t\t}, textStorage],\n\t\tchoices: [{\n\t\t\twhen: {\n\t\t\t\tas: \"string\",\n\t\t\t\tstorage: \"text\"\n\t\t\t},\n\t\t\ttype: \"TimeString\"\n\t\t}, {\n\t\t\twhen: {\n\t\t\t\tas: \"temporal\",\n\t\t\t\tstorage: \"text\"\n\t\t\t},\n\t\t\ttype: \"TimeTemporal\"\n\t\t}]\n\t},\n\tDuration: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"A length of time, stored as SQLite text. `as` is what the application reads: string, an ISO 8601 duration such as \\\"PT1H30M\\\".\",\n\t\targs: [{\n\t\t\tkind: \"option\",\n\t\t\tname: \"as\",\n\t\t\tvalues: [\"string\"],\n\t\t\tdefault: \"string\",\n\t\t\toptional: true\n\t\t}, textStorage],\n\t\tchoices: [{\n\t\t\twhen: {\n\t\t\t\tas: \"string\",\n\t\t\t\tstorage: \"text\"\n\t\t\t},\n\t\t\ttype: \"DurationString\"\n\t\t}]\n\t}\n};\n/**\n* The scalar types, the explicit date and time types and the convenience date and time types. The target contributes them, so PSL and the TypeScript builder's `type.*` see the same names.\n*/\nconst sqliteScalarTypeConstructors = {\n\t...sqliteScalarAuthoringTypes,\n\t...sqliteDateTimeTypeConstructors,\n\t...sqliteConvenienceDateTimeTypes\n};\nconst sqliteTargetDescriptorMeta = {\n\t...sqliteTargetDescriptorMetaRuntime,\n\tdefaultNamespaceId: UNBOUND_NAMESPACE_ID,\n\tsupportsNamespaces: false,\n\tdisplayName: \"SQLite\",\n\tauthoring: {\n\t\ttype: {\n\t\t\t...sqliteScalarTypeConstructors,\n\t\t\t...sqliteAuthoringTypes\n\t\t},\n\t\tdataTypes: sqliteDataTypeEntries(),\n\t\ttextDataTypes: sqliteTextDataTypes\n\t},\n\tgeneratorFunctions: sqliteGeneratorFunctions,\n\tcontrolMutationDefaults: {\n\t\tdefaultFunctionRegistry: /* @__PURE__ */ new Map(),\n\t\tgeneratorDescriptors: sqliteGeneratorDescriptors\n\t}\n};\n//#endregion\nexport { sqliteScalarTypeConstructors as n, sqliteTargetDescriptorMeta as t };\n\n//# sourceMappingURL=descriptor-meta-DEr1ALec.mjs.map"],"mappings":";;;;;;;;;;AAUA,MAAM,uBAAuB;CAC5B,GAAmB,0CAA0B,EAAE,UAAU,cAAc,CAAC;CACxE,UAA0B,oCAAoB,EAAE,SAAS,oBAAoB,GAAG,mBAAmB;AACpG;;AAIA,MAAM,wBAAwB;EAC5B,2BAA2B;EAC3B,oCAAoC;EACpC,kCAAkC;EAClC,8BAA8B;EAC9B,gCAAgC;EAChC,8BAA8B;EAC9B,gCAAgC;AAClC;AACA,MAAM,2BAA2B;CAChC,GAAG,qCAAqC,EAAE,SAAS,cAAc,GAAG,CAAC;CACrE;EACC,MAAM;EACN,UAAU,OAAO,QAAQ,qBAAqB,CAAC,CAAC,KAAK,CAAC,SAAS,iBAAiB,uBAAuB;GACtG,UAAU,CAAC,OAAO;GAClB;EACD,CAAC,CAAC;CACH;CACA,GAAG,4BAA4B,EAAE,MAAM,CAAC,oBAAoB,EAAE,CAAC;AAChE;;AAEA,MAAM,6BAA6B,CAAC,EAAE,IAAI,2BAA2B,GAAG,GAAG,oBAAoB,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC;AAGxH,MAAM,gBAAgB;CACrB,MAAM;CACN,eAAe;CACf,QAAQ,EAAE,SAAS,wBAAwB;AAC5C;;;;AAIA,MAAM,4BAA4B;CACjC,eAAe;CACf,eAAe;EACd,MAAM;EACN,eAAe;EACf,QAAQ,EAAE,SAAS,uBAAuB;CAC3C;CACA,MAAM;EACL,MAAM;EACN,eAAe;EACf,QAAQ,EAAE,SAAS,qBAAqB;CACzC;CACA,eAAe;EACd,MAAM;EACN,eAAe;EACf,QAAQ,EAAE,SAAS,wBAAwB;CAC5C;CACA,MAAM;EACL,MAAM;EACN,eAAe;EACf,QAAQ,EAAE,SAAS,qBAAqB;CACzC;CACA,gBAAgB;EACf,MAAM;EACN,eAAe;EACf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pB,oBAAoB;CACpB,aAAa;CACb,WAAW;EACV,MAAM;GACL,GAAG;GACH,GAAG;EACJ;EACA,WAAW,sBAAsB;EACjC,eAAe;CAChB;CACA,oBAAoB;CACpB,yBAAyB;EACxB,yCAAyC,IAAI,IAAI;EACjD,sBAAsB;CACvB;AACD"}
|
package/dist/driver__runtime.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as validateSqliteIsolationLevel } from "./runtime-
|
|
1
|
+
import { i as validateSqliteIsolationLevel } from "./runtime-C43fN_cJ.mjs";
|
|
2
2
|
import { a as sqliteDriverDescriptorMeta, i as safeIntegersAsNumbers, n as normalizeSqliteError, o as sqliteParams, r as prepareExact, s as wasClosedByDriver, t as closeDatabase } from "./descriptor-meta-CkiPlqDS-n3hDP01X.mjs";
|
|
3
3
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
4
4
|
import { InternalError } from "@prisma/orm-framework/utils/internal-error";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as buildTargetDetails } from "./planner-target-details-Daaeo8s9-BGAN4JVc.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { M as step } from "./op-factory-call-DjbjegGT-DsQBI5Ll.mjs";
|
|
3
3
|
import { col as col$1, fn as fn$1, foreignKey, lit as lit$1, primaryKey, unique } from "@prisma/orm-family-sql/relational-core/contract-free";
|
|
4
4
|
import { placeholder } from "@prisma/orm-framework/errors/migration";
|
|
5
5
|
import { MigrationCLI } from "@prisma/orm-toolchain/cli/migration-cli";
|
|
@@ -45,4 +45,4 @@ function rawSql(op) {
|
|
|
45
45
|
//#endregion
|
|
46
46
|
export { foreignKey as a, primaryKey as c, unique as d, fn$1 as i, rawSql as l, col$1 as n, lit$1 as o, dataTransform as r, placeholder as s, MigrationCLI as t, sql as u };
|
|
47
47
|
|
|
48
|
-
//# sourceMappingURL=migration-
|
|
48
|
+
//# sourceMappingURL=migration-BYRMZiPU.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migration-
|
|
1
|
+
{"version":3,"file":"migration-BYRMZiPU.mjs","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/migration.mjs"],"sourcesContent":["import { t as SqliteMigration } from \"./sqlite-migration-Cmzykasm.mjs\";\nimport { j as step } from \"./op-factory-call-DjbjegGT.mjs\";\nimport { t as buildTargetDetails } from \"./planner-target-details-Daaeo8s9.mjs\";\nimport { placeholder } from \"@internal/errors/migration\";\nimport { col, fn, foreignKey, lit, primaryKey, unique } from \"@internal/sql-relational-core/contract-free\";\nimport { MigrationCLI } from \"@internal/cli/migration-cli\";\nimport { sql } from \"@internal/sql-contract/sql-expression\";\n//#region src/core/migrations/operations/data-transform.ts\n/**\n* User-facing `dataTransform` factory for the SQLite migration authoring\n* surface. Invoked directly inside a `migration.ts` file to supply a\n* user-authored SQL statement that runs with operation class `'data'`.\n*\n* Typical use: the planner emits a `DataTransformCall` stub when a NOT NULL\n* tightening requires a backfill. The rendered `migration.ts` exposes the\n* backfill as a `placeholder(\"…\")` slot the user fills in with an\n* `UPDATE … WHERE col IS NULL` statement. The filled-in `dataTransform(...)`\n* invocation returns a runnable operation the runner executes before the\n* subsequent recreate-table op copies data into the tightened schema.\n*/\nfunction dataTransform(opts) {\n\treturn {\n\t\tid: opts.id,\n\t\tlabel: opts.label,\n\t\tsummary: opts.description,\n\t\toperationClass: \"data\",\n\t\ttarget: {\n\t\t\tid: \"sqlite\",\n\t\t\tdetails: buildTargetDetails(\"table\", opts.table)\n\t\t},\n\t\tprecheck: [],\n\t\texecute: [step(opts.description, opts.run())],\n\t\tpostcheck: []\n\t};\n}\n//#endregion\n//#region src/core/migrations/operations/raw.ts\n/**\n* Identity factory for an already-materialized\n* `SqlMigrationPlanOperation<SqlitePlanTargetDetails>`. Mirrors the Postgres\n* `rawSql` factory: the planner uses this to carry ops produced by SQL-family\n* paths (codec lifecycle hooks, raw-SQL escape hatches) alongside structured\n* call IR without reverse-engineering their shape.\n*/\nfunction rawSql(op) {\n\treturn op;\n}\n//#endregion\nexport { SqliteMigration as Migration, MigrationCLI, col, dataTransform, fn, foreignKey, lit, placeholder, primaryKey, rawSql, sql, unique };\n\n//# sourceMappingURL=migration.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;AAoBA,SAAS,cAAc,MAAM;CAC5B,OAAO;EACN,IAAI,KAAK;EACT,OAAO,KAAK;EACZ,SAAS,KAAK;EACd,gBAAgB;EAChB,QAAQ;GACP,IAAI;GACJ,SAAS,mBAAmB,SAAS,KAAK,KAAK;EAChD;EACA,UAAU,CAAC;EACX,SAAS,CAAC,KAAK,KAAK,aAAa,KAAK,IAAI,CAAC,CAAC;EAC5C,WAAW,CAAC;CACb;AACD;;;;;;;;AAUA,SAAS,OAAO,IAAI;CACnB,OAAO;AACR"}
|
package/dist/{op-factory-call-2IWWs4es-CajfeAMX.mjs → op-factory-call-DjbjegGT-DsQBI5Ll.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { l as sqliteError } from "./errors-DxbvEzQp-CeTjoGtL.mjs";
|
|
2
2
|
import { a as tableExistsAst, i as indexExistsAst, n as columnNameTakenAst, o as tableNameTakenAst, r as createTable, t as columnExistsAst } from "./ddl-CgkyurGo-B2o4mSIT.mjs";
|
|
3
3
|
import { n as escapeLiteral, r as quoteIdentifier, t as SQLITE_QUOTING } from "./sql-utils-CHBxMmv--Dl7wl7n3.mjs";
|
|
4
|
-
import { r as stripOuterParens } from "./default-normalizer-
|
|
4
|
+
import { r as stripOuterParens } from "./default-normalizer-BANdMVGr-BiUHyBX1.mjs";
|
|
5
5
|
import { t as buildTargetDetails } from "./planner-target-details-Daaeo8s9-BGAN4JVc.mjs";
|
|
6
6
|
import { DdlColumn, FunctionColumnDefault, LiteralColumnDefault, opaqueSql } from "@prisma/orm-family-sql/relational-core/ast";
|
|
7
7
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
@@ -17,7 +17,7 @@ import { RelationalSchemaNodeKind, sqlColumnTypesEqual } from "@prisma/orm-famil
|
|
|
17
17
|
import { errorMigrationOperationOptionRemoved, errorUnfilledPlaceholder, unfilledPlaceholderOperation } from "@prisma/orm-framework/errors/migration";
|
|
18
18
|
import { REFERENTIAL_ACTION_SQL } from "@prisma/orm-family-sql/contract/referential-action-sql";
|
|
19
19
|
import { TsExpression, jsonToTsSource, tsArraySource, tsObjectSource, tsQuotedTextSource } from "@prisma/orm-framework/ts-render";
|
|
20
|
-
//#region ../../../3-targets/sqlite/1-target/dist/op-factory-call-
|
|
20
|
+
//#region ../../../3-targets/sqlite/1-target/dist/op-factory-call-DjbjegGT.mjs
|
|
21
21
|
function foldAsciiLetters(identifier) {
|
|
22
22
|
return identifier.replace(/[A-Z]/g, (letter) => letter.toLowerCase());
|
|
23
23
|
}
|
|
@@ -694,10 +694,13 @@ function storageClassCheck(tableName, column) {
|
|
|
694
694
|
sql: `SELECT NOT EXISTS (SELECT 1 FROM ${quoteIdentifier(tableName)} WHERE typeof(${quoteIdentifier(column.name)}) NOT IN (${classes}))`
|
|
695
695
|
};
|
|
696
696
|
}
|
|
697
|
-
|
|
697
|
+
/** What a step's `meta.conversionCopy` holds in an `ops.json`. */
|
|
698
|
+
const ConversionCopyJson = type({
|
|
699
|
+
"+": "reject",
|
|
698
700
|
table: "string",
|
|
699
701
|
expressions: "Record<string, string>"
|
|
700
|
-
}
|
|
702
|
+
});
|
|
703
|
+
const ConversionCopyMeta = type({ conversionCopy: ConversionCopyJson });
|
|
701
704
|
/**
|
|
702
705
|
* The table a rebuild's copy step reads and the copy expression of each column its conversions
|
|
703
706
|
* convert, when the step converts any: an error of the step may be an error of one of them.
|
|
@@ -2036,6 +2039,6 @@ function renderPostcheck(postcheck) {
|
|
|
2036
2039
|
}));
|
|
2037
2040
|
}
|
|
2038
2041
|
//#endregion
|
|
2039
|
-
export {
|
|
2042
|
+
export { sqliteDefaultToDdlColumnDefault as A, buildRecreateSummary as C, isSqliteOpFactoryCall as D, indexReplacementCalls as E, step as M, rebuiltTableName as O, buildRecreatePostchecks as S, holdingStoredValue as T, RenameColumnCall as _, DataTransformCall as a, ReplaceStoredValueCall as b, DropIndexCall as c, INLINE_AUTOINCREMENT_PRIMARY_KEY as d, MIGRATION_MODULE as f, RemoveStoredValueCall as g, RemoveStoredKeyCall as h, CreateTableCall as i, sqliteIdentifiersCollide as j, renameTableSteps as k, DropTableCall as l, RecreateTableCall as m, ConversionCopyJson as n, DeleteRowsCall as o, RawSqlCall as p, CreateIndexCall as r, DropColumnCall as s, AddColumnCall as t, FillStoredKeyCall as u, RenameStoredKeyCall as v, conversionCopyOf as w, affinityStorageClasses as x, RenameTableCall as y };
|
|
2040
2043
|
|
|
2041
|
-
//# sourceMappingURL=op-factory-call-
|
|
2044
|
+
//# sourceMappingURL=op-factory-call-DjbjegGT-DsQBI5Ll.mjs.map
|