@prisma/orm-target-mysql 8.0.0-rc.23-dev.14 → 8.0.0-rc.24-dev.2
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__runtime.mjs +4 -4
- package/dist/adapter__runtime.mjs.map +1 -1
- package/dist/{control-BBuy6yt5.mjs → control-DNuE7H2C.mjs} +2 -2
- package/dist/{control-BBuy6yt5.mjs.map → control-DNuE7H2C.mjs.map} +1 -1
- package/dist/{date-time-now-generators-DY-8Bodc-DpQ5Se1u.mjs → date-time-now-generators-BKakW3gd-CIFPuRdM.mjs} +3 -7
- package/dist/date-time-now-generators-BKakW3gd-CIFPuRdM.mjs.map +1 -0
- package/dist/{descriptor-meta-CsMPRsxp-QVV7vNY8.mjs → descriptor-meta-BF6YvSag-ChHHvlHc.mjs} +3 -3
- package/dist/{descriptor-meta-CsMPRsxp-QVV7vNY8.mjs.map → descriptor-meta-BF6YvSag-ChHHvlHc.mjs.map} +1 -1
- package/dist/driver.mjs +1 -1
- package/dist/driver__runtime.mjs +1 -1
- package/dist/{pack-COnjX17N.d.mts → pack-CuB4QWcE.d.mts} +1 -2
- package/dist/{pack-COnjX17N.d.mts.map → pack-CuB4QWcE.d.mts.map} +1 -1
- package/dist/{runtime-sPIp-JgC.d.mts → runtime-CbqytTbM.d.mts} +13 -2
- package/dist/{runtime-sPIp-JgC.d.mts.map → runtime-CbqytTbM.d.mts.map} +1 -1
- package/dist/{runtime-BGF0cSIt.mjs → runtime-DB0w8R7i.mjs} +40 -8
- package/dist/runtime-DB0w8R7i.mjs.map +1 -0
- package/dist/runtime-DUDdsFyy.mjs +37 -0
- package/dist/runtime-DUDdsFyy.mjs.map +1 -0
- package/dist/target.d.mts +3 -3
- package/dist/target.mjs +5 -4
- package/dist/target__control.mjs +2 -2
- package/dist/target__pack.d.mts +1 -1
- package/dist/target__pack.mjs +1 -1
- package/dist/target__runtime.d.mts +2 -2
- package/dist/target__runtime.mjs +3 -16
- package/package.json +10 -10
- package/dist/date-time-now-generators-DY-8Bodc-DpQ5Se1u.mjs.map +0 -1
- package/dist/runtime-BGF0cSIt.mjs.map +0 -1
- package/dist/target__runtime.mjs.map +0 -1
|
@@ -2,7 +2,7 @@ import { l as MYSQL_INT_CODEC_ID, t as MYSQL_BIGINT_CODEC_ID, u as MYSQL_TEXT_CO
|
|
|
2
2
|
import { s as mysqlError } from "./errors-Cng94tYg-DTH51xWG.mjs";
|
|
3
3
|
import { n as quoteIdentifier, t as escapeLiteral } from "./sql-utils-Cmv_TVa8-CNW3UmfQ.mjs";
|
|
4
4
|
import { a as mysqlCodecDescriptorRegistry, t as assembleMysqlCodecRegistry } from "./codecs-wVJlFapM.mjs";
|
|
5
|
-
import { t as mysqlNowGenerators } from "./date-time-now-generators-
|
|
5
|
+
import { t as mysqlNowGenerators } from "./date-time-now-generators-BKakW3gd-CIFPuRdM.mjs";
|
|
6
6
|
import { t as tokenizeMysqlSql } from "./sql-utils-BE8tDXHs.mjs";
|
|
7
7
|
import { r as mysqlAdapterDescriptorMeta, t as mysqlAdapterCapabilities } from "./descriptor-meta-pVdZBI-g-BJN4T_on.mjs";
|
|
8
8
|
import { r as readMarkerResult } from "./marker-read-D1hp62hF-3-4fEgDD.mjs";
|
|
@@ -291,8 +291,8 @@ function renderOperation(expr, ctx) {
|
|
|
291
291
|
return arg === void 0 ? "" : renderExpr(arg, ctx);
|
|
292
292
|
});
|
|
293
293
|
}
|
|
294
|
-
function renderSubquery(expr, ctx) {
|
|
295
|
-
if (expr.query.projection.length !==
|
|
294
|
+
function renderSubquery(expr, ctx, columns = 1) {
|
|
295
|
+
if (expr.query.projection.length !== columns) throw structuredError("RUNTIME.AST_INVALID", columns === 1 ? "Subquery expressions must project exactly one column" : `A subquery compared with a row value of ${columns} columns must project ${columns} columns`, { meta: { node: "subquery" } });
|
|
296
296
|
return `(${renderSelect(expr.query, ctx)})`;
|
|
297
297
|
}
|
|
298
298
|
/** Whether an operand must be parenthesised before an operator is written after it. A new expression kind fails to compile here until someone decides. */
|
|
@@ -347,7 +347,7 @@ function renderBinary(expr, ctx) {
|
|
|
347
347
|
if (expr.op === "notIn") return "TRUE";
|
|
348
348
|
}
|
|
349
349
|
const left = grouped(expr.left, ctx);
|
|
350
|
-
const right = renderExpr(expr.right, ctx);
|
|
350
|
+
const right = expr.right.kind === "subquery" && expr.left.kind === "list" ? renderSubquery(expr.right, ctx, expr.left.values.length) : renderExpr(expr.right, ctx);
|
|
351
351
|
if (expr.op === "isDistinctFrom") return `NOT (${left} <=> ${right})`;
|
|
352
352
|
return `${left} ${BINARY_OPERATORS[expr.op]} ${right}`;
|
|
353
353
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter__runtime.mjs","names":["#codecs"],"sources":["../../../../3-targets/mysql/1-mysql/2-adapter/dist/runtime.mjs"],"sourcesContent":["import { r as mysqlAdapterCapabilities, t as mysqlAdapterDescriptorMeta } from \"./descriptor-meta-pVdZBI-g.mjs\";\nimport { r as readMarkerResult } from \"./marker-read-D1hp62hF.mjs\";\nimport { assembleMysqlCodecRegistry, mysqlCodecDescriptorRegistry } from \"@internal/target-mysql/codecs\";\nimport { APP_SPACE_ID } from \"@internal/framework-components/control\";\nimport { collectOrderedParamRefs, isDdlNode } from \"@internal/sql-relational-core/ast\";\nimport { mysqlError } from \"@internal/target-mysql/errors\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { escapeLiteral, quoteIdentifier, tokenizeMysqlSql } from \"@internal/target-mysql/sql-utils\";\nimport { timestampNowRuntimeGenerator } from \"@internal/family-sql/runtime\";\nimport { mysqlNowGenerators } from \"@internal/target-mysql/runtime\";\nimport { MYSQL_BIGINT_CODEC_ID, MYSQL_INT_CODEC_ID, MYSQL_TEXT_CODEC_ID } from \"@internal/target-mysql/codec-ids\";\nimport { InternalError, assertNever } from \"@internal/utils/internal-error\";\n//#region src/core/raw-codec-inferer.ts\nconst INT_MIN = -(2 ** 31);\nconst INT_MAX = 2 ** 31 - 1;\nfunction refuse(value) {\n\tthrow structuredError(\"RUNTIME.RAW_SQL_UNSUPPORTED_INTERPOLATION\", \"MySQL has no codec for this JS value in raw SQL: wrap it in `param(...)` with an explicit codec\", { meta: { valueType: typeof value } });\n}\n/** The codec of a bare value interpolated into `fns.raw` or the raw lane on a MySQL client: integers, bigints and strings. */\nconst mysqlRawCodecInferer = { inferCodec(value) {\n\tswitch (typeof value) {\n\t\tcase \"number\":\n\t\t\tif (!Number.isSafeInteger(value)) return refuse(value);\n\t\t\treturn value >= INT_MIN && value <= INT_MAX ? MYSQL_INT_CODEC_ID : refuse(value);\n\t\tcase \"bigint\": return MYSQL_BIGINT_CODEC_ID;\n\t\tcase \"string\": return MYSQL_TEXT_CODEC_ID;\n\t\tdefault: return refuse(value);\n\t}\n} };\n//#endregion\n//#region src/core/placeholders.ts\n/** Refuses a lowered statement unless every placeholder is a numbered `?N` naming one of its parameters and every parameter has a placeholder. */\nfunction assertPlaceholdersMatchParams(sql, paramCount) {\n\tconst tokens = tokenizeMysqlSql(sql).filter((token) => token.kind === \"placeholder\");\n\tconst placeholders = tokens.map((token) => token.text);\n\tconst numbers = tokens.map((token) => token.number ?? NaN);\n\tif (numbers.every((number) => number >= 1 && number <= paramCount) && new Set(numbers).size === paramCount) return;\n\tthrow structuredError(\"RUNTIME.PARAM_PLACEHOLDER_MISMATCH\", `The lowered MySQL statement writes placeholders ${JSON.stringify(placeholders)} for ${paramCount} parameter(s); each parameter must be written as its own numbered placeholder, and no other placeholder may appear.`, {\n\t\twhy: \"A placeholder that does not match a parameter binds a value to the wrong place in the statement, or leaves a value unbound.\",\n\t\tfix: \"Pass values into raw SQL through interpolation rather than writing a `?` in the SQL text.\",\n\t\tmeta: {\n\t\t\tplaceholders,\n\t\t\tparams: paramCount\n\t\t}\n\t});\n}\n//#endregion\n//#region src/core/sql-renderer.ts\n/** The name an upsert gives the row it proposes, which its update reads as `new`.`column`; the ORM writes that row as `excluded`, as Postgres names it. */\nconst PROPOSED_ROW = \"new\";\n/**\n* Raises `group_concat_max_len` for this statement only, past any result a connection can send, so an ordered include does not depend on how the driver set up its session. MySQL takes `SET_VAR` only on the outermost `SELECT`.\n*/\nconst GROUP_CONCAT_HINT = \"/*+ SET_VAR(group_concat_max_len = 4294967295) */\";\n/** MySQL's documented way to write an `OFFSET` with no `LIMIT`: the largest row count it takes. */\nconst NO_LIMIT = \"18446744073709551615\";\nfunction nodeKind(value) {\n\treturn typeof value === \"object\" && value !== null && \"kind\" in value ? String(value.kind) : \"unknown\";\n}\nfunction unsupported(feature, message) {\n\treturn mysqlError(\"RUNTIME.AST_UNSUPPORTED\", message, { meta: {\n\t\ttarget: \"mysql\",\n\t\tfeature\n\t} });\n}\n/**\n* Lowers a query AST to MySQL SQL. Each param is written as `?N`, N being its position in `collectOrderedParamRefs`, the order the runtime encodes and middleware edits params in; a param written twice is bound once. The driver fills the placeholders.\n*/\nfunction renderMysqlSql(ast, contract, codecs) {\n\tconst placeholderNumbers = /* @__PURE__ */ new Map();\n\tconst params = collectOrderedParamRefs(ast).map((ref, index) => {\n\t\tplaceholderNumbers.set(ref, index + 1);\n\t\treturn ref.kind === \"prepared-param-ref\" ? {\n\t\t\tkind: \"bind\",\n\t\t\tname: ref.name\n\t\t} : {\n\t\t\tkind: \"literal\",\n\t\t\tvalue: ref.value\n\t\t};\n\t});\n\tconst ctx = {\n\t\tcontract,\n\t\tcodecs,\n\t\tplaceholderNumbers,\n\t\tuses: { groupConcat: false }\n\t};\n\tconst rendered = renderStatement(ast, ctx);\n\tconst sql = ctx.uses.groupConcat ? withGroupConcatHint(ast, rendered) : rendered;\n\tassertPlaceholdersMatchParams(sql, params.length);\n\treturn Object.freeze({\n\t\tsql,\n\t\tparams\n\t});\n}\n/** Puts `GROUP_CONCAT_HINT` on the outermost `SELECT`; a statement without one would leave `GROUP_CONCAT` at the session's limit, which can cut an array after an element and still read as JSON, so it is refused. */\nfunction withGroupConcatHint(ast, rendered) {\n\tif (ast.kind !== \"select\" || !rendered.startsWith(\"SELECT \")) throw unsupported(\"ordered-array-outside-select\", \"MySQL can build an ordered JSON array only in a SELECT statement, whose outermost SELECT carries the hint that raises group_concat_max_len\");\n\treturn `SELECT ${GROUP_CONCAT_HINT} ${rendered.slice(7)}`;\n}\nfunction renderStatement(ast, ctx) {\n\tswitch (ast.kind) {\n\t\tcase \"select\": return renderSelect(ast, ctx);\n\t\tcase \"raw-query\": return renderParts(ast.parts, ctx);\n\t\tcase \"insert\": return renderInsert(ast, ctx);\n\t\tcase \"update\": return renderUpdate(ast, ctx);\n\t\tcase \"delete\": return renderDelete(ast, ctx);\n\t\tdefault: throw new InternalError(`Unsupported AST node kind: ${nodeKind(ast)}`);\n\t}\n}\nfunction invalid(node, message) {\n\treturn mysqlError(\"RUNTIME.AST_INVALID\", message, { meta: { node } });\n}\n/** MySQL has no `RETURNING`: the SQL family's ORM reads written rows back with a select when the contract does not report `returning`. */\nfunction refuseReturning(returning, what) {\n\tif (returning !== void 0 && returning.length > 0) throw unsupported(\"returning\", `MySQL cannot return the rows ${what} writes; it has no RETURNING`);\n}\nfunction renderInsertValue(value, ctx) {\n\tif (value === void 0 || value.kind === \"default-value\") return \"DEFAULT\";\n\treturn renderExpr(value, ctx);\n}\n/**\n* An insert, with the bare table name: MySQL's `INSERT` takes no alias, so a column of the table is qualified by its name. A row without a value for a column gets `DEFAULT`. An upsert names its proposed row `new` and updates the existing row on any duplicate key. MySQL cannot limit `ON DUPLICATE KEY UPDATE` to named conflict columns, so the adapter does not report `insertOnConflictTarget` and an upsert that names them is refused. Skipping a conflicting row is refused: `INSERT IGNORE` also hides foreign-key and `NOT NULL` errors.\n*/\nfunction renderInsert(ast, ctx) {\n\trefuseReturning(ast.returning, \"an insert\");\n\tif (ast.rows.length === 0) throw invalid(\"insert\", \"INSERT requires at least one row\");\n\tconst table = qualifyTable(ast.table, ctx);\n\tconst insertCtx = {\n\t\t...ctx,\n\t\tinsertInto: {\n\t\t\talias: ast.table.alias ?? ast.table.name,\n\t\t\tname: table\n\t\t}\n\t};\n\tconst columns = [...new Set(ast.rows.flatMap((row) => Object.keys(row)))];\n\tconst values = ast.rows.map((row) => `(${columns.map((column) => renderInsertValue(row[column], insertCtx)).join(\", \")})`).join(\", \");\n\tconst insert = `INSERT INTO ${table} (${columns.map(quoteIdentifier).join(\", \")}) VALUES ${values}`;\n\tconst conflict = ast.onConflict;\n\tif (conflict === void 0) return insert;\n\tconst action = conflict.action;\n\tswitch (action.kind) {\n\t\tcase \"do-nothing\": throw unsupported(\"insert-on-conflict-skip\", \"MySQL cannot skip a conflicting row without also hiding other errors: INSERT IGNORE turns foreign-key and NOT NULL errors into warnings\");\n\t\tcase \"do-update-set\": {\n\t\t\tif (conflict.columns.length > 0) throw unsupported(\"insert-on-conflict-target\", \"MySQL cannot limit ON DUPLICATE KEY UPDATE to named conflict columns: it fires on any unique key\");\n\t\t\tconst assignments = Object.entries(action.set);\n\t\t\tif (assignments.length === 0) throw invalid(\"insert-on-conflict\", \"An upsert requires at least one column to update\");\n\t\t\tconst set = assignments.map(([column, value]) => `${quoteIdentifier(column)} = ${renderExpr(value, insertCtx)}`).join(\", \");\n\t\t\treturn `${insert} AS ${quoteIdentifier(PROPOSED_ROW)} ON DUPLICATE KEY UPDATE ${set}`;\n\t\t}\n\t\tdefault: return assertNever(action, `Unsupported conflict action: ${nodeKind(action)}`);\n\t}\n}\nfunction renderUpdate(ast, ctx) {\n\trefuseReturning(ast.returning, \"an update\");\n\tconst assignments = Object.entries(ast.set);\n\tif (assignments.length === 0) throw invalid(\"update\", \"UPDATE requires at least one column to set\");\n\tconst set = assignments.map(([column, value]) => `${quoteIdentifier(column)} = ${renderExpr(value, ctx)}`).join(\", \");\n\tconst where = ast.where ? ` WHERE ${renderExpr(ast.where, ctx)}` : \"\";\n\treturn `UPDATE ${renderTableSource(ast.table, ctx)} SET ${set}${where}`;\n}\nfunction renderDelete(ast, ctx) {\n\trefuseReturning(ast.returning, \"a delete\");\n\tconst where = ast.where ? ` WHERE ${renderExpr(ast.where, ctx)}` : \"\";\n\treturn `DELETE FROM ${renderTableSource(ast.table, ctx)}${where}`;\n}\nfunction renderLimitOffset(keyword, value, ctx) {\n\tif (value === void 0) return \"\";\n\tif (typeof value === \"number\") return `${keyword} ${value}`;\n\treturn `${keyword} ${value.kind === \"param-ref\" || value.kind === \"prepared-param-ref\" ? placeholder(value, ctx) : renderExpr(value, ctx)}`;\n}\nfunction renderSelect(ast, ctx) {\n\tif (ast.locking !== void 0 && ast.locking.length > 0) throw unsupported(\"locking-clause\", \"Row locks are not supported on MySQL yet, so a select cannot carry a locking clause such as FOR UPDATE\");\n\tif (ast.distinctOn !== void 0 && ast.distinctOn.length > 0) throw unsupported(\"distinct-on\", \"MySQL has no DISTINCT ON\");\n\treturn [\n\t\t`SELECT ${ast.distinct ? \"DISTINCT \" : \"\"}${renderProjection(ast.projection, ctx)}`,\n\t\tast.from === void 0 ? \"\" : `FROM ${renderSource(ast.from, ctx)}`,\n\t\tast.joins?.length ? ast.joins.map((join) => renderJoin(join, ctx)).join(\" \") : \"\",\n\t\tast.where ? `WHERE ${renderExpr(ast.where, ctx)}` : \"\",\n\t\tast.groupBy?.length ? `GROUP BY ${ast.groupBy.map((e) => renderExpr(e, ctx)).join(\", \")}` : \"\",\n\t\tast.having ? `HAVING ${renderExpr(ast.having, ctx)}` : \"\",\n\t\tast.orderBy?.length ? `ORDER BY ${renderOrderByItems(ast.orderBy, ctx)}` : \"\",\n\t\tast.limit === void 0 && ast.offset !== void 0 ? `LIMIT ${NO_LIMIT}` : renderLimitOffset(\"LIMIT\", ast.limit, ctx),\n\t\trenderLimitOffset(\"OFFSET\", ast.offset, ctx)\n\t].filter((part) => part.length > 0).join(\" \");\n}\nfunction renderProjection(projection, ctx) {\n\treturn projection.map((item) => `${renderExpr(item.expr, ctx)} AS ${quoteIdentifier(item.alias)}`).join(\", \");\n}\nfunction qualifyTable(table, ctx) {\n\tif (table.namespaceId === void 0) return quoteIdentifier(table.name);\n\tif (ctx.contract === void 0) throw new InternalError(`Table \"${table.name}\" carries namespace \"${table.namespaceId}\" but no contract was supplied to resolve it`);\n\tconst namespace = ctx.contract.storage.namespaces[table.namespaceId];\n\tif (namespace?.qualifyTable === void 0) throw structuredError(\"RUNTIME.NAMESPACE_UNKNOWN\", `Table \"${table.name}\" references namespace \"${table.namespaceId}\" which the contract does not materialise for SQL rendering`, { meta: {\n\t\ttable: table.name,\n\t\tnamespaceId: table.namespaceId,\n\t\treason: namespace === void 0 ? \"not-present\" : \"not-materialised\"\n\t} });\n\treturn namespace.qualifyTable(table.name);\n}\nfunction renderTableSource(source, ctx) {\n\tconst qualified = qualifyTable(source, ctx);\n\treturn source.alias ? `${qualified} AS ${quoteIdentifier(source.alias)}` : qualified;\n}\nfunction renderSource(source, ctx) {\n\tswitch (source.kind) {\n\t\tcase \"table-source\": return renderTableSource(source, ctx);\n\t\tcase \"derived-table-source\": return `(${renderSelect(source.query, ctx)}) AS ${quoteIdentifier(source.alias)}`;\n\t\tcase \"function-source\": throw unsupported(\"function-source\", `MySQL cannot select from the set-returning function ${source.fn}`);\n\t\tdefault: return assertNever(source, `Unsupported source node kind: ${nodeKind(source)}`);\n\t}\n}\nfunction renderExpr(expr, ctx) {\n\tswitch (expr.kind) {\n\t\tcase \"column-ref\": return renderColumn(expr, ctx);\n\t\tcase \"identifier-ref\": return quoteIdentifier(expr.name);\n\t\tcase \"operation\": return renderOperation(expr, ctx);\n\t\tcase \"subquery\": return renderSubquery(expr, ctx);\n\t\tcase \"aggregate\": return renderAggregate(expr, ctx);\n\t\tcase \"window-func\": return renderWindowFunc(expr, ctx);\n\t\tcase \"function-call\": return renderFunctionCall(expr, ctx);\n\t\tcase \"cast\": return renderCast(expr, ctx);\n\t\tcase \"case\": return renderCase(expr, ctx);\n\t\tcase \"json-object\": return renderJsonObject(expr, ctx);\n\t\tcase \"json-array-agg\": return renderJsonArrayAgg(expr, ctx);\n\t\tcase \"binary\": return renderBinary(expr, ctx);\n\t\tcase \"and\": return expr.exprs.length === 0 ? \"TRUE\" : `(${expr.exprs.map((part) => renderExpr(part, ctx)).join(\" AND \")})`;\n\t\tcase \"or\": return expr.exprs.length === 0 ? \"FALSE\" : `(${expr.exprs.map((part) => renderExpr(part, ctx)).join(\" OR \")})`;\n\t\tcase \"exists\": return `${expr.notExists ? \"NOT \" : \"\"}EXISTS (${renderSelect(expr.subquery, ctx)})`;\n\t\tcase \"null-check\": return renderNullCheck(expr, ctx);\n\t\tcase \"not\": return `NOT (${renderExpr(expr.expr, ctx)})`;\n\t\tcase \"param-ref\":\n\t\tcase \"prepared-param-ref\": return renderParam(expr, ctx);\n\t\tcase \"literal\": return renderLiteral(expr);\n\t\tcase \"list\": return renderList(expr, ctx);\n\t\tcase \"raw-expr\": return renderParts(expr.parts, ctx);\n\t\tdefault: return assertNever(expr, `Unsupported expression node kind: ${nodeKind(expr)}`);\n\t}\n}\n/** Refuses raw SQL text that puts a digit right after an interpolated value: the value's `?N` and the digit would read as one larger placeholder, `?1` and `0` as `?10`. */\nfunction assertNoDigitAfterParam(parts) {\n\tparts.forEach((part, index) => {\n\t\tconst next = parts[index + 1];\n\t\tif (typeof part !== \"string\" && (part.kind === \"param-ref\" || part.kind === \"prepared-param-ref\") && typeof next === \"string\" && /^\\d/.test(next)) throw structuredError(\"RUNTIME.PARAM_PLACEHOLDER_MISMATCH\", \"Raw SQL puts a digit right after an interpolated value, which MySQL lowering would read as part of the value's placeholder\", {\n\t\t\twhy: \"Each value is written as a numbered placeholder, ?N, so a digit that follows it in the SQL text makes a different placeholder: ?1 followed by 0 reads as ?10.\",\n\t\t\tfix: \"Put a space or an operator between the interpolated value and the digit.\",\n\t\t\tmeta: {\n\t\t\t\treason: \"digit-after-value\",\n\t\t\t\tpart: index + 1\n\t\t\t}\n\t\t});\n\t});\n}\nfunction renderParts(parts, ctx) {\n\tassertNoDigitAfterParam(parts);\n\treturn parts.map((part) => {\n\t\tif (typeof part === \"string\") return part;\n\t\tswitch (part.kind) {\n\t\t\tcase \"select\": return renderSelect(part, ctx);\n\t\t\tcase \"insert\": return renderInsert(part, ctx);\n\t\t\tcase \"update\": return renderUpdate(part, ctx);\n\t\t\tcase \"delete\": return renderDelete(part, ctx);\n\t\t\tdefault: return renderExpr(part, ctx);\n\t\t}\n\t}).join(\"\");\n}\nfunction renderColumn(ref, ctx) {\n\tconst column = quoteIdentifier(ref.column);\n\tconst { insertInto } = ctx;\n\tif (insertInto !== void 0) {\n\t\tif (ref.table === \"excluded\") return `${quoteIdentifier(PROPOSED_ROW)}.${column}`;\n\t\tif (ref.table === insertInto.alias) return `${insertInto.name}.${column}`;\n\t}\n\treturn `${quoteIdentifier(ref.table)}.${column}`;\n}\n/**\n* A literal the code wrote: a number, a bigint, a boolean or NULL, such as the ORM's `1` and `fns.and(true, …)`. A `LiteralExpr` does not say where its value came from, and no part of Prisma writes a text, date or JSON literal into a MySQL runtime statement, so those are refused: a value of that kind can only be a caller's, which belongs in a param, sent apart from the SQL.\n*/\nfunction renderLiteral(expr) {\n\tconst { value } = expr;\n\tif (value === null || value === void 0) return \"NULL\";\n\tif (typeof value === \"number\") {\n\t\tif (!Number.isFinite(value)) throw unsupported(\"non-finite-number\", `MySQL has no literal for ${value}`);\n\t\treturn String(value);\n\t}\n\tif (typeof value === \"boolean\") return value ? \"TRUE\" : \"FALSE\";\n\tif (typeof value === \"bigint\") return String(value);\n\tthrow unsupported(\"value-literal\", `MySQL lowering writes only numbers, booleans and NULL as literals; a ${value instanceof Date ? \"date\" : Array.isArray(value) ? \"array\" : typeof value} value must be a param`);\n}\n/** Renders each `{{self}}` and `{{argN}}` where the template writes it. */\nfunction renderOperation(expr, ctx) {\n\treturn expr.lowering.template.replace(/\\{\\{(self|arg(\\d+))\\}\\}/g, (_match, _name, index) => {\n\t\tif (index === void 0) return renderExpr(expr.self, ctx);\n\t\tconst arg = expr.args[Number(index)];\n\t\treturn arg === void 0 ? \"\" : renderExpr(arg, ctx);\n\t});\n}\nfunction renderSubquery(expr, ctx) {\n\tif (expr.query.projection.length !== 1) throw structuredError(\"RUNTIME.AST_INVALID\", \"Subquery expressions must project exactly one column\", { meta: { node: \"subquery\" } });\n\treturn `(${renderSelect(expr.query, ctx)})`;\n}\n/** Whether an operand must be parenthesised before an operator is written after it. A new expression kind fails to compile here until someone decides. */\nfunction needsGrouping(expr) {\n\tswitch (expr.kind) {\n\t\tcase \"operation\":\n\t\tcase \"subquery\": return true;\n\t\tcase \"column-ref\":\n\t\tcase \"identifier-ref\":\n\t\tcase \"aggregate\":\n\t\tcase \"window-func\":\n\t\tcase \"function-call\":\n\t\tcase \"cast\":\n\t\tcase \"case\":\n\t\tcase \"json-object\":\n\t\tcase \"json-array-agg\":\n\t\tcase \"binary\":\n\t\tcase \"and\":\n\t\tcase \"or\":\n\t\tcase \"exists\":\n\t\tcase \"null-check\":\n\t\tcase \"not\":\n\t\tcase \"param-ref\":\n\t\tcase \"prepared-param-ref\":\n\t\tcase \"literal\":\n\t\tcase \"list\":\n\t\tcase \"raw-expr\": return false;\n\t}\n}\nfunction grouped(expr, ctx) {\n\tconst rendered = renderExpr(expr, ctx);\n\treturn needsGrouping(expr) ? `(${rendered})` : rendered;\n}\nfunction renderNullCheck(expr, ctx) {\n\treturn `${grouped(expr.expr, ctx)} ${expr.isNull ? \"IS NULL\" : \"IS NOT NULL\"}`;\n}\nconst BINARY_OPERATORS = {\n\teq: \"=\",\n\tneq: \"<>\",\n\tisNotDistinctFrom: \"<=>\",\n\tgt: \">\",\n\tlt: \"<\",\n\tgte: \">=\",\n\tlte: \"<=\",\n\tlike: \"LIKE\",\n\tin: \"IN\",\n\tnotIn: \"NOT IN\"\n};\nfunction renderBinary(expr, ctx) {\n\tif (expr.right.kind === \"list\" && expr.right.values.length === 0) {\n\t\tif (expr.op === \"in\") return \"FALSE\";\n\t\tif (expr.op === \"notIn\") return \"TRUE\";\n\t}\n\tconst left = grouped(expr.left, ctx);\n\tconst right = renderExpr(expr.right, ctx);\n\tif (expr.op === \"isDistinctFrom\") return `NOT (${left} <=> ${right})`;\n\treturn `${left} ${BINARY_OPERATORS[expr.op]} ${right}`;\n}\nfunction renderList(expr, ctx) {\n\tif (expr.values.length === 0) return \"(NULL)\";\n\treturn `(${expr.values.map((value) => renderExpr(value, ctx)).join(\", \")})`;\n}\nfunction renderAggregate(expr, ctx) {\n\tconst fn = expr.fn.toUpperCase();\n\treturn expr.expr ? `${fn}(${renderExpr(expr.expr, ctx)})` : `${fn}(*)`;\n}\nfunction renderWindowFunc(expr, ctx) {\n\tconst args = expr.args.map((arg) => renderExpr(arg, ctx)).join(\", \");\n\tconst over = [expr.partitionBy?.length ? `PARTITION BY ${expr.partitionBy.map((e) => renderExpr(e, ctx)).join(\", \")}` : \"\", expr.orderBy?.length ? `ORDER BY ${renderOrderByItems(expr.orderBy, ctx)}` : \"\"].filter((part) => part.length > 0).join(\" \");\n\treturn `${expr.fn.toUpperCase()}(${args}) OVER (${over})`;\n}\nfunction renderFunctionCall(expr, ctx) {\n\treturn `${expr.fn}(${expr.args.map((arg) => renderExpr(arg, ctx)).join(\", \")})`;\n}\nfunction renderCast(expr, ctx) {\n\treturn `CAST(${renderExpr(expr.expr, ctx)} AS ${expr.targetType})`;\n}\nfunction renderCase(expr, ctx) {\n\treturn `CASE ${expr.branches.map((branch) => `WHEN ${renderExpr(branch.condition, ctx)} THEN ${renderExpr(branch.value, ctx)}`).join(\" \")}${expr.elseExpr === void 0 ? \"\" : ` ELSE ${renderExpr(expr.elseExpr, ctx)}`} END`;\n}\nfunction descriptorOf(codec, ctx, use) {\n\tconst descriptor = ctx.codecs.descriptorFor(codec.codecId);\n\tif (descriptor === void 0) throw structuredError(\"RUNTIME.PARAM_REF_MISSING_CODEC\", `MySQL lowering: ${use} carries codecId \"${codec.codecId}\" but the MySQL codec registry has no entry for it. Register the extension pack that contributes this codec.`, { meta: { codecId: codec.codecId } });\n\treturn descriptor;\n}\nfunction placeholder(ref, ctx) {\n\tconst number = ctx.placeholderNumbers.get(ref);\n\tif (number === void 0) throw new InternalError(\"A param was written that the AST does not collect\");\n\treturn `?${number}`;\n}\n/** A param as its numbered placeholder, refusing one whose codec the MySQL registry lacks. */\nfunction renderParam(ref, ctx) {\n\tif (ref.codec !== void 0) descriptorOf(ref.codec, ctx, \"a parameter\");\n\treturn placeholder(ref, ctx);\n}\nfunction projectThroughCodec(value, codec, ctx) {\n\treturn descriptorOf(codec, ctx, \"a JSON projection\").projectJson(value, codec);\n}\nfunction renderJsonValue(projection, ctx) {\n\treturn projection.accept({\n\t\tcodec: ({ value, codec }) => renderExpr(projectThroughCodec(value, codec, ctx), ctx),\n\t\tnative: ({ value }) => renderExpr(value, ctx),\n\t\tdocument: ({ value }) => renderExpr(value, ctx)\n\t});\n}\nfunction renderJsonObject(expr, ctx) {\n\treturn `JSON_OBJECT(${expr.entries.flatMap((entry) => [`'${escapeLiteral(entry.key)}'`, renderJsonValue(entry.value, ctx)]).join(\", \")})`;\n}\n/**\n* The element of an ordered JSON array, as JSON text. A document already is JSON; a scalar goes through `JSON_ARRAY`, so a string arrives quoted and escaped.\n*/\nfunction renderJsonElementText(projection, ctx) {\n\tconst rendered = renderJsonValue(projection, ctx);\n\treturn projection.kind === \"document\" ? rendered : `JSON_EXTRACT(JSON_ARRAY(${rendered}), '$[0]')`;\n}\n/**\n* `JSON_ARRAYAGG` takes no `ORDER BY`, and MySQL drops a derived table's `ORDER BY` when the outer query aggregates, so an ordered array is built as text with `GROUP_CONCAT`, which keeps its own order, and cast to JSON. The statement raises `group_concat_max_len` past any result a connection can send (see `GROUP_CONCAT_HINT`), so `GROUP_CONCAT` never cuts the text short. Text longer than `max_allowed_packet` makes `CONCAT` return NULL with only a warning, which would read as an empty include; so an empty array is written only when there are no rows, and a NULL text with rows is replaced by text that is not JSON, which fails the cast and the statement with MySQL's invalid-JSON error. `JSON_ARRAYAGG` fails on its own when its result exceeds a packet. An empty array is `JSON_ARRAY()`, so the column stays JSON and a nested include stays an array.\n*/\nfunction renderJsonArrayAgg(expr, ctx) {\n\tif (expr.orderBy === void 0) {\n\t\tconst aggregated = `JSON_ARRAYAGG(${renderJsonValue(expr.expr, ctx)})`;\n\t\treturn expr.onEmpty === \"emptyArray\" ? `COALESCE(${aggregated}, JSON_ARRAY())` : aggregated;\n\t}\n\tctx.uses.groupConcat = true;\n\tconst text = `CONCAT('[', GROUP_CONCAT(${renderJsonElementText(expr.expr, ctx)} ORDER BY ${renderOrderByItems(expr.orderBy, ctx)} SEPARATOR ','), ']')`;\n\treturn `CASE WHEN COUNT(*) = 0 THEN ${expr.onEmpty === \"emptyArray\" ? \"JSON_ARRAY()\" : \"NULL\"} ELSE CAST(COALESCE(${text}, ${OVERSIZED_ARRAY_TEXT}) AS JSON) END`;\n}\n/** Text that is not JSON, written in place of an array MySQL could not build because it is larger than a packet, so the cast fails. MySQL's error does not show this text: the user sees `Invalid JSON text in argument 1 to function cast_as_json`, which names neither the include nor the packet size. The text counts the rows only so that MySQL evaluates it when it is reached, not while preparing the statement. */\nconst OVERSIZED_ARRAY_TEXT = \"CONCAT('array larger than max_allowed_packet: ', COUNT(*), ' rows')\";\nconst ORDER_DIRECTION = {\n\tasc: \"ASC\",\n\tdesc: \"DESC\"\n};\n/** A NULLS FIRST or NULLS LAST placement, which MySQL lacks, as a leading `IS NULL` sort key. */\nconst NULLS_KEY_DIRECTION = {\n\tfirst: \"DESC\",\n\tlast: \"ASC\"\n};\nfunction renderOrderByItem(item, ctx) {\n\treturn `${item.nulls === void 0 ? \"\" : `${grouped(item.expr, ctx)} IS NULL ${NULLS_KEY_DIRECTION[item.nulls]}, `}${renderExpr(item.expr, ctx)} ${ORDER_DIRECTION[item.dir]}`;\n}\nfunction renderOrderByItems(items, ctx) {\n\treturn items.map((item) => renderOrderByItem(item, ctx)).join(\", \");\n}\nfunction renderJoin(join, ctx) {\n\tif (join.joinType === \"full\") throw unsupported(\"full-join\", \"MySQL has no FULL JOIN\");\n\tif (join.lateral) throw unsupported(\"lateral-join\", \"LATERAL joins are not supported on MySQL yet\");\n\treturn `${join.joinType.toUpperCase()} JOIN ${renderSource(join.source, ctx)} ON ${renderJoinOn(join.on, ctx)}`;\n}\nfunction renderJoinOn(on, ctx) {\n\treturn on.kind === \"eq-col-join-on\" ? `${renderColumn(on.left, ctx)} = ${renderColumn(on.right, ctx)}` : renderExpr(on, ctx);\n}\n//#endregion\n//#region src/core/runtime/mysql-adapter.ts\nfunction markerQuery(queryable) {\n\treturn { async query(sql, params) {\n\t\tconst rows = [];\n\t\tfor await (const row of queryable.query({\n\t\t\tsql,\n\t\t\t...params ? { params } : {}\n\t\t})) rows.push(row);\n\t\treturn { rows };\n\t} };\n}\nvar MysqlAdapterImpl = class {\n\tfamilyId = \"sql\";\n\ttargetId = \"mysql\";\n\tprofile;\n\t#codecs;\n\tconstructor(codecs) {\n\t\tthis.#codecs = codecs;\n\t\tthis.profile = Object.freeze({\n\t\t\tid: \"mysql/default@1\",\n\t\t\ttarget: \"mysql\",\n\t\t\tcapabilities: mysqlAdapterCapabilities,\n\t\t\treadMarker: (queryable) => readMarkerResult(markerQuery(queryable), APP_SPACE_ID)\n\t\t});\n\t}\n\tlower(ast, context) {\n\t\tif (isDdlNode(ast)) throw structuredError(\"RUNTIME.DDL_UNSUPPORTED\", \"lower() does not lower DDL on the runtime adapter: DDL lowering belongs to the control adapter.\", { meta: { surface: \"runtime-adapter\" } });\n\t\treturn renderMysqlSql(ast, context.contract, this.#codecs);\n\t}\n};\n/** The MySQL runtime adapter: it lowers queries with the MySQL renderer and reads the marker 2b's control tables hold. */\nfunction createMysqlAdapter(codecs) {\n\treturn Object.freeze(new MysqlAdapterImpl(codecs));\n}\n//#endregion\n//#region src/core/runtime/runtime-adapter.ts\n/** The `now()` generators of the MySQL date and time types: the SQL family's `timestampNow` for a `Date`, and the target's for every other value. */\nfunction createMysqlMutationDefaultGenerators() {\n\treturn [timestampNowRuntimeGenerator(), ...mysqlNowGenerators.map(({ id, generate }) => ({\n\t\tid,\n\t\tgenerate,\n\t\tstability: \"query\"\n\t}))];\n}\nconst mysqlRuntimeAdapterDescriptor = {\n\t...mysqlAdapterDescriptorMeta,\n\tcodecs: () => Array.from(mysqlCodecDescriptorRegistry.values()),\n\tmutationDefaultGenerators: createMysqlMutationDefaultGenerators,\n\trawCodecInferer: mysqlRawCodecInferer,\n\tcreate(stack) {\n\t\treturn createMysqlAdapter(assembleMysqlCodecRegistry(stack.target, stack.extensions));\n\t}\n};\n//#endregion\nexport { mysqlRuntimeAdapterDescriptor as default };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;;;;;;;;;;;;AAaA,MAAM,UAAU,EAAE,KAAK;AACvB,MAAM,UAAU,KAAK,KAAK;AAC1B,SAAS,OAAO,OAAO;CACtB,MAAM,gBAAgB,6CAA6C,mGAAmG,EAAE,MAAM,EAAE,WAAW,OAAO,MAAM,EAAE,CAAC;AAC5M;;AAEA,MAAM,uBAAuB,EAAE,WAAW,OAAO;CAChD,QAAQ,OAAO,OAAf;EACC,KAAK;GACJ,IAAI,CAAC,OAAO,cAAc,KAAK,GAAG,OAAO,OAAO,KAAK;GACrD,OAAO,SAAS,WAAW,SAAS,UAAU,qBAAqB,OAAO,KAAK;EAChF,KAAK,UAAU,OAAO;EACtB,KAAK,UAAU,OAAO;EACtB,SAAS,OAAO,OAAO,KAAK;CAC7B;AACD,EAAE;;AAIF,SAAS,8BAA8B,KAAK,YAAY;CACvD,MAAM,SAAS,iBAAiB,GAAG,CAAC,CAAC,QAAQ,UAAU,MAAM,SAAS,aAAa;CACnF,MAAM,eAAe,OAAO,KAAK,UAAU,MAAM,IAAI;CACrD,MAAM,UAAU,OAAO,KAAK,UAAU,MAAM,UAAU,GAAG;CACzD,IAAI,QAAQ,OAAO,WAAW,UAAU,KAAK,UAAU,UAAU,KAAK,IAAI,IAAI,OAAO,CAAC,CAAC,SAAS,YAAY;CAC5G,MAAM,gBAAgB,sCAAsC,mDAAmD,KAAK,UAAU,YAAY,EAAE,OAAO,WAAW,sHAAsH;EAC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,KAAK,QAAQ,UAAU,KAAKA,OAAO;CAC1D;AACD;;AAEA,SAAS,mBAAmB,QAAQ;CACnC,OAAO,OAAO,OAAO,IAAI,iBAAiB,MAAM,CAAC;AAClD;;AAIA,SAAS,uCAAuC;CAC/C,OAAO,CAAC,6BAA6B,GAAG,GAAG,mBAAmB,KAAK,EAAE,IAAI,gBAAgB;EACxF;EACA;EACA,WAAW;CACZ,EAAE,CAAC;AACJ;AACA,MAAM,gCAAgC;CACrC,GAAG;CACH,cAAc,MAAM,KAAK,6BAA6B,OAAO,CAAC;CAC9D,2BAA2B;CAC3B,iBAAiB;CACjB,OAAO,OAAO;EACb,OAAO,mBAAmB,2BAA2B,MAAM,QAAQ,MAAM,UAAU,CAAC;CACrF;AACD"}
|
|
1
|
+
{"version":3,"file":"adapter__runtime.mjs","names":["#codecs"],"sources":["../../../../3-targets/mysql/1-mysql/2-adapter/dist/runtime.mjs"],"sourcesContent":["import { r as mysqlAdapterCapabilities, t as mysqlAdapterDescriptorMeta } from \"./descriptor-meta-pVdZBI-g.mjs\";\nimport { r as readMarkerResult } from \"./marker-read-D1hp62hF.mjs\";\nimport { assembleMysqlCodecRegistry, mysqlCodecDescriptorRegistry } from \"@internal/target-mysql/codecs\";\nimport { APP_SPACE_ID } from \"@internal/framework-components/control\";\nimport { collectOrderedParamRefs, isDdlNode } from \"@internal/sql-relational-core/ast\";\nimport { mysqlError } from \"@internal/target-mysql/errors\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { escapeLiteral, quoteIdentifier, tokenizeMysqlSql } from \"@internal/target-mysql/sql-utils\";\nimport { timestampNowRuntimeGenerator } from \"@internal/family-sql/runtime\";\nimport { mysqlNowGenerators } from \"@internal/target-mysql/runtime\";\nimport { MYSQL_BIGINT_CODEC_ID, MYSQL_INT_CODEC_ID, MYSQL_TEXT_CODEC_ID } from \"@internal/target-mysql/codec-ids\";\nimport { InternalError, assertNever } from \"@internal/utils/internal-error\";\n//#region src/core/raw-codec-inferer.ts\nconst INT_MIN = -(2 ** 31);\nconst INT_MAX = 2 ** 31 - 1;\nfunction refuse(value) {\n\tthrow structuredError(\"RUNTIME.RAW_SQL_UNSUPPORTED_INTERPOLATION\", \"MySQL has no codec for this JS value in raw SQL: wrap it in `param(...)` with an explicit codec\", { meta: { valueType: typeof value } });\n}\n/** The codec of a bare value interpolated into `fns.raw` or the raw lane on a MySQL client: integers, bigints and strings. */\nconst mysqlRawCodecInferer = { inferCodec(value) {\n\tswitch (typeof value) {\n\t\tcase \"number\":\n\t\t\tif (!Number.isSafeInteger(value)) return refuse(value);\n\t\t\treturn value >= INT_MIN && value <= INT_MAX ? MYSQL_INT_CODEC_ID : refuse(value);\n\t\tcase \"bigint\": return MYSQL_BIGINT_CODEC_ID;\n\t\tcase \"string\": return MYSQL_TEXT_CODEC_ID;\n\t\tdefault: return refuse(value);\n\t}\n} };\n//#endregion\n//#region src/core/placeholders.ts\n/** Refuses a lowered statement unless every placeholder is a numbered `?N` naming one of its parameters and every parameter has a placeholder. */\nfunction assertPlaceholdersMatchParams(sql, paramCount) {\n\tconst tokens = tokenizeMysqlSql(sql).filter((token) => token.kind === \"placeholder\");\n\tconst placeholders = tokens.map((token) => token.text);\n\tconst numbers = tokens.map((token) => token.number ?? NaN);\n\tif (numbers.every((number) => number >= 1 && number <= paramCount) && new Set(numbers).size === paramCount) return;\n\tthrow structuredError(\"RUNTIME.PARAM_PLACEHOLDER_MISMATCH\", `The lowered MySQL statement writes placeholders ${JSON.stringify(placeholders)} for ${paramCount} parameter(s); each parameter must be written as its own numbered placeholder, and no other placeholder may appear.`, {\n\t\twhy: \"A placeholder that does not match a parameter binds a value to the wrong place in the statement, or leaves a value unbound.\",\n\t\tfix: \"Pass values into raw SQL through interpolation rather than writing a `?` in the SQL text.\",\n\t\tmeta: {\n\t\t\tplaceholders,\n\t\t\tparams: paramCount\n\t\t}\n\t});\n}\n//#endregion\n//#region src/core/sql-renderer.ts\n/** The name an upsert gives the row it proposes, which its update reads as `new`.`column`; the ORM writes that row as `excluded`, as Postgres names it. */\nconst PROPOSED_ROW = \"new\";\n/**\n* Raises `group_concat_max_len` for this statement only, past any result a connection can send, so an ordered include does not depend on how the driver set up its session. MySQL takes `SET_VAR` only on the outermost `SELECT`.\n*/\nconst GROUP_CONCAT_HINT = \"/*+ SET_VAR(group_concat_max_len = 4294967295) */\";\n/** MySQL's documented way to write an `OFFSET` with no `LIMIT`: the largest row count it takes. */\nconst NO_LIMIT = \"18446744073709551615\";\nfunction nodeKind(value) {\n\treturn typeof value === \"object\" && value !== null && \"kind\" in value ? String(value.kind) : \"unknown\";\n}\nfunction unsupported(feature, message) {\n\treturn mysqlError(\"RUNTIME.AST_UNSUPPORTED\", message, { meta: {\n\t\ttarget: \"mysql\",\n\t\tfeature\n\t} });\n}\n/**\n* Lowers a query AST to MySQL SQL. Each param is written as `?N`, N being its position in `collectOrderedParamRefs`, the order the runtime encodes and middleware edits params in; a param written twice is bound once. The driver fills the placeholders.\n*/\nfunction renderMysqlSql(ast, contract, codecs) {\n\tconst placeholderNumbers = /* @__PURE__ */ new Map();\n\tconst params = collectOrderedParamRefs(ast).map((ref, index) => {\n\t\tplaceholderNumbers.set(ref, index + 1);\n\t\treturn ref.kind === \"prepared-param-ref\" ? {\n\t\t\tkind: \"bind\",\n\t\t\tname: ref.name\n\t\t} : {\n\t\t\tkind: \"literal\",\n\t\t\tvalue: ref.value\n\t\t};\n\t});\n\tconst ctx = {\n\t\tcontract,\n\t\tcodecs,\n\t\tplaceholderNumbers,\n\t\tuses: { groupConcat: false }\n\t};\n\tconst rendered = renderStatement(ast, ctx);\n\tconst sql = ctx.uses.groupConcat ? withGroupConcatHint(ast, rendered) : rendered;\n\tassertPlaceholdersMatchParams(sql, params.length);\n\treturn Object.freeze({\n\t\tsql,\n\t\tparams\n\t});\n}\n/** Puts `GROUP_CONCAT_HINT` on the outermost `SELECT`; a statement without one would leave `GROUP_CONCAT` at the session's limit, which can cut an array after an element and still read as JSON, so it is refused. */\nfunction withGroupConcatHint(ast, rendered) {\n\tif (ast.kind !== \"select\" || !rendered.startsWith(\"SELECT \")) throw unsupported(\"ordered-array-outside-select\", \"MySQL can build an ordered JSON array only in a SELECT statement, whose outermost SELECT carries the hint that raises group_concat_max_len\");\n\treturn `SELECT ${GROUP_CONCAT_HINT} ${rendered.slice(7)}`;\n}\nfunction renderStatement(ast, ctx) {\n\tswitch (ast.kind) {\n\t\tcase \"select\": return renderSelect(ast, ctx);\n\t\tcase \"raw-query\": return renderParts(ast.parts, ctx);\n\t\tcase \"insert\": return renderInsert(ast, ctx);\n\t\tcase \"update\": return renderUpdate(ast, ctx);\n\t\tcase \"delete\": return renderDelete(ast, ctx);\n\t\tdefault: throw new InternalError(`Unsupported AST node kind: ${nodeKind(ast)}`);\n\t}\n}\nfunction invalid(node, message) {\n\treturn mysqlError(\"RUNTIME.AST_INVALID\", message, { meta: { node } });\n}\n/** MySQL has no `RETURNING`: the SQL family's ORM reads written rows back with a select when the contract does not report `returning`. */\nfunction refuseReturning(returning, what) {\n\tif (returning !== void 0 && returning.length > 0) throw unsupported(\"returning\", `MySQL cannot return the rows ${what} writes; it has no RETURNING`);\n}\nfunction renderInsertValue(value, ctx) {\n\tif (value === void 0 || value.kind === \"default-value\") return \"DEFAULT\";\n\treturn renderExpr(value, ctx);\n}\n/**\n* An insert, with the bare table name: MySQL's `INSERT` takes no alias, so a column of the table is qualified by its name. A row without a value for a column gets `DEFAULT`. An upsert names its proposed row `new` and updates the existing row on any duplicate key. MySQL cannot limit `ON DUPLICATE KEY UPDATE` to named conflict columns, so the adapter does not report `insertOnConflictTarget` and an upsert that names them is refused. Skipping a conflicting row is refused: `INSERT IGNORE` also hides foreign-key and `NOT NULL` errors.\n*/\nfunction renderInsert(ast, ctx) {\n\trefuseReturning(ast.returning, \"an insert\");\n\tif (ast.rows.length === 0) throw invalid(\"insert\", \"INSERT requires at least one row\");\n\tconst table = qualifyTable(ast.table, ctx);\n\tconst insertCtx = {\n\t\t...ctx,\n\t\tinsertInto: {\n\t\t\talias: ast.table.alias ?? ast.table.name,\n\t\t\tname: table\n\t\t}\n\t};\n\tconst columns = [...new Set(ast.rows.flatMap((row) => Object.keys(row)))];\n\tconst values = ast.rows.map((row) => `(${columns.map((column) => renderInsertValue(row[column], insertCtx)).join(\", \")})`).join(\", \");\n\tconst insert = `INSERT INTO ${table} (${columns.map(quoteIdentifier).join(\", \")}) VALUES ${values}`;\n\tconst conflict = ast.onConflict;\n\tif (conflict === void 0) return insert;\n\tconst action = conflict.action;\n\tswitch (action.kind) {\n\t\tcase \"do-nothing\": throw unsupported(\"insert-on-conflict-skip\", \"MySQL cannot skip a conflicting row without also hiding other errors: INSERT IGNORE turns foreign-key and NOT NULL errors into warnings\");\n\t\tcase \"do-update-set\": {\n\t\t\tif (conflict.columns.length > 0) throw unsupported(\"insert-on-conflict-target\", \"MySQL cannot limit ON DUPLICATE KEY UPDATE to named conflict columns: it fires on any unique key\");\n\t\t\tconst assignments = Object.entries(action.set);\n\t\t\tif (assignments.length === 0) throw invalid(\"insert-on-conflict\", \"An upsert requires at least one column to update\");\n\t\t\tconst set = assignments.map(([column, value]) => `${quoteIdentifier(column)} = ${renderExpr(value, insertCtx)}`).join(\", \");\n\t\t\treturn `${insert} AS ${quoteIdentifier(PROPOSED_ROW)} ON DUPLICATE KEY UPDATE ${set}`;\n\t\t}\n\t\tdefault: return assertNever(action, `Unsupported conflict action: ${nodeKind(action)}`);\n\t}\n}\nfunction renderUpdate(ast, ctx) {\n\trefuseReturning(ast.returning, \"an update\");\n\tconst assignments = Object.entries(ast.set);\n\tif (assignments.length === 0) throw invalid(\"update\", \"UPDATE requires at least one column to set\");\n\tconst set = assignments.map(([column, value]) => `${quoteIdentifier(column)} = ${renderExpr(value, ctx)}`).join(\", \");\n\tconst where = ast.where ? ` WHERE ${renderExpr(ast.where, ctx)}` : \"\";\n\treturn `UPDATE ${renderTableSource(ast.table, ctx)} SET ${set}${where}`;\n}\nfunction renderDelete(ast, ctx) {\n\trefuseReturning(ast.returning, \"a delete\");\n\tconst where = ast.where ? ` WHERE ${renderExpr(ast.where, ctx)}` : \"\";\n\treturn `DELETE FROM ${renderTableSource(ast.table, ctx)}${where}`;\n}\nfunction renderLimitOffset(keyword, value, ctx) {\n\tif (value === void 0) return \"\";\n\tif (typeof value === \"number\") return `${keyword} ${value}`;\n\treturn `${keyword} ${value.kind === \"param-ref\" || value.kind === \"prepared-param-ref\" ? placeholder(value, ctx) : renderExpr(value, ctx)}`;\n}\nfunction renderSelect(ast, ctx) {\n\tif (ast.locking !== void 0 && ast.locking.length > 0) throw unsupported(\"locking-clause\", \"Row locks are not supported on MySQL yet, so a select cannot carry a locking clause such as FOR UPDATE\");\n\tif (ast.distinctOn !== void 0 && ast.distinctOn.length > 0) throw unsupported(\"distinct-on\", \"MySQL has no DISTINCT ON\");\n\treturn [\n\t\t`SELECT ${ast.distinct ? \"DISTINCT \" : \"\"}${renderProjection(ast.projection, ctx)}`,\n\t\tast.from === void 0 ? \"\" : `FROM ${renderSource(ast.from, ctx)}`,\n\t\tast.joins?.length ? ast.joins.map((join) => renderJoin(join, ctx)).join(\" \") : \"\",\n\t\tast.where ? `WHERE ${renderExpr(ast.where, ctx)}` : \"\",\n\t\tast.groupBy?.length ? `GROUP BY ${ast.groupBy.map((e) => renderExpr(e, ctx)).join(\", \")}` : \"\",\n\t\tast.having ? `HAVING ${renderExpr(ast.having, ctx)}` : \"\",\n\t\tast.orderBy?.length ? `ORDER BY ${renderOrderByItems(ast.orderBy, ctx)}` : \"\",\n\t\tast.limit === void 0 && ast.offset !== void 0 ? `LIMIT ${NO_LIMIT}` : renderLimitOffset(\"LIMIT\", ast.limit, ctx),\n\t\trenderLimitOffset(\"OFFSET\", ast.offset, ctx)\n\t].filter((part) => part.length > 0).join(\" \");\n}\nfunction renderProjection(projection, ctx) {\n\treturn projection.map((item) => `${renderExpr(item.expr, ctx)} AS ${quoteIdentifier(item.alias)}`).join(\", \");\n}\nfunction qualifyTable(table, ctx) {\n\tif (table.namespaceId === void 0) return quoteIdentifier(table.name);\n\tif (ctx.contract === void 0) throw new InternalError(`Table \"${table.name}\" carries namespace \"${table.namespaceId}\" but no contract was supplied to resolve it`);\n\tconst namespace = ctx.contract.storage.namespaces[table.namespaceId];\n\tif (namespace?.qualifyTable === void 0) throw structuredError(\"RUNTIME.NAMESPACE_UNKNOWN\", `Table \"${table.name}\" references namespace \"${table.namespaceId}\" which the contract does not materialise for SQL rendering`, { meta: {\n\t\ttable: table.name,\n\t\tnamespaceId: table.namespaceId,\n\t\treason: namespace === void 0 ? \"not-present\" : \"not-materialised\"\n\t} });\n\treturn namespace.qualifyTable(table.name);\n}\nfunction renderTableSource(source, ctx) {\n\tconst qualified = qualifyTable(source, ctx);\n\treturn source.alias ? `${qualified} AS ${quoteIdentifier(source.alias)}` : qualified;\n}\nfunction renderSource(source, ctx) {\n\tswitch (source.kind) {\n\t\tcase \"table-source\": return renderTableSource(source, ctx);\n\t\tcase \"derived-table-source\": return `(${renderSelect(source.query, ctx)}) AS ${quoteIdentifier(source.alias)}`;\n\t\tcase \"function-source\": throw unsupported(\"function-source\", `MySQL cannot select from the set-returning function ${source.fn}`);\n\t\tdefault: return assertNever(source, `Unsupported source node kind: ${nodeKind(source)}`);\n\t}\n}\nfunction renderExpr(expr, ctx) {\n\tswitch (expr.kind) {\n\t\tcase \"column-ref\": return renderColumn(expr, ctx);\n\t\tcase \"identifier-ref\": return quoteIdentifier(expr.name);\n\t\tcase \"operation\": return renderOperation(expr, ctx);\n\t\tcase \"subquery\": return renderSubquery(expr, ctx);\n\t\tcase \"aggregate\": return renderAggregate(expr, ctx);\n\t\tcase \"window-func\": return renderWindowFunc(expr, ctx);\n\t\tcase \"function-call\": return renderFunctionCall(expr, ctx);\n\t\tcase \"cast\": return renderCast(expr, ctx);\n\t\tcase \"case\": return renderCase(expr, ctx);\n\t\tcase \"json-object\": return renderJsonObject(expr, ctx);\n\t\tcase \"json-array-agg\": return renderJsonArrayAgg(expr, ctx);\n\t\tcase \"binary\": return renderBinary(expr, ctx);\n\t\tcase \"and\": return expr.exprs.length === 0 ? \"TRUE\" : `(${expr.exprs.map((part) => renderExpr(part, ctx)).join(\" AND \")})`;\n\t\tcase \"or\": return expr.exprs.length === 0 ? \"FALSE\" : `(${expr.exprs.map((part) => renderExpr(part, ctx)).join(\" OR \")})`;\n\t\tcase \"exists\": return `${expr.notExists ? \"NOT \" : \"\"}EXISTS (${renderSelect(expr.subquery, ctx)})`;\n\t\tcase \"null-check\": return renderNullCheck(expr, ctx);\n\t\tcase \"not\": return `NOT (${renderExpr(expr.expr, ctx)})`;\n\t\tcase \"param-ref\":\n\t\tcase \"prepared-param-ref\": return renderParam(expr, ctx);\n\t\tcase \"literal\": return renderLiteral(expr);\n\t\tcase \"list\": return renderList(expr, ctx);\n\t\tcase \"raw-expr\": return renderParts(expr.parts, ctx);\n\t\tdefault: return assertNever(expr, `Unsupported expression node kind: ${nodeKind(expr)}`);\n\t}\n}\n/** Refuses raw SQL text that puts a digit right after an interpolated value: the value's `?N` and the digit would read as one larger placeholder, `?1` and `0` as `?10`. */\nfunction assertNoDigitAfterParam(parts) {\n\tparts.forEach((part, index) => {\n\t\tconst next = parts[index + 1];\n\t\tif (typeof part !== \"string\" && (part.kind === \"param-ref\" || part.kind === \"prepared-param-ref\") && typeof next === \"string\" && /^\\d/.test(next)) throw structuredError(\"RUNTIME.PARAM_PLACEHOLDER_MISMATCH\", \"Raw SQL puts a digit right after an interpolated value, which MySQL lowering would read as part of the value's placeholder\", {\n\t\t\twhy: \"Each value is written as a numbered placeholder, ?N, so a digit that follows it in the SQL text makes a different placeholder: ?1 followed by 0 reads as ?10.\",\n\t\t\tfix: \"Put a space or an operator between the interpolated value and the digit.\",\n\t\t\tmeta: {\n\t\t\t\treason: \"digit-after-value\",\n\t\t\t\tpart: index + 1\n\t\t\t}\n\t\t});\n\t});\n}\nfunction renderParts(parts, ctx) {\n\tassertNoDigitAfterParam(parts);\n\treturn parts.map((part) => {\n\t\tif (typeof part === \"string\") return part;\n\t\tswitch (part.kind) {\n\t\t\tcase \"select\": return renderSelect(part, ctx);\n\t\t\tcase \"insert\": return renderInsert(part, ctx);\n\t\t\tcase \"update\": return renderUpdate(part, ctx);\n\t\t\tcase \"delete\": return renderDelete(part, ctx);\n\t\t\tdefault: return renderExpr(part, ctx);\n\t\t}\n\t}).join(\"\");\n}\nfunction renderColumn(ref, ctx) {\n\tconst column = quoteIdentifier(ref.column);\n\tconst { insertInto } = ctx;\n\tif (insertInto !== void 0) {\n\t\tif (ref.table === \"excluded\") return `${quoteIdentifier(PROPOSED_ROW)}.${column}`;\n\t\tif (ref.table === insertInto.alias) return `${insertInto.name}.${column}`;\n\t}\n\treturn `${quoteIdentifier(ref.table)}.${column}`;\n}\n/**\n* A literal the code wrote: a number, a bigint, a boolean or NULL, such as the ORM's `1` and `fns.and(true, …)`. A `LiteralExpr` does not say where its value came from, and no part of Prisma writes a text, date or JSON literal into a MySQL runtime statement, so those are refused: a value of that kind can only be a caller's, which belongs in a param, sent apart from the SQL.\n*/\nfunction renderLiteral(expr) {\n\tconst { value } = expr;\n\tif (value === null || value === void 0) return \"NULL\";\n\tif (typeof value === \"number\") {\n\t\tif (!Number.isFinite(value)) throw unsupported(\"non-finite-number\", `MySQL has no literal for ${value}`);\n\t\treturn String(value);\n\t}\n\tif (typeof value === \"boolean\") return value ? \"TRUE\" : \"FALSE\";\n\tif (typeof value === \"bigint\") return String(value);\n\tthrow unsupported(\"value-literal\", `MySQL lowering writes only numbers, booleans and NULL as literals; a ${value instanceof Date ? \"date\" : Array.isArray(value) ? \"array\" : typeof value} value must be a param`);\n}\n/** Renders each `{{self}}` and `{{argN}}` where the template writes it. */\nfunction renderOperation(expr, ctx) {\n\treturn expr.lowering.template.replace(/\\{\\{(self|arg(\\d+))\\}\\}/g, (_match, _name, index) => {\n\t\tif (index === void 0) return renderExpr(expr.self, ctx);\n\t\tconst arg = expr.args[Number(index)];\n\t\treturn arg === void 0 ? \"\" : renderExpr(arg, ctx);\n\t});\n}\nfunction renderSubquery(expr, ctx, columns = 1) {\n\tif (expr.query.projection.length !== columns) throw structuredError(\"RUNTIME.AST_INVALID\", columns === 1 ? \"Subquery expressions must project exactly one column\" : `A subquery compared with a row value of ${columns} columns must project ${columns} columns`, { meta: { node: \"subquery\" } });\n\treturn `(${renderSelect(expr.query, ctx)})`;\n}\n/** Whether an operand must be parenthesised before an operator is written after it. A new expression kind fails to compile here until someone decides. */\nfunction needsGrouping(expr) {\n\tswitch (expr.kind) {\n\t\tcase \"operation\":\n\t\tcase \"subquery\": return true;\n\t\tcase \"column-ref\":\n\t\tcase \"identifier-ref\":\n\t\tcase \"aggregate\":\n\t\tcase \"window-func\":\n\t\tcase \"function-call\":\n\t\tcase \"cast\":\n\t\tcase \"case\":\n\t\tcase \"json-object\":\n\t\tcase \"json-array-agg\":\n\t\tcase \"binary\":\n\t\tcase \"and\":\n\t\tcase \"or\":\n\t\tcase \"exists\":\n\t\tcase \"null-check\":\n\t\tcase \"not\":\n\t\tcase \"param-ref\":\n\t\tcase \"prepared-param-ref\":\n\t\tcase \"literal\":\n\t\tcase \"list\":\n\t\tcase \"raw-expr\": return false;\n\t}\n}\nfunction grouped(expr, ctx) {\n\tconst rendered = renderExpr(expr, ctx);\n\treturn needsGrouping(expr) ? `(${rendered})` : rendered;\n}\nfunction renderNullCheck(expr, ctx) {\n\treturn `${grouped(expr.expr, ctx)} ${expr.isNull ? \"IS NULL\" : \"IS NOT NULL\"}`;\n}\nconst BINARY_OPERATORS = {\n\teq: \"=\",\n\tneq: \"<>\",\n\tisNotDistinctFrom: \"<=>\",\n\tgt: \">\",\n\tlt: \"<\",\n\tgte: \">=\",\n\tlte: \"<=\",\n\tlike: \"LIKE\",\n\tin: \"IN\",\n\tnotIn: \"NOT IN\"\n};\nfunction renderBinary(expr, ctx) {\n\tif (expr.right.kind === \"list\" && expr.right.values.length === 0) {\n\t\tif (expr.op === \"in\") return \"FALSE\";\n\t\tif (expr.op === \"notIn\") return \"TRUE\";\n\t}\n\tconst left = grouped(expr.left, ctx);\n\tconst right = expr.right.kind === \"subquery\" && expr.left.kind === \"list\" ? renderSubquery(expr.right, ctx, expr.left.values.length) : renderExpr(expr.right, ctx);\n\tif (expr.op === \"isDistinctFrom\") return `NOT (${left} <=> ${right})`;\n\treturn `${left} ${BINARY_OPERATORS[expr.op]} ${right}`;\n}\nfunction renderList(expr, ctx) {\n\tif (expr.values.length === 0) return \"(NULL)\";\n\treturn `(${expr.values.map((value) => renderExpr(value, ctx)).join(\", \")})`;\n}\nfunction renderAggregate(expr, ctx) {\n\tconst fn = expr.fn.toUpperCase();\n\treturn expr.expr ? `${fn}(${renderExpr(expr.expr, ctx)})` : `${fn}(*)`;\n}\nfunction renderWindowFunc(expr, ctx) {\n\tconst args = expr.args.map((arg) => renderExpr(arg, ctx)).join(\", \");\n\tconst over = [expr.partitionBy?.length ? `PARTITION BY ${expr.partitionBy.map((e) => renderExpr(e, ctx)).join(\", \")}` : \"\", expr.orderBy?.length ? `ORDER BY ${renderOrderByItems(expr.orderBy, ctx)}` : \"\"].filter((part) => part.length > 0).join(\" \");\n\treturn `${expr.fn.toUpperCase()}(${args}) OVER (${over})`;\n}\nfunction renderFunctionCall(expr, ctx) {\n\treturn `${expr.fn}(${expr.args.map((arg) => renderExpr(arg, ctx)).join(\", \")})`;\n}\nfunction renderCast(expr, ctx) {\n\treturn `CAST(${renderExpr(expr.expr, ctx)} AS ${expr.targetType})`;\n}\nfunction renderCase(expr, ctx) {\n\treturn `CASE ${expr.branches.map((branch) => `WHEN ${renderExpr(branch.condition, ctx)} THEN ${renderExpr(branch.value, ctx)}`).join(\" \")}${expr.elseExpr === void 0 ? \"\" : ` ELSE ${renderExpr(expr.elseExpr, ctx)}`} END`;\n}\nfunction descriptorOf(codec, ctx, use) {\n\tconst descriptor = ctx.codecs.descriptorFor(codec.codecId);\n\tif (descriptor === void 0) throw structuredError(\"RUNTIME.PARAM_REF_MISSING_CODEC\", `MySQL lowering: ${use} carries codecId \"${codec.codecId}\" but the MySQL codec registry has no entry for it. Register the extension pack that contributes this codec.`, { meta: { codecId: codec.codecId } });\n\treturn descriptor;\n}\nfunction placeholder(ref, ctx) {\n\tconst number = ctx.placeholderNumbers.get(ref);\n\tif (number === void 0) throw new InternalError(\"A param was written that the AST does not collect\");\n\treturn `?${number}`;\n}\n/** A param as its numbered placeholder, refusing one whose codec the MySQL registry lacks. */\nfunction renderParam(ref, ctx) {\n\tif (ref.codec !== void 0) descriptorOf(ref.codec, ctx, \"a parameter\");\n\treturn placeholder(ref, ctx);\n}\nfunction projectThroughCodec(value, codec, ctx) {\n\treturn descriptorOf(codec, ctx, \"a JSON projection\").projectJson(value, codec);\n}\nfunction renderJsonValue(projection, ctx) {\n\treturn projection.accept({\n\t\tcodec: ({ value, codec }) => renderExpr(projectThroughCodec(value, codec, ctx), ctx),\n\t\tnative: ({ value }) => renderExpr(value, ctx),\n\t\tdocument: ({ value }) => renderExpr(value, ctx)\n\t});\n}\nfunction renderJsonObject(expr, ctx) {\n\treturn `JSON_OBJECT(${expr.entries.flatMap((entry) => [`'${escapeLiteral(entry.key)}'`, renderJsonValue(entry.value, ctx)]).join(\", \")})`;\n}\n/**\n* The element of an ordered JSON array, as JSON text. A document already is JSON; a scalar goes through `JSON_ARRAY`, so a string arrives quoted and escaped.\n*/\nfunction renderJsonElementText(projection, ctx) {\n\tconst rendered = renderJsonValue(projection, ctx);\n\treturn projection.kind === \"document\" ? rendered : `JSON_EXTRACT(JSON_ARRAY(${rendered}), '$[0]')`;\n}\n/**\n* `JSON_ARRAYAGG` takes no `ORDER BY`, and MySQL drops a derived table's `ORDER BY` when the outer query aggregates, so an ordered array is built as text with `GROUP_CONCAT`, which keeps its own order, and cast to JSON. The statement raises `group_concat_max_len` past any result a connection can send (see `GROUP_CONCAT_HINT`), so `GROUP_CONCAT` never cuts the text short. Text longer than `max_allowed_packet` makes `CONCAT` return NULL with only a warning, which would read as an empty include; so an empty array is written only when there are no rows, and a NULL text with rows is replaced by text that is not JSON, which fails the cast and the statement with MySQL's invalid-JSON error. `JSON_ARRAYAGG` fails on its own when its result exceeds a packet. An empty array is `JSON_ARRAY()`, so the column stays JSON and a nested include stays an array.\n*/\nfunction renderJsonArrayAgg(expr, ctx) {\n\tif (expr.orderBy === void 0) {\n\t\tconst aggregated = `JSON_ARRAYAGG(${renderJsonValue(expr.expr, ctx)})`;\n\t\treturn expr.onEmpty === \"emptyArray\" ? `COALESCE(${aggregated}, JSON_ARRAY())` : aggregated;\n\t}\n\tctx.uses.groupConcat = true;\n\tconst text = `CONCAT('[', GROUP_CONCAT(${renderJsonElementText(expr.expr, ctx)} ORDER BY ${renderOrderByItems(expr.orderBy, ctx)} SEPARATOR ','), ']')`;\n\treturn `CASE WHEN COUNT(*) = 0 THEN ${expr.onEmpty === \"emptyArray\" ? \"JSON_ARRAY()\" : \"NULL\"} ELSE CAST(COALESCE(${text}, ${OVERSIZED_ARRAY_TEXT}) AS JSON) END`;\n}\n/** Text that is not JSON, written in place of an array MySQL could not build because it is larger than a packet, so the cast fails. MySQL's error does not show this text: the user sees `Invalid JSON text in argument 1 to function cast_as_json`, which names neither the include nor the packet size. The text counts the rows only so that MySQL evaluates it when it is reached, not while preparing the statement. */\nconst OVERSIZED_ARRAY_TEXT = \"CONCAT('array larger than max_allowed_packet: ', COUNT(*), ' rows')\";\nconst ORDER_DIRECTION = {\n\tasc: \"ASC\",\n\tdesc: \"DESC\"\n};\n/** A NULLS FIRST or NULLS LAST placement, which MySQL lacks, as a leading `IS NULL` sort key. */\nconst NULLS_KEY_DIRECTION = {\n\tfirst: \"DESC\",\n\tlast: \"ASC\"\n};\nfunction renderOrderByItem(item, ctx) {\n\treturn `${item.nulls === void 0 ? \"\" : `${grouped(item.expr, ctx)} IS NULL ${NULLS_KEY_DIRECTION[item.nulls]}, `}${renderExpr(item.expr, ctx)} ${ORDER_DIRECTION[item.dir]}`;\n}\nfunction renderOrderByItems(items, ctx) {\n\treturn items.map((item) => renderOrderByItem(item, ctx)).join(\", \");\n}\nfunction renderJoin(join, ctx) {\n\tif (join.joinType === \"full\") throw unsupported(\"full-join\", \"MySQL has no FULL JOIN\");\n\tif (join.lateral) throw unsupported(\"lateral-join\", \"LATERAL joins are not supported on MySQL yet\");\n\treturn `${join.joinType.toUpperCase()} JOIN ${renderSource(join.source, ctx)} ON ${renderJoinOn(join.on, ctx)}`;\n}\nfunction renderJoinOn(on, ctx) {\n\treturn on.kind === \"eq-col-join-on\" ? `${renderColumn(on.left, ctx)} = ${renderColumn(on.right, ctx)}` : renderExpr(on, ctx);\n}\n//#endregion\n//#region src/core/runtime/mysql-adapter.ts\nfunction markerQuery(queryable) {\n\treturn { async query(sql, params) {\n\t\tconst rows = [];\n\t\tfor await (const row of queryable.query({\n\t\t\tsql,\n\t\t\t...params ? { params } : {}\n\t\t})) rows.push(row);\n\t\treturn { rows };\n\t} };\n}\nvar MysqlAdapterImpl = class {\n\tfamilyId = \"sql\";\n\ttargetId = \"mysql\";\n\tprofile;\n\t#codecs;\n\tconstructor(codecs) {\n\t\tthis.#codecs = codecs;\n\t\tthis.profile = Object.freeze({\n\t\t\tid: \"mysql/default@1\",\n\t\t\ttarget: \"mysql\",\n\t\t\tcapabilities: mysqlAdapterCapabilities,\n\t\t\treadMarker: (queryable) => readMarkerResult(markerQuery(queryable), APP_SPACE_ID)\n\t\t});\n\t}\n\tlower(ast, context) {\n\t\tif (isDdlNode(ast)) throw structuredError(\"RUNTIME.DDL_UNSUPPORTED\", \"lower() does not lower DDL on the runtime adapter: DDL lowering belongs to the control adapter.\", { meta: { surface: \"runtime-adapter\" } });\n\t\treturn renderMysqlSql(ast, context.contract, this.#codecs);\n\t}\n};\n/** The MySQL runtime adapter: it lowers queries with the MySQL renderer and reads the marker 2b's control tables hold. */\nfunction createMysqlAdapter(codecs) {\n\treturn Object.freeze(new MysqlAdapterImpl(codecs));\n}\n//#endregion\n//#region src/core/runtime/runtime-adapter.ts\n/** The `now()` generators of the MySQL date and time types: the SQL family's `timestampNow` for a `Date`, and the target's for every other value. */\nfunction createMysqlMutationDefaultGenerators() {\n\treturn [timestampNowRuntimeGenerator(), ...mysqlNowGenerators.map(({ id, generate }) => ({\n\t\tid,\n\t\tgenerate,\n\t\tstability: \"query\"\n\t}))];\n}\nconst mysqlRuntimeAdapterDescriptor = {\n\t...mysqlAdapterDescriptorMeta,\n\tcodecs: () => Array.from(mysqlCodecDescriptorRegistry.values()),\n\tmutationDefaultGenerators: createMysqlMutationDefaultGenerators,\n\trawCodecInferer: mysqlRawCodecInferer,\n\tcreate(stack) {\n\t\treturn createMysqlAdapter(assembleMysqlCodecRegistry(stack.target, stack.extensions));\n\t}\n};\n//#endregion\nexport { mysqlRuntimeAdapterDescriptor as default };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;;;;;;;;;;;;AAaA,MAAM,UAAU,EAAE,KAAK;AACvB,MAAM,UAAU,KAAK,KAAK;AAC1B,SAAS,OAAO,OAAO;CACtB,MAAM,gBAAgB,6CAA6C,mGAAmG,EAAE,MAAM,EAAE,WAAW,OAAO,MAAM,EAAE,CAAC;AAC5M;;AAEA,MAAM,uBAAuB,EAAE,WAAW,OAAO;CAChD,QAAQ,OAAO,OAAf;EACC,KAAK;GACJ,IAAI,CAAC,OAAO,cAAc,KAAK,GAAG,OAAO,OAAO,KAAK;GACrD,OAAO,SAAS,WAAW,SAAS,UAAU,qBAAqB,OAAO,KAAK;EAChF,KAAK,UAAU,OAAO;EACtB,KAAK,UAAU,OAAO;EACtB,SAAS,OAAO,OAAO,KAAK;CAC7B;AACD,EAAE;;AAIF,SAAS,8BAA8B,KAAK,YAAY;CACvD,MAAM,SAAS,iBAAiB,GAAG,CAAC,CAAC,QAAQ,UAAU,MAAM,SAAS,aAAa;CACnF,MAAM,eAAe,OAAO,KAAK,UAAU,MAAM,IAAI;CACrD,MAAM,UAAU,OAAO,KAAK,UAAU,MAAM,UAAU,GAAG;CACzD,IAAI,QAAQ,OAAO,WAAW,UAAU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;CACA,YAAY,QAAQ;EACnB,KAAKA,UAAU;EACf,KAAK,UAAU,OAAO,OAAO;GAC5B,IAAI;GACJ,QAAQ;GACR,cAAc;GACd,aAAa,cAAc,iBAAiB,YAAY,SAAS,GAAG,YAAY;EACjF,CAAC;CACF;CACA,MAAM,KAAK,SAAS;EACnB,IAAI,UAAU,GAAG,GAAG,MAAM,gBAAgB,2BAA2B,mGAAmG,EAAE,MAAM,EAAE,SAAS,kBAAkB,EAAE,CAAC;EAChN,OAAO,eAAe,KAAK,QAAQ,UAAU,KAAKA,OAAO;CAC1D;AACD;;AAEA,SAAS,mBAAmB,QAAQ;CACnC,OAAO,OAAO,OAAO,IAAI,iBAAiB,MAAM,CAAC;AAClD;;AAIA,SAAS,uCAAuC;CAC/C,OAAO,CAAC,6BAA6B,GAAG,GAAG,mBAAmB,KAAK,EAAE,IAAI,gBAAgB;EACxF;EACA;EACA,WAAW;CACZ,EAAE,CAAC;AACJ;AACA,MAAM,gCAAgC;CACrC,GAAG;CACH,cAAc,MAAM,KAAK,6BAA6B,OAAO,CAAC;CAC9D,2BAA2B;CAC3B,iBAAiB;CACjB,OAAO,OAAO;EACb,OAAO,mBAAmB,2BAA2B,MAAM,QAAQ,MAAM,UAAU,CAAC;CACrF;AACD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { s as mysqlError } from "./errors-Cng94tYg-DTH51xWG.mjs";
|
|
2
|
-
import { n as mysqlTargetDescriptorMeta } from "./descriptor-meta-
|
|
2
|
+
import { n as mysqlTargetDescriptorMeta } from "./descriptor-meta-BF6YvSag-ChHHvlHc.mjs";
|
|
3
3
|
import { t as MysqlContractSerializer } from "./mysql-contract-serializer-BnTKRSsN-BnV7fdYd.mjs";
|
|
4
4
|
import { _ as createMysqlMigrationPlanner, b as mysqlContractToSchema, d as MYSQL_MIGRATION_MODULE, v as createMysqlMigrationRunner, y as diffMysqlSchema } from "./runner-BIjAWX-E-BgTmrD8f.mjs";
|
|
5
5
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
@@ -70,4 +70,4 @@ const mysqlControlTargetDescriptor = createMysqlControlTargetDescriptor({
|
|
|
70
70
|
//#endregion
|
|
71
71
|
export { mysqlControlTargetDescriptor as n, createMysqlControlTargetDescriptor as t };
|
|
72
72
|
|
|
73
|
-
//# sourceMappingURL=control-
|
|
73
|
+
//# sourceMappingURL=control-DNuE7H2C.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control-
|
|
1
|
+
{"version":3,"file":"control-DNuE7H2C.mjs","names":[],"sources":["../../../../3-targets/mysql/1-mysql/1-target/dist/control.mjs"],"sourcesContent":["import { s as mysqlError } from \"./errors-Cng94tYg.mjs\";\nimport { n as mysqlScalarTypeConstructors, t as mysqlTargetDescriptorMeta } from \"./descriptor-meta-BF6YvSag.mjs\";\nimport { t as MysqlContractSerializer } from \"./mysql-contract-serializer-BnTKRSsN.mjs\";\nimport { _ as MYSQL_MIGRATION_MODULE, b as diffMysqlSchema, r as createMysqlMigrationPlanner, t as createMysqlMigrationRunner, x as mysqlContractToSchema } from \"./runner-BIjAWX-E.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { setFallbackTemporal } from \"@internal/type-implementations/temporal\";\nimport { sqlTypeLookupsOf } from \"@internal/family-sql/control\";\nimport { SqlStorage } from \"@internal/sql-contract/types\";\nimport { relationalNodeEntityKind, relationalNodeGranularity } from \"@internal/sql-schema-ir/types\";\nimport { Temporal } from \"temporal-polyfill/full/implementation\";\nimport { SqlSchemaVerifierBase } from \"@internal/family-sql/ir\";\n//#region src/core/migrations/mysql-schema-verifier.ts\n/** The MySQL `SchemaVerifier`. Verification runs through `diffSchema`; these hooks add nothing, as on the other SQL targets. */\nvar MysqlSchemaVerifier = class extends SqlSchemaVerifierBase {\n\tverifyCommonSqlSchema(_options) {\n\t\treturn [];\n\t}\n\tverifyTargetExtensions(_options) {\n\t\treturn [];\n\t}\n};\n//#endregion\n//#region src/core/migrations/control-target.ts\nfunction isSqlContract(contract) {\n\treturn contract === null || contract.storage instanceof SqlStorage;\n}\n/** The control target of MySQL, or of a target that extends it, which reuses MySQL's planner, runner, schema verifier and contract serializer under its own target id. */\nfunction createMysqlControlTargetDescriptor(options) {\n\tsetFallbackTemporal(Temporal);\n\tconst { descriptorMeta } = options;\n\tconst migrationTarget = {\n\t\ttargetId: descriptorMeta.targetId,\n\t\tmigrationModule: options.migrationModule\n\t};\n\treturn {\n\t\t...descriptorMeta,\n\t\tcontractSerializer: new MysqlContractSerializer(),\n\t\tschemaVerifier: new MysqlSchemaVerifier(),\n\t\tdiffSchema: diffMysqlSchema,\n\t\tclassifySubjectGranularity: relationalNodeGranularity,\n\t\tclassifyEntityKind: relationalNodeEntityKind,\n\t\tmigrations: {\n\t\t\tcreatePlanner(adapter) {\n\t\t\t\treturn createMysqlMigrationPlanner(adapter, migrationTarget);\n\t\t\t},\n\t\t\tcreateRunner(family) {\n\t\t\t\treturn blindCast(createMysqlMigrationRunner(family));\n\t\t\t},\n\t\t\tcontractToSchema(contract, frameworkComponents) {\n\t\t\t\tif (!isSqlContract(contract)) throw mysqlError(\"CONTRACT.TARGET_MISMATCH\", \"The MySQL target received a contract that is not a SQL contract.\");\n\t\t\t\treturn mysqlContractToSchema(contract, sqlTypeLookupsOf(frameworkComponents));\n\t\t\t}\n\t\t},\n\t\tcreate() {\n\t\t\treturn {\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: descriptorMeta.targetId\n\t\t\t};\n\t\t},\n\t\tcreatePlanner(adapter) {\n\t\t\treturn createMysqlMigrationPlanner(adapter, migrationTarget);\n\t\t},\n\t\tcreateRunner(family) {\n\t\t\treturn createMysqlMigrationRunner(family);\n\t\t}\n\t};\n}\nconst mysqlControlTargetDescriptor = createMysqlControlTargetDescriptor({\n\tdescriptorMeta: mysqlTargetDescriptorMeta,\n\tmigrationModule: MYSQL_MIGRATION_MODULE\n});\n//#endregion\nexport { createMysqlControlTargetDescriptor, mysqlControlTargetDescriptor as default, mysqlScalarTypeConstructors };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;;;;;;;;;;;;AAaA,IAAI,sBAAsB,cAAc,sBAAsB;CAC7D,sBAAsB,UAAU;EAC/B,OAAO,CAAC;CACT;CACA,uBAAuB,UAAU;EAChC,OAAO,CAAC;CACT;AACD;AAGA,SAAS,cAAc,UAAU;CAChC,OAAO,aAAa,QAAQ,SAAS,mBAAmB;AACzD;;AAEA,SAAS,mCAAmC,SAAS;CACpD,oBAAoB,QAAQ;CAC5B,MAAM,EAAE,mBAAmB;CAC3B,MAAM,kBAAkB;EACvB,UAAU,eAAe;EACzB,iBAAiB,QAAQ;CAC1B;CACA,OAAO;EACN,GAAG;EACH,oBAAoB,IAAI,wBAAwB;EAChD,gBAAgB,IAAI,oBAAoB;EACxC,YAAY;EACZ,4BAA4B;EAC5B,oBAAoB;EACpB,YAAY;GACX,cAAc,SAAS;IACtB,OAAO,4BAA4B,SAAS,eAAe;GAC5D;GACA,aAAa,QAAQ;IACpB,OAAO,UAAU,2BAA2B,MAAM,CAAC;GACpD;GACA,iBAAiB,UAAU,qBAAqB;IAC/C,IAAI,CAAC,cAAc,QAAQ,GAAG,MAAM,WAAW,4BAA4B,kEAAkE;IAC7I,OAAO,sBAAsB,UAAU,iBAAiB,mBAAmB,CAAC;GAC7E;EACD;EACA,SAAS;GACR,OAAO;IACN,UAAU;IACV,UAAU,eAAe;GAC1B;EACD;EACA,cAAc,SAAS;GACtB,OAAO,4BAA4B,SAAS,eAAe;EAC5D;EACA,aAAa,QAAQ;GACpB,OAAO,2BAA2B,MAAM;EACzC;CACD;AACD;AACA,MAAM,+BAA+B,mCAAmC;CACvE,gBAAgB;CAChB,iBAAiB;AAClB,CAAC"}
|
|
@@ -2,8 +2,7 @@ import { o as mysqlDataTypes } from "./data-types-DOaaPS93-lycGybNk.mjs";
|
|
|
2
2
|
import { t as requireTemporal } from "./require-temporal-DeDQhbTn-CdpjEWCB.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, fractionDigitsOf } from "@prisma/orm-framework/type-implementations/now";
|
|
5
|
-
//#region ../../../3-targets/mysql/1-mysql/1-target/dist/date-time-now-generators-
|
|
6
|
-
/** The runtime-safe part of the MySQL target's metadata: it leaves out `authoring`, which only contract construction reads. Every session runs in UTC, because the datetime codec reads and writes UTC, and at READ COMMITTED, as Postgres does, so a read inside a transaction sees rows other sessions committed. Transaction isolation controls will replace the setting. */
|
|
5
|
+
//#region ../../../3-targets/mysql/1-mysql/1-target/dist/date-time-now-generators-BKakW3gd.mjs
|
|
7
6
|
const mysqlTargetDescriptorMetaRuntime = {
|
|
8
7
|
kind: "target",
|
|
9
8
|
familyId: "sql",
|
|
@@ -12,10 +11,7 @@ const mysqlTargetDescriptorMetaRuntime = {
|
|
|
12
11
|
version: "0.0.1",
|
|
13
12
|
capabilities: {},
|
|
14
13
|
dataTypes: mysqlDataTypes,
|
|
15
|
-
sessionSettings: {
|
|
16
|
-
time_zone: "+00:00",
|
|
17
|
-
transaction_isolation: "READ-COMMITTED"
|
|
18
|
-
}
|
|
14
|
+
sessionSettings: { time_zone: "+00:00" }
|
|
19
15
|
};
|
|
20
16
|
/** The fraction digits of a bare `datetime`, `timestamp` or `time`. */
|
|
21
17
|
const BARE_TYPE_FRACTION_DIGITS = 0;
|
|
@@ -69,4 +65,4 @@ const mysqlNowGenerators = [
|
|
|
69
65
|
//#endregion
|
|
70
66
|
export { mysqlTargetDescriptorMetaRuntime as n, mysqlNowGenerators as t };
|
|
71
67
|
|
|
72
|
-
//# sourceMappingURL=date-time-now-generators-
|
|
68
|
+
//# sourceMappingURL=date-time-now-generators-BKakW3gd-CIFPuRdM.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-time-now-generators-BKakW3gd-CIFPuRdM.mjs","names":[],"sources":["../../../../3-targets/mysql/1-mysql/1-target/dist/date-time-now-generators-BKakW3gd.mjs"],"sourcesContent":["import { o as mysqlDataTypes } from \"./data-types-DOaaPS93.mjs\";\nimport { t as requireTemporal } from \"./require-temporal-DeDQhbTn.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, fractionDigitsOf } from \"@internal/type-implementations/now\";\nconst mysqlTargetDescriptorMetaRuntime = {\n\tkind: \"target\",\n\tfamilyId: \"sql\",\n\ttargetId: \"mysql\",\n\tid: \"mysql\",\n\tversion: \"0.0.1\",\n\tcapabilities: {},\n\tdataTypes: mysqlDataTypes,\n\tsessionSettings: { time_zone: \"+00:00\" }\n};\n//#endregion\n//#region src/core/date-time-now-generators.ts\n/** The fraction digits of a bare `datetime`, `timestamp` or `time`. */\nconst BARE_TYPE_FRACTION_DIGITS = 0;\nfunction fractionDigits(params) {\n\treturn fractionDigitsOf(params, BARE_TYPE_FRACTION_DIGITS);\n}\nfunction instantNow(params) {\n\treturn nowValues.instantNow(requireTemporal({ generatorId: INSTANT_NOW_GENERATOR_ID }), fractionDigits(params));\n}\nfunction plainDateNow() {\n\treturn nowValues.plainDateNow(requireTemporal({ generatorId: PLAIN_DATE_NOW_GENERATOR_ID }));\n}\nfunction plainTimeNow(params) {\n\treturn nowValues.plainTimeNow(requireTemporal({ generatorId: PLAIN_TIME_NOW_GENERATOR_ID }), fractionDigits(params));\n}\nfunction instantStringNow(params) {\n\treturn nowValues.instantStringNow(fractionDigits(params), \"trimmed\");\n}\nfunction timeStringNow(params) {\n\treturn nowValues.timeStringNow(fractionDigits(params), \"trimmed\");\n}\n/**\n* The MySQL \"now\" generators, one per date and time codec except `mysql/datetime@1` and `mysql/timestamp-date@1`, which use the SQL family's `timestampNow`. All read the clock through `Date.now()` and write UTC. Each rounds down to the column's `precision` param, so MySQL, which rounds a value to the column's fraction digits, stores the value the client holds rather than rounding it up. The string generators write the text their codec reads, with no trailing zeros in the fraction.\n*/\nconst mysqlNowGenerators = [\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 { mysqlTargetDescriptorMetaRuntime as n, mysqlNowGenerators as t };\n\n//# sourceMappingURL=date-time-now-generators-BKakW3gd.mjs.map"],"mappings":";;;;;AAIA,MAAM,mCAAmC;CACxC,MAAM;CACN,UAAU;CACV,UAAU;CACV,IAAI;CACJ,SAAS;CACT,cAAc,CAAC;CACf,WAAW;CACX,iBAAiB,EAAE,WAAW,SAAS;AACxC;;AAIA,MAAM,4BAA4B;AAClC,SAAS,eAAe,QAAQ;CAC/B,OAAO,iBAAiB,QAAQ,yBAAyB;AAC1D;AACA,SAAS,WAAW,QAAQ;CAC3B,OAAO,UAAU,WAAW,gBAAgB,EAAE,aAAa,yBAAyB,CAAC,GAAG,eAAe,MAAM,CAAC;AAC/G;AACA,SAAS,eAAe;CACvB,OAAO,UAAU,aAAa,gBAAgB,EAAE,aAAa,4BAA4B,CAAC,CAAC;AAC5F;AACA,SAAS,aAAa,QAAQ;CAC7B,OAAO,UAAU,aAAa,gBAAgB,EAAE,aAAa,4BAA4B,CAAC,GAAG,eAAe,MAAM,CAAC;AACpH;AACA,SAAS,iBAAiB,QAAQ;CACjC,OAAO,UAAU,iBAAiB,eAAe,MAAM,GAAG,SAAS;AACpE;AACA,SAAS,cAAc,QAAQ;CAC9B,OAAO,UAAU,cAAc,eAAe,MAAM,GAAG,SAAS;AACjE;;;;AAIA,MAAM,qBAAqB;CAC1B;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"}
|
package/dist/{descriptor-meta-CsMPRsxp-QVV7vNY8.mjs → descriptor-meta-BF6YvSag-ChHHvlHc.mjs}
RENAMED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { a as MYSQL_DATE_STRING_CODEC_ID, d as MYSQL_TIMESTAMP_DATE_CODEC_ID, f as MYSQL_TIMESTAMP_STRING_CODEC_ID, h as MYSQL_TIME_TEMPORAL_CODEC_ID, i as MYSQL_DATETIME_TEMPORAL_CODEC_ID, l as MYSQL_INT_CODEC_ID, m as MYSQL_TIME_STRING_CODEC_ID, n as MYSQL_DATETIME_CODEC_ID, o as MYSQL_DATE_TEMPORAL_CODEC_ID, p as MYSQL_TIMESTAMP_TEMPORAL_CODEC_ID, r as MYSQL_DATETIME_STRING_CODEC_ID, s as MYSQL_DURATION_STRING_CODEC_ID, t as MYSQL_BIGINT_CODEC_ID, u as MYSQL_TEXT_CODEC_ID } from "./codec-ids-CrR9Xi7r-CjbGCS3o.mjs";
|
|
2
2
|
import { _ as mysqlInt, y as mysqlTextDataTypes } from "./data-types-DOaaPS93-lycGybNk.mjs";
|
|
3
3
|
import { t as mysqlDataTypeEntries } from "./data-type-entries-C7VH2IHc-DM6TbTaz.mjs";
|
|
4
|
-
import { n as mysqlTargetDescriptorMetaRuntime, t as mysqlNowGenerators } from "./date-time-now-generators-
|
|
4
|
+
import { n as mysqlTargetDescriptorMetaRuntime, t as mysqlNowGenerators } from "./date-time-now-generators-BKakW3gd-CIFPuRdM.mjs";
|
|
5
5
|
import { SQL_VARCHAR_CODEC_ID } from "@prisma/orm-family-sql/relational-core/ast";
|
|
6
6
|
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";
|
|
7
7
|
import { UNBOUND_NAMESPACE_ID } from "@prisma/orm-framework/components/ir";
|
|
8
8
|
import { idGeneratorFunctionBindings, sqlIntegerArgumentGeneratorFunctions, sqlTargetTypeConstructors } from "@prisma/orm-family-sql/family/pack";
|
|
9
9
|
import { TIMESTAMP_NOW_GENERATOR_ID, temporalTypeAliases } from "@prisma/orm-framework/components/authoring";
|
|
10
10
|
import { singleGeneratorBinding } from "@prisma/orm-framework/components/components";
|
|
11
|
-
//#region ../../../3-targets/mysql/1-mysql/1-target/dist/descriptor-meta-
|
|
11
|
+
//#region ../../../3-targets/mysql/1-mysql/1-target/dist/descriptor-meta-BF6YvSag.mjs
|
|
12
12
|
/** The type constructors whose arguments are sizes, which take values of `mysql/int`, and the created-at and updated-at aliases on the type a bare `DateTime` becomes: a `datetime(3)` column read as a JavaScript `Date`. */
|
|
13
13
|
const mysqlAuthoringTypes = {
|
|
14
14
|
.../* @__PURE__ */ sqlTargetTypeConstructors({ sizeType: "mysql/int" }),
|
|
@@ -349,4 +349,4 @@ const mysqlTargetDescriptorMeta = {
|
|
|
349
349
|
//#endregion
|
|
350
350
|
export { mysqlTargetDescriptorMeta as n, mysqlScalarTypeConstructors as t };
|
|
351
351
|
|
|
352
|
-
//# sourceMappingURL=descriptor-meta-
|
|
352
|
+
//# sourceMappingURL=descriptor-meta-BF6YvSag-ChHHvlHc.mjs.map
|
package/dist/{descriptor-meta-CsMPRsxp-QVV7vNY8.mjs.map → descriptor-meta-BF6YvSag-ChHHvlHc.mjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"descriptor-meta-CsMPRsxp-QVV7vNY8.mjs","names":[],"sources":["../../../../3-targets/mysql/1-mysql/1-target/dist/descriptor-meta-CsMPRsxp.mjs"],"sourcesContent":["import { a as MYSQL_DATE_STRING_CODEC_ID, d as MYSQL_TIMESTAMP_DATE_CODEC_ID, f as MYSQL_TIMESTAMP_STRING_CODEC_ID, h as MYSQL_TIME_TEMPORAL_CODEC_ID, i as MYSQL_DATETIME_TEMPORAL_CODEC_ID, l as MYSQL_INT_CODEC_ID, m as MYSQL_TIME_STRING_CODEC_ID, n as MYSQL_DATETIME_CODEC_ID, o as MYSQL_DATE_TEMPORAL_CODEC_ID, p as MYSQL_TIMESTAMP_TEMPORAL_CODEC_ID, r as MYSQL_DATETIME_STRING_CODEC_ID, s as MYSQL_DURATION_STRING_CODEC_ID, t as MYSQL_BIGINT_CODEC_ID, u as MYSQL_TEXT_CODEC_ID } from \"./codec-ids-CrR9Xi7r.mjs\";\nimport { _ as mysqlInt, y as mysqlTextDataTypes } from \"./data-types-DOaaPS93.mjs\";\nimport { t as mysqlDataTypeEntries } from \"./data-type-entries-C7VH2IHc.mjs\";\nimport { n as mysqlTargetDescriptorMetaRuntime, t as mysqlNowGenerators } from \"./date-time-now-generators-DY-8Bodc.mjs\";\nimport { SQL_VARCHAR_CODEC_ID } from \"@internal/sql-relational-core/ast\";\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\n/** The type constructors whose arguments are sizes, which take values of `mysql/int`, and the created-at and updated-at aliases on the type a bare `DateTime` becomes: a `datetime(3)` column read as a JavaScript `Date`. */\nconst mysqlAuthoringTypes = {\n\t.../* @__PURE__ */ sqlTargetTypeConstructors({ sizeType: \"mysql/int\" }),\n\ttemporal: /* @__PURE__ */ temporalTypeAliases({\n\t\tcodecId: MYSQL_DATETIME_CODEC_ID,\n\t\ttypeParams: { precision: 3 }\n\t}, \"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 mysqlNowGeneratorIds = {\n\t[MYSQL_DATETIME_CODEC_ID]: TIMESTAMP_NOW_GENERATOR_ID,\n\t[MYSQL_DATETIME_TEMPORAL_CODEC_ID]: INSTANT_NOW_GENERATOR_ID,\n\t[MYSQL_DATETIME_STRING_CODEC_ID]: INSTANT_STRING_NOW_GENERATOR_ID,\n\t[MYSQL_TIMESTAMP_DATE_CODEC_ID]: TIMESTAMP_NOW_GENERATOR_ID,\n\t[MYSQL_TIMESTAMP_TEMPORAL_CODEC_ID]: INSTANT_NOW_GENERATOR_ID,\n\t[MYSQL_TIMESTAMP_STRING_CODEC_ID]: INSTANT_STRING_NOW_GENERATOR_ID,\n\t[MYSQL_DATE_STRING_CODEC_ID]: DATE_STRING_NOW_GENERATOR_ID,\n\t[MYSQL_DATE_TEMPORAL_CODEC_ID]: PLAIN_DATE_NOW_GENERATOR_ID,\n\t[MYSQL_TIME_STRING_CODEC_ID]: TIME_STRING_NOW_GENERATOR_ID,\n\t[MYSQL_TIME_TEMPORAL_CODEC_ID]: PLAIN_TIME_NOW_GENERATOR_ID\n};\n/** The generators that round down to the column's fraction digits, 0 for a bare type. */\nconst takesPrecision = /* @__PURE__ */ new Set([\n\tINSTANT_NOW_GENERATOR_ID,\n\tINSTANT_STRING_NOW_GENERATOR_ID,\n\tPLAIN_TIME_NOW_GENERATOR_ID,\n\tTIME_STRING_NOW_GENERATOR_ID\n]);\n/** The fraction digits a `Date` holds: `timestampNow` takes a precision only below them, so a column of 3 or more, such as a bare `DateTime`, keeps a contract with no generator params. */\nconst DATE_FRACTION_DIGITS = 3;\nfunction nowParams(generatorId, typeParams) {\n\tconst written = typeParams?.[\"precision\"];\n\tconst precision = typeof written === \"number\" ? written : 0;\n\tif (takesPrecision.has(generatorId)) return { precision };\n\tif (generatorId === TIMESTAMP_NOW_GENERATOR_ID && precision < DATE_FRACTION_DIGITS) return { precision };\n}\nconst mysqlGeneratorFunctions = [\n\t...sqlIntegerArgumentGeneratorFunctions({ integer: mysqlInt.id }),\n\t{\n\t\tname: \"now\",\n\t\tbindings: Object.entries(mysqlNowGeneratorIds).map(([codecId, generatorId]) => singleGeneratorBinding({\n\t\t\tcodecIds: [codecId],\n\t\t\tgeneratorId,\n\t\t\tparamsFromField: (column) => nowParams(generatorId, column.typeParams)\n\t\t}))\n\t},\n\t...idGeneratorFunctionBindings({ text: [MYSQL_TEXT_CODEC_ID] })\n];\n/** The `now` generators MySQL binds. The SQL family registers the identifier generators. */\nconst mysqlGeneratorDescriptors = [{ id: TIMESTAMP_NOW_GENERATOR_ID }, ...mysqlNowGenerators.map(({ id }) => ({ id }))];\n/**\n* The base PSL scalars other than the date and time types, as zero-arg type constructors. Each names a codec; the column's database type is its data type's. The target contributes them, so PSL and the TypeScript builder's `type.*` see the same names.\n*/\nconst mysqlScalarAuthoringTypes = {\n\tString: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: `Text of at most 191 characters, stored as MySQL varchar(191) so that it can be indexed.`,\n\t\toutput: {\n\t\t\tcodecId: SQL_VARCHAR_CODEC_ID,\n\t\t\ttypeParams: { length: 191 }\n\t\t}\n\t},\n\tInt: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A signed 32-bit integer stored as MySQL int and represented as a JavaScript number.\",\n\t\toutput: { codecId: MYSQL_INT_CODEC_ID }\n\t},\n\tBigInt: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A signed 64-bit integer stored as MySQL bigint and represented as a JavaScript bigint.\",\n\t\toutput: { codecId: MYSQL_BIGINT_CODEC_ID }\n\t}\n};\nconst precision = {\n\tkind: \"value\",\n\tdataType: \"mysql/int\",\n\tname: \"precision\",\n\toptional: true\n};\n/** The explicit type `codecId`, whose `precision` argument is the number of fraction digits its column holds, 0 to 6; MySQL holds 0 when none is written. */\nfunction withPrecision(codecId, documentation) {\n\treturn {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation,\n\t\targs: [precision],\n\t\toutput: {\n\t\t\tcodecId,\n\t\t\ttypeParams: { precision: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t};\n}\n/**\n* The explicit date and time types. Each is named after its MySQL column type, with a suffix for the value the application reads; `DurationString` is stored as `varchar`, since MySQL has no interval type. ADR 315.\n*/\nconst mysqlDateTimeTypeConstructors = {\n\tDatetimeJsDate: {\n\t\t...withPrecision(MYSQL_DATETIME_CODEC_ID, \"An instant stored as MySQL datetime in UTC and represented as a JavaScript Date. `precision` is the fraction digits the column holds, 0 to 6.\"),\n\t\tinferred: true\n\t},\n\tDatetimeTemporal: withPrecision(MYSQL_DATETIME_TEMPORAL_CODEC_ID, \"An instant stored as MySQL datetime in UTC and represented as Temporal.Instant. `precision` is the fraction digits the column holds, 0 to 6.\"),\n\tDatetimeString: withPrecision(MYSQL_DATETIME_STRING_CODEC_ID, \"An instant stored as MySQL datetime in UTC and represented as ISO 8601 text in UTC, such as 2024-01-01T00:00:00.5Z. `precision` is the fraction digits the column holds, 0 to 6.\"),\n\tTimestampJsDate: {\n\t\t...withPrecision(MYSQL_TIMESTAMP_DATE_CODEC_ID, \"An instant from 1970 to 2038 stored as MySQL timestamp and represented as a JavaScript Date. `precision` is the fraction digits the column holds, 0 to 6.\"),\n\t\tinferred: true\n\t},\n\tTimestampTemporal: withPrecision(MYSQL_TIMESTAMP_TEMPORAL_CODEC_ID, \"An instant from 1970 to 2038 stored as MySQL timestamp and represented as Temporal.Instant. `precision` is the fraction digits the column holds, 0 to 6.\"),\n\tTimestampString: withPrecision(MYSQL_TIMESTAMP_STRING_CODEC_ID, \"An instant from 1970 to 2038 stored as MySQL timestamp and represented as ISO 8601 text in UTC, such as 2024-01-01T00:00:00.5Z. `precision` is the fraction digits the column holds, 0 to 6.\"),\n\tDateString: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A calendar date stored as MySQL date and represented as ISO 8601 text, such as 2024-02-29.\",\n\t\toutput: { codecId: MYSQL_DATE_STRING_CODEC_ID }\n\t},\n\tDateTemporal: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A calendar date stored as MySQL date and represented as Temporal.PlainDate.\",\n\t\toutput: { codecId: MYSQL_DATE_TEMPORAL_CODEC_ID }\n\t},\n\tTimeString: {\n\t\t...withPrecision(MYSQL_TIME_STRING_CODEC_ID, \"A time of day stored as MySQL time and represented as ISO 8601 text, such as 09:30:00. `precision` is the fraction digits the column holds, 0 to 6.\"),\n\t\tinferred: true\n\t},\n\tTimeTemporal: withPrecision(MYSQL_TIME_TEMPORAL_CODEC_ID, \"A time of day stored as MySQL time and represented as Temporal.PlainTime. `precision` is the fraction digits the column holds, 0 to 6.\"),\n\tDurationString: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: `A length of time stored as MySQL varchar(191), so that it can be indexed, and represented as the ISO 8601 duration it was written as, such as PT1H30M.`,\n\t\toutput: {\n\t\t\tcodecId: MYSQL_DURATION_STRING_CODEC_ID,\n\t\t\ttypeParams: { length: 191 }\n\t\t}\n\t}\n};\nconst MICROSECONDS = { precision: 6 };\nconst MILLISECONDS = { precision: 3 };\n/**\n* The convenience date and time types. Each is a type choice: its `as` and `storage` arguments choose the explicit type it becomes, and `precision` is passed on to that type. MySQL holds no fraction of a second in a bare `datetime`, `timestamp` or `time`, so a row that reads a `Date` defaults to milliseconds, which a `Date` holds, and every other row to microseconds, as PostgreSQL's bare types hold. ADR 279, ADR 315.\n*/\nconst mysqlConvenienceDateTimeTypes = {\n\tDateTime: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"A moment in time, read and written in UTC. `as` is what the application reads: jsDate (a JavaScript Date), temporal (Temporal.Instant) or string, such as \\\"2024-01-01T00:00:00Z\\\". `storage` is datetime, or timestamp, which holds 1970 to 2038.\",\n\t\targs: [\n\t\t\t{\n\t\t\t\tkind: \"option\",\n\t\t\t\tname: \"as\",\n\t\t\t\tvalues: [\n\t\t\t\t\t\"jsDate\",\n\t\t\t\t\t\"temporal\",\n\t\t\t\t\t\"string\"\n\t\t\t\t],\n\t\t\t\tdefault: \"jsDate\",\n\t\t\t\toptional: true\n\t\t\t},\n\t\t\t{\n\t\t\t\tkind: \"option\",\n\t\t\t\tname: \"storage\",\n\t\t\t\tvalues: [\"datetime\", \"timestamp\"],\n\t\t\t\tdefault: \"datetime\",\n\t\t\t\toptional: true\n\t\t\t},\n\t\t\tprecision\n\t\t],\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: \"datetime\"\n\t\t\t\t},\n\t\t\t\ttype: \"DatetimeJsDate\",\n\t\t\t\tdefaults: MILLISECONDS\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: \"datetime\"\n\t\t\t\t},\n\t\t\t\ttype: \"DatetimeTemporal\",\n\t\t\t\tdefaults: MICROSECONDS\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: \"datetime\"\n\t\t\t\t},\n\t\t\t\ttype: \"DatetimeString\",\n\t\t\t\tdefaults: MICROSECONDS\n\t\t\t},\n\t\t\t{\n\t\t\t\twhen: {\n\t\t\t\t\tas: \"jsDate\",\n\t\t\t\t\tstorage: \"timestamp\"\n\t\t\t\t},\n\t\t\t\ttype: \"TimestampJsDate\",\n\t\t\t\tdefaults: MILLISECONDS\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: \"timestamp\"\n\t\t\t\t},\n\t\t\t\ttype: \"TimestampTemporal\",\n\t\t\t\tdefaults: MICROSECONDS\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: \"timestamp\"\n\t\t\t\t},\n\t\t\t\ttype: \"TimestampString\",\n\t\t\t\tdefaults: MICROSECONDS\n\t\t\t}\n\t\t]\n\t},\n\tDate: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"A calendar date. `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}, {\n\t\t\tkind: \"option\",\n\t\t\tname: \"storage\",\n\t\t\tvalues: [\"date\"],\n\t\t\tdefault: \"date\",\n\t\t\toptional: true\n\t\t}],\n\t\tchoices: [{\n\t\t\twhen: {\n\t\t\t\tas: \"string\",\n\t\t\t\tstorage: \"date\"\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: \"date\"\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, from 00:00:00 to 23:59:59.999999. `as` is what the application reads: string, such as \\\"09:30:00\\\", or temporal (Temporal.PlainTime).\",\n\t\targs: [\n\t\t\t{\n\t\t\t\tkind: \"option\",\n\t\t\t\tname: \"as\",\n\t\t\t\tvalues: [\"string\", \"temporal\"],\n\t\t\t\tdefault: \"string\",\n\t\t\t\toptional: true\n\t\t\t},\n\t\t\t{\n\t\t\t\tkind: \"option\",\n\t\t\t\tname: \"storage\",\n\t\t\t\tvalues: [\"time\"],\n\t\t\t\tdefault: \"time\",\n\t\t\t\toptional: true\n\t\t\t},\n\t\t\tprecision\n\t\t],\n\t\tchoices: [{\n\t\t\twhen: {\n\t\t\t\tas: \"string\",\n\t\t\t\tstorage: \"time\"\n\t\t\t},\n\t\t\ttype: \"TimeString\",\n\t\t\tdefaults: MICROSECONDS\n\t\t}, {\n\t\t\twhen: {\n\t\t\t\tas: \"temporal\",\n\t\t\t\tstorage: \"time\"\n\t\t\t},\n\t\t\ttype: \"TimeTemporal\",\n\t\t\tdefaults: MICROSECONDS\n\t\t}]\n\t},\n\tDuration: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: `A length of time, stored as MySQL varchar(191), since MySQL has no interval type. \\`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}, {\n\t\t\tkind: \"option\",\n\t\t\tname: \"storage\",\n\t\t\tvalues: [\"varchar\"],\n\t\t\tdefault: \"varchar\",\n\t\t\toptional: true\n\t\t}],\n\t\tchoices: [{\n\t\t\twhen: {\n\t\t\t\tas: \"string\",\n\t\t\t\tstorage: \"varchar\"\n\t\t\t},\n\t\t\ttype: \"DurationString\"\n\t\t}]\n\t}\n};\n/**\n* The base scalars, the explicit date and time types and the convenience date and time types as type constructors. The target contributes them, so PSL and the TypeScript builder's `type.*` see the same names.\n*/\nconst mysqlScalarTypeConstructors = {\n\t...mysqlScalarAuthoringTypes,\n\t...mysqlDateTimeTypeConstructors,\n\t...mysqlConvenienceDateTimeTypes\n};\nconst mysqlTargetDescriptorMeta = {\n\t...mysqlTargetDescriptorMetaRuntime,\n\tdefaultNamespaceId: UNBOUND_NAMESPACE_ID,\n\tsupportsNamespaces: false,\n\tdisplayName: \"MySQL\",\n\tauthoring: {\n\t\ttype: {\n\t\t\t...mysqlScalarTypeConstructors,\n\t\t\t...mysqlAuthoringTypes\n\t\t},\n\t\tdataTypes: mysqlDataTypeEntries(),\n\t\ttextDataTypes: mysqlTextDataTypes\n\t},\n\tgeneratorFunctions: mysqlGeneratorFunctions,\n\tcontrolMutationDefaults: {\n\t\tdefaultFunctionRegistry: /* @__PURE__ */ new Map(),\n\t\tgeneratorDescriptors: mysqlGeneratorDescriptors\n\t}\n};\n//#endregion\nexport { mysqlScalarTypeConstructors as n, mysqlTargetDescriptorMeta as t };\n\n//# sourceMappingURL=descriptor-meta-CsMPRsxp.mjs.map"],"mappings":";;;;;;;;;;;;AAYA,MAAM,sBAAsB;CAC3B,GAAmB,0CAA0B,EAAE,UAAU,YAAY,CAAC;CACtE,UAA0B,oCAAoB;EAC7C,SAAS;EACT,YAAY,EAAE,WAAW,EAAE;CAC5B,GAAG,mBAAmB;AACvB;;AAIA,MAAM,uBAAuB;EAC3B,0BAA0B;EAC1B,mCAAmC;EACnC,iCAAiC;EACjC,gCAAgC;EAChC,oCAAoC;EACpC,kCAAkC;EAClC,6BAA6B;EAC7B,+BAA+B;EAC/B,6BAA6B;EAC7B,+BAA+B;AACjC;;AAEA,MAAM,iCAAiC,IAAI,IAAI;CAC9C;CACA;CACA;CACA;AACD,CAAC;;AAED,MAAM,uBAAuB;AAC7B,SAAS,UAAU,aAAa,YAAY;CAC3C,MAAM,UAA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jC,GAAG;CACH,oBAAoB;CACpB,oBAAoB;CACpB,aAAa;CACb,WAAW;EACV,MAAM;GACL,GAAG;GACH,GAAG;EACJ;EACA,WAAW,qBAAqB;EAChC,eAAe;CAChB;CACA,oBAAoB;CACpB,yBAAyB;EACxB,yCAAyC,IAAI,IAAI;EACjD,sBAAsB;CACvB;AACD"}
|
|
1
|
+
{"version":3,"file":"descriptor-meta-BF6YvSag-ChHHvlHc.mjs","names":[],"sources":["../../../../3-targets/mysql/1-mysql/1-target/dist/descriptor-meta-BF6YvSag.mjs"],"sourcesContent":["import { a as MYSQL_DATE_STRING_CODEC_ID, d as MYSQL_TIMESTAMP_DATE_CODEC_ID, f as MYSQL_TIMESTAMP_STRING_CODEC_ID, h as MYSQL_TIME_TEMPORAL_CODEC_ID, i as MYSQL_DATETIME_TEMPORAL_CODEC_ID, l as MYSQL_INT_CODEC_ID, m as MYSQL_TIME_STRING_CODEC_ID, n as MYSQL_DATETIME_CODEC_ID, o as MYSQL_DATE_TEMPORAL_CODEC_ID, p as MYSQL_TIMESTAMP_TEMPORAL_CODEC_ID, r as MYSQL_DATETIME_STRING_CODEC_ID, s as MYSQL_DURATION_STRING_CODEC_ID, t as MYSQL_BIGINT_CODEC_ID, u as MYSQL_TEXT_CODEC_ID } from \"./codec-ids-CrR9Xi7r.mjs\";\nimport { _ as mysqlInt, y as mysqlTextDataTypes } from \"./data-types-DOaaPS93.mjs\";\nimport { t as mysqlDataTypeEntries } from \"./data-type-entries-C7VH2IHc.mjs\";\nimport { n as mysqlTargetDescriptorMetaRuntime, t as mysqlNowGenerators } from \"./date-time-now-generators-BKakW3gd.mjs\";\nimport { SQL_VARCHAR_CODEC_ID } from \"@internal/sql-relational-core/ast\";\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\n/** The type constructors whose arguments are sizes, which take values of `mysql/int`, and the created-at and updated-at aliases on the type a bare `DateTime` becomes: a `datetime(3)` column read as a JavaScript `Date`. */\nconst mysqlAuthoringTypes = {\n\t.../* @__PURE__ */ sqlTargetTypeConstructors({ sizeType: \"mysql/int\" }),\n\ttemporal: /* @__PURE__ */ temporalTypeAliases({\n\t\tcodecId: MYSQL_DATETIME_CODEC_ID,\n\t\ttypeParams: { precision: 3 }\n\t}, \"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 mysqlNowGeneratorIds = {\n\t[MYSQL_DATETIME_CODEC_ID]: TIMESTAMP_NOW_GENERATOR_ID,\n\t[MYSQL_DATETIME_TEMPORAL_CODEC_ID]: INSTANT_NOW_GENERATOR_ID,\n\t[MYSQL_DATETIME_STRING_CODEC_ID]: INSTANT_STRING_NOW_GENERATOR_ID,\n\t[MYSQL_TIMESTAMP_DATE_CODEC_ID]: TIMESTAMP_NOW_GENERATOR_ID,\n\t[MYSQL_TIMESTAMP_TEMPORAL_CODEC_ID]: INSTANT_NOW_GENERATOR_ID,\n\t[MYSQL_TIMESTAMP_STRING_CODEC_ID]: INSTANT_STRING_NOW_GENERATOR_ID,\n\t[MYSQL_DATE_STRING_CODEC_ID]: DATE_STRING_NOW_GENERATOR_ID,\n\t[MYSQL_DATE_TEMPORAL_CODEC_ID]: PLAIN_DATE_NOW_GENERATOR_ID,\n\t[MYSQL_TIME_STRING_CODEC_ID]: TIME_STRING_NOW_GENERATOR_ID,\n\t[MYSQL_TIME_TEMPORAL_CODEC_ID]: PLAIN_TIME_NOW_GENERATOR_ID\n};\n/** The generators that round down to the column's fraction digits, 0 for a bare type. */\nconst takesPrecision = /* @__PURE__ */ new Set([\n\tINSTANT_NOW_GENERATOR_ID,\n\tINSTANT_STRING_NOW_GENERATOR_ID,\n\tPLAIN_TIME_NOW_GENERATOR_ID,\n\tTIME_STRING_NOW_GENERATOR_ID\n]);\n/** The fraction digits a `Date` holds: `timestampNow` takes a precision only below them, so a column of 3 or more, such as a bare `DateTime`, keeps a contract with no generator params. */\nconst DATE_FRACTION_DIGITS = 3;\nfunction nowParams(generatorId, typeParams) {\n\tconst written = typeParams?.[\"precision\"];\n\tconst precision = typeof written === \"number\" ? written : 0;\n\tif (takesPrecision.has(generatorId)) return { precision };\n\tif (generatorId === TIMESTAMP_NOW_GENERATOR_ID && precision < DATE_FRACTION_DIGITS) return { precision };\n}\nconst mysqlGeneratorFunctions = [\n\t...sqlIntegerArgumentGeneratorFunctions({ integer: mysqlInt.id }),\n\t{\n\t\tname: \"now\",\n\t\tbindings: Object.entries(mysqlNowGeneratorIds).map(([codecId, generatorId]) => singleGeneratorBinding({\n\t\t\tcodecIds: [codecId],\n\t\t\tgeneratorId,\n\t\t\tparamsFromField: (column) => nowParams(generatorId, column.typeParams)\n\t\t}))\n\t},\n\t...idGeneratorFunctionBindings({ text: [MYSQL_TEXT_CODEC_ID] })\n];\n/** The `now` generators MySQL binds. The SQL family registers the identifier generators. */\nconst mysqlGeneratorDescriptors = [{ id: TIMESTAMP_NOW_GENERATOR_ID }, ...mysqlNowGenerators.map(({ id }) => ({ id }))];\n/**\n* The base PSL scalars other than the date and time types, as zero-arg type constructors. Each names a codec; the column's database type is its data type's. The target contributes them, so PSL and the TypeScript builder's `type.*` see the same names.\n*/\nconst mysqlScalarAuthoringTypes = {\n\tString: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: `Text of at most 191 characters, stored as MySQL varchar(191) so that it can be indexed.`,\n\t\toutput: {\n\t\t\tcodecId: SQL_VARCHAR_CODEC_ID,\n\t\t\ttypeParams: { length: 191 }\n\t\t}\n\t},\n\tInt: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A signed 32-bit integer stored as MySQL int and represented as a JavaScript number.\",\n\t\toutput: { codecId: MYSQL_INT_CODEC_ID }\n\t},\n\tBigInt: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A signed 64-bit integer stored as MySQL bigint and represented as a JavaScript bigint.\",\n\t\toutput: { codecId: MYSQL_BIGINT_CODEC_ID }\n\t}\n};\nconst precision = {\n\tkind: \"value\",\n\tdataType: \"mysql/int\",\n\tname: \"precision\",\n\toptional: true\n};\n/** The explicit type `codecId`, whose `precision` argument is the number of fraction digits its column holds, 0 to 6; MySQL holds 0 when none is written. */\nfunction withPrecision(codecId, documentation) {\n\treturn {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation,\n\t\targs: [precision],\n\t\toutput: {\n\t\t\tcodecId,\n\t\t\ttypeParams: { precision: {\n\t\t\t\tkind: \"arg\",\n\t\t\t\tindex: 0\n\t\t\t} }\n\t\t}\n\t};\n}\n/**\n* The explicit date and time types. Each is named after its MySQL column type, with a suffix for the value the application reads; `DurationString` is stored as `varchar`, since MySQL has no interval type. ADR 315.\n*/\nconst mysqlDateTimeTypeConstructors = {\n\tDatetimeJsDate: {\n\t\t...withPrecision(MYSQL_DATETIME_CODEC_ID, \"An instant stored as MySQL datetime in UTC and represented as a JavaScript Date. `precision` is the fraction digits the column holds, 0 to 6.\"),\n\t\tinferred: true\n\t},\n\tDatetimeTemporal: withPrecision(MYSQL_DATETIME_TEMPORAL_CODEC_ID, \"An instant stored as MySQL datetime in UTC and represented as Temporal.Instant. `precision` is the fraction digits the column holds, 0 to 6.\"),\n\tDatetimeString: withPrecision(MYSQL_DATETIME_STRING_CODEC_ID, \"An instant stored as MySQL datetime in UTC and represented as ISO 8601 text in UTC, such as 2024-01-01T00:00:00.5Z. `precision` is the fraction digits the column holds, 0 to 6.\"),\n\tTimestampJsDate: {\n\t\t...withPrecision(MYSQL_TIMESTAMP_DATE_CODEC_ID, \"An instant from 1970 to 2038 stored as MySQL timestamp and represented as a JavaScript Date. `precision` is the fraction digits the column holds, 0 to 6.\"),\n\t\tinferred: true\n\t},\n\tTimestampTemporal: withPrecision(MYSQL_TIMESTAMP_TEMPORAL_CODEC_ID, \"An instant from 1970 to 2038 stored as MySQL timestamp and represented as Temporal.Instant. `precision` is the fraction digits the column holds, 0 to 6.\"),\n\tTimestampString: withPrecision(MYSQL_TIMESTAMP_STRING_CODEC_ID, \"An instant from 1970 to 2038 stored as MySQL timestamp and represented as ISO 8601 text in UTC, such as 2024-01-01T00:00:00.5Z. `precision` is the fraction digits the column holds, 0 to 6.\"),\n\tDateString: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: \"A calendar date stored as MySQL date and represented as ISO 8601 text, such as 2024-02-29.\",\n\t\toutput: { codecId: MYSQL_DATE_STRING_CODEC_ID }\n\t},\n\tDateTemporal: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A calendar date stored as MySQL date and represented as Temporal.PlainDate.\",\n\t\toutput: { codecId: MYSQL_DATE_TEMPORAL_CODEC_ID }\n\t},\n\tTimeString: {\n\t\t...withPrecision(MYSQL_TIME_STRING_CODEC_ID, \"A time of day stored as MySQL time and represented as ISO 8601 text, such as 09:30:00. `precision` is the fraction digits the column holds, 0 to 6.\"),\n\t\tinferred: true\n\t},\n\tTimeTemporal: withPrecision(MYSQL_TIME_TEMPORAL_CODEC_ID, \"A time of day stored as MySQL time and represented as Temporal.PlainTime. `precision` is the fraction digits the column holds, 0 to 6.\"),\n\tDurationString: {\n\t\tkind: \"typeConstructor\",\n\t\tinferred: true,\n\t\tdocumentation: `A length of time stored as MySQL varchar(191), so that it can be indexed, and represented as the ISO 8601 duration it was written as, such as PT1H30M.`,\n\t\toutput: {\n\t\t\tcodecId: MYSQL_DURATION_STRING_CODEC_ID,\n\t\t\ttypeParams: { length: 191 }\n\t\t}\n\t}\n};\nconst MICROSECONDS = { precision: 6 };\nconst MILLISECONDS = { precision: 3 };\n/**\n* The convenience date and time types. Each is a type choice: its `as` and `storage` arguments choose the explicit type it becomes, and `precision` is passed on to that type. MySQL holds no fraction of a second in a bare `datetime`, `timestamp` or `time`, so a row that reads a `Date` defaults to milliseconds, which a `Date` holds, and every other row to microseconds, as PostgreSQL's bare types hold. ADR 279, ADR 315.\n*/\nconst mysqlConvenienceDateTimeTypes = {\n\tDateTime: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"A moment in time, read and written in UTC. `as` is what the application reads: jsDate (a JavaScript Date), temporal (Temporal.Instant) or string, such as \\\"2024-01-01T00:00:00Z\\\". `storage` is datetime, or timestamp, which holds 1970 to 2038.\",\n\t\targs: [\n\t\t\t{\n\t\t\t\tkind: \"option\",\n\t\t\t\tname: \"as\",\n\t\t\t\tvalues: [\n\t\t\t\t\t\"jsDate\",\n\t\t\t\t\t\"temporal\",\n\t\t\t\t\t\"string\"\n\t\t\t\t],\n\t\t\t\tdefault: \"jsDate\",\n\t\t\t\toptional: true\n\t\t\t},\n\t\t\t{\n\t\t\t\tkind: \"option\",\n\t\t\t\tname: \"storage\",\n\t\t\t\tvalues: [\"datetime\", \"timestamp\"],\n\t\t\t\tdefault: \"datetime\",\n\t\t\t\toptional: true\n\t\t\t},\n\t\t\tprecision\n\t\t],\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: \"datetime\"\n\t\t\t\t},\n\t\t\t\ttype: \"DatetimeJsDate\",\n\t\t\t\tdefaults: MILLISECONDS\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: \"datetime\"\n\t\t\t\t},\n\t\t\t\ttype: \"DatetimeTemporal\",\n\t\t\t\tdefaults: MICROSECONDS\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: \"datetime\"\n\t\t\t\t},\n\t\t\t\ttype: \"DatetimeString\",\n\t\t\t\tdefaults: MICROSECONDS\n\t\t\t},\n\t\t\t{\n\t\t\t\twhen: {\n\t\t\t\t\tas: \"jsDate\",\n\t\t\t\t\tstorage: \"timestamp\"\n\t\t\t\t},\n\t\t\t\ttype: \"TimestampJsDate\",\n\t\t\t\tdefaults: MILLISECONDS\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: \"timestamp\"\n\t\t\t\t},\n\t\t\t\ttype: \"TimestampTemporal\",\n\t\t\t\tdefaults: MICROSECONDS\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: \"timestamp\"\n\t\t\t\t},\n\t\t\t\ttype: \"TimestampString\",\n\t\t\t\tdefaults: MICROSECONDS\n\t\t\t}\n\t\t]\n\t},\n\tDate: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: \"A calendar date. `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}, {\n\t\t\tkind: \"option\",\n\t\t\tname: \"storage\",\n\t\t\tvalues: [\"date\"],\n\t\t\tdefault: \"date\",\n\t\t\toptional: true\n\t\t}],\n\t\tchoices: [{\n\t\t\twhen: {\n\t\t\t\tas: \"string\",\n\t\t\t\tstorage: \"date\"\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: \"date\"\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, from 00:00:00 to 23:59:59.999999. `as` is what the application reads: string, such as \\\"09:30:00\\\", or temporal (Temporal.PlainTime).\",\n\t\targs: [\n\t\t\t{\n\t\t\t\tkind: \"option\",\n\t\t\t\tname: \"as\",\n\t\t\t\tvalues: [\"string\", \"temporal\"],\n\t\t\t\tdefault: \"string\",\n\t\t\t\toptional: true\n\t\t\t},\n\t\t\t{\n\t\t\t\tkind: \"option\",\n\t\t\t\tname: \"storage\",\n\t\t\t\tvalues: [\"time\"],\n\t\t\t\tdefault: \"time\",\n\t\t\t\toptional: true\n\t\t\t},\n\t\t\tprecision\n\t\t],\n\t\tchoices: [{\n\t\t\twhen: {\n\t\t\t\tas: \"string\",\n\t\t\t\tstorage: \"time\"\n\t\t\t},\n\t\t\ttype: \"TimeString\",\n\t\t\tdefaults: MICROSECONDS\n\t\t}, {\n\t\t\twhen: {\n\t\t\t\tas: \"temporal\",\n\t\t\t\tstorage: \"time\"\n\t\t\t},\n\t\t\ttype: \"TimeTemporal\",\n\t\t\tdefaults: MICROSECONDS\n\t\t}]\n\t},\n\tDuration: {\n\t\tkind: \"typeChoice\",\n\t\tdocumentation: `A length of time, stored as MySQL varchar(191), since MySQL has no interval type. \\`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}, {\n\t\t\tkind: \"option\",\n\t\t\tname: \"storage\",\n\t\t\tvalues: [\"varchar\"],\n\t\t\tdefault: \"varchar\",\n\t\t\toptional: true\n\t\t}],\n\t\tchoices: [{\n\t\t\twhen: {\n\t\t\t\tas: \"string\",\n\t\t\t\tstorage: \"varchar\"\n\t\t\t},\n\t\t\ttype: \"DurationString\"\n\t\t}]\n\t}\n};\n/**\n* The base scalars, the explicit date and time types and the convenience date and time types as type constructors. The target contributes them, so PSL and the TypeScript builder's `type.*` see the same names.\n*/\nconst mysqlScalarTypeConstructors = {\n\t...mysqlScalarAuthoringTypes,\n\t...mysqlDateTimeTypeConstructors,\n\t...mysqlConvenienceDateTimeTypes\n};\nconst mysqlTargetDescriptorMeta = {\n\t...mysqlTargetDescriptorMetaRuntime,\n\tdefaultNamespaceId: UNBOUND_NAMESPACE_ID,\n\tsupportsNamespaces: false,\n\tdisplayName: \"MySQL\",\n\tauthoring: {\n\t\ttype: {\n\t\t\t...mysqlScalarTypeConstructors,\n\t\t\t...mysqlAuthoringTypes\n\t\t},\n\t\tdataTypes: mysqlDataTypeEntries(),\n\t\ttextDataTypes: mysqlTextDataTypes\n\t},\n\tgeneratorFunctions: mysqlGeneratorFunctions,\n\tcontrolMutationDefaults: {\n\t\tdefaultFunctionRegistry: /* @__PURE__ */ new Map(),\n\t\tgeneratorDescriptors: mysqlGeneratorDescriptors\n\t}\n};\n//#endregion\nexport { mysqlScalarTypeConstructors as n, mysqlTargetDescriptorMeta as t };\n\n//# sourceMappingURL=descriptor-meta-BF6YvSag.mjs.map"],"mappings":";;;;;;;;;;;;AAYA,MAAM,sBAAsB;CAC3B,GAAmB,0CAA0B,EAAE,UAAU,YAAY,CAAC;CACtE,UAA0B,oCAAoB;EAC7C,SAAS;EACT,YAAY,EAAE,WAAW,EAAE;CAC5B,GAAG,mBAAmB;AACvB;;AAIA,MAAM,uBAAuB;EAC3B,0BAA0B;EAC1B,mCAAmC;EACnC,iCAAiC;EACjC,gCAAgC;EAChC,oCAAoC;EACpC,kCAAkC;EAClC,6BAA6B;EAC7B,+BAA+B;EAC/B,6BAA6B;EAC7B,+BAA+B;AACjC;;AAEA,MAAM,iCAAiC,IAAI,IAAI;CAC9C;CACA;CACA;CACA;AACD,CAAC;;AAED,MAAM,uBAAuB;AAC7B,SAAS,UAAU,aAAa,YAAY;CAC3C,MAAM,UAA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jC,GAAG;CACH,oBAAoB;CACpB,oBAAoB;CACpB,aAAa;CACb,WAAW;EACV,MAAM;GACL,GAAG;GACH,GAAG;EACJ;EACA,WAAW,qBAAqB;EAChC,eAAe;CAChB;CACA,oBAAoB;CACpB,yBAAyB;EACxB,yCAAyC,IAAI,IAAI;EACjD,sBAAsB;CACvB;AACD"}
|
package/dist/driver.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { n as createMysqlControlDriverDescriptor, t as MysqlControlDriver } from "./control-BiZaCqna.mjs";
|
|
2
|
-
import { t as createMysqlRuntimeDriverDescriptor } from "./runtime-
|
|
2
|
+
import { t as createMysqlRuntimeDriverDescriptor } from "./runtime-DB0w8R7i.mjs";
|
|
3
3
|
export { MysqlControlDriver, createMysqlControlDriverDescriptor, createMysqlRuntimeDriverDescriptor };
|
package/dist/driver__runtime.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as mysqlRuntimeDriverDescriptor, t as createMysqlRuntimeDriverDescriptor } from "./runtime-
|
|
1
|
+
import { n as mysqlRuntimeDriverDescriptor, t as createMysqlRuntimeDriverDescriptor } from "./runtime-DB0w8R7i.mjs";
|
|
2
2
|
export { createMysqlRuntimeDriverDescriptor, mysqlRuntimeDriverDescriptor as default };
|
|
@@ -1436,7 +1436,6 @@ declare const mysqlTargetDescriptorMetaBase: {
|
|
|
1436
1436
|
readonly dataTypes: readonly import("@prisma/orm-framework/components/codec").DataType[];
|
|
1437
1437
|
readonly sessionSettings: {
|
|
1438
1438
|
readonly time_zone: "+00:00";
|
|
1439
|
-
readonly transaction_isolation: "READ-COMMITTED";
|
|
1440
1439
|
};
|
|
1441
1440
|
readonly __codecTypes?: CodecTypes;
|
|
1442
1441
|
};
|
|
@@ -1451,4 +1450,4 @@ declare const mysqlTargetDescriptorMeta: typeof mysqlTargetDescriptorMetaBase &
|
|
|
1451
1450
|
};
|
|
1452
1451
|
//#endregion
|
|
1453
1452
|
export { mysqlTargetDescriptorMeta as t };
|
|
1454
|
-
//# sourceMappingURL=pack-
|
|
1453
|
+
//# sourceMappingURL=pack-CuB4QWcE.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pack-COnjX17N.d.mts","names":[],"sources":["../../../../3-targets/mysql/1-mysql/1-target/dist/pack.d.mts"],"mappings":";;;;;;;;;;;KAWK;UACK;WACC,MAAM;WACN;;;;;KAKN;;;UAGK;WACC;WACA,MAAM;WACN;;UAED;WACC;WACA,MAAM;WACN,UAAU,cAAc;WACxB;;KAEN,eAAe,YAAY;;;;;;;;;;cAUlB,uBAAuB;WAC1B,OAAO;WACP,MAAM;WACN;WACA;WACA,QAAQ;;WAER;EACT,YAAY,OAAO,YAAY,gBAAgB,QAAQ,YAAY;MAC/D;MACA;;EAEJ,SAAS;EACT,UAAU;;MAEN,sBAAsB;;MAEtB,sBAAsB;;MAEtB,aAAa;;MAEb,aAAa;;KAEd,gBAAgB,aAAa;cACpB;;UAEJ;SACD,QAAQ;SACR,OAAO,OAAO,cAAc;SAC5B,QAAQ,MAAM,aAAa,OAAO,cAAc;MACnD;MACA;EACJ,cAAc;EACd,eAAe;;cAEH;;WAEH,OAAO;WACP;WACA,QAAQ;;WAER;EACT,YAAY,OAAO,WAAW,gBAAgB,QAAQ,wBAAwB;EAC9E,QAAQ,gBAAgB;MACpB,QAAQ;MACR;MACA;;EAEJ,SAAS;EACT,UAAU;MACN,cAAc;MACd,aAAa;MACb,eAAe;MACf,eAAe;;MAEf,sBAAsB;;MAEtB,sBAAsB;;MAEtB,cAAc;;MAEd,aAAa;EACjB,YAAY,SAAS;EACrB,cAAc,SAAS;EACvB,QAAQ;EACR,aAAa,SAAS;;EAEtB,aAAa,GAAG,OAAO,MAAM,eAAe,gBAAgB;EAC5D,eAAe,SAAS;EACxB,UAAU,SAAS;;;;;EAKnB,cAAc,iBAAiB;;;;;;EAM/B,gBAAgB,eAAe,cAAc;;;;UAIrC;WACC;WACA;;UAED;WACC,OAA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qBAAqB,qBAAqB,qBAAqB,qBAAqB;UAChH;WACC;WACA;WACA;WACA,MAAM;;UAEP;WACC;WACA;WACA,OAAO;;UAER;WACC;WACA;WACA,WAAW;;UAEZ;WACC;WACA;WACA;;KAEN,YAAY,cAAc,sBAAsB,kBAAkB,cAAc,kBAAkB,cAAc;KAChH,aAAa;WACP;WACA,QAAQ;;WAER;WACA,QAAQ;;WAER;WACA,QAAQ;;WAER;WACA,QAAQ;;WAER;WACA,QAAQ;;WAER;;WAEA;WACA;;UAED;EACR,eAAe,MAAM,aAAa;EAClC,cAAc,MAAM,aAAa;EACjC,QAAQ,MAAM,aAAa;;;;cAIf;WACH;WACA;WACA;WACA;aACE;eACE;iBACE;mBACE;mBACA;mBACA;qBACE;uBACE;uBACA;yBACE;;;qBAGJ;uBACE;uBACA;;;;iBAIN;mBACE;mBACA;mBACA;qBACE;uBACE;uBACA;yBACE;;;qBAGJ;uBACE;uBACA;;qBAEF;uBACE;uBACA;;;;;eAKR;iBACE;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;;eAMV;iBACE;iBACA;iBACA;mBACE;mBACA;mBACA;mBACA;mBACA;;mBAEA;mBACA;mBACA;mBACA;mBACA;;mBAEA;mBACA;mBACA;mBACA;;iBAEF;mBACE;qBACE;qBACA;;mBAEF;mBACA;qBACE;;;mBAGF;qBACE;qBACA;;mBAEF;mBACA;qBACE;;;mBAGF;qBACE;qBACA;;mBAEF;mBACA;qBACE;;;mBAGF;qBACE;qBACA;;mBAEF;mBACA;qBACE;;;mBAGF;qBACE;qBACA;;mBAEF;mBACA;qBACE;;;mBAGF;qBACE;qBACA;;mBAEF;mBACA;qBACE;;;;eAIN;iBACE;iBACA;iBACA;mBACE;mBACA;mBACA;mBACA;mBACA;;mBAEA;mBACA;mBACA;mBACA;mBACA;;iBAEF;mBACE;qBACE;qBACA;;mBAEF;;mBAEA;qBACE;qBACA;;mBAEF;;;eAGJ;iBACE;iBACA;iBACA;mBACE;mBACA;mBACA;mBACA;mBACA;;mBAEA;mBACA;mBACA;mBACA;mBACA;;mBAEA;mBACA;mBACA;mBACA;;iBAEF;mBACE;qBACE;qBACA;;mBAEF;mBACA;qBACE;;;mBAGF;qBACE;qBACA;;mBAEF;mBACA;qBACE;;;;eAIN;iBACE;iBACA;iBACA;mBACE;mBACA;mBACA;mBACA;mBACA;;mBAEA;mBACA;mBACA;mBACA;mBACA;;iBAEF;mBACE;qBACE;qBACA;;mBAEF;;;eAGJ;iBACE;iBACA;iBACA;iBACA;mBACE;mBACA;mBACA;mBACA;;iBAEF;mBACE;mBACA;qBACE;uBACE;uBACA;;;;;eAKR;iBACE;iBACA;iBACA;mBACE;mBACA;mBACA;mBACA;;iBAEF;mBACE;mBACA;qBACE;uBACE;uBACA;;;;;eAKR;iBACE;iBACA;iBACA;mBACE;mBACA;mBACA;mBACA;;iBAEF;mBACE;mBACA;qBACE;uBACE;uBACA;;;;;eAKR;iBACE;iBACA;iBACA;iBACA;mBACE;mBACA;mBACA;mBACA;;iBAEF;mBACE;mBACA;qBACE;uBACE;uBACA;;;;;eAKR;iBACE;iBACA;iBACA;mBACE;mBACA;mBACA;mBACA;;iBAEF;mBACE;mBACA;qBACE;uBACE;uBACA;;;;;eAKR;iBACE;iBACA;iBACA;mBACE;mBACA;mBACA;mBACA;;iBAEF;mBACE;mBACA;qBACE;uBACE;uBACA;;;;;eAKR;iBACE;iBACA;iBACA;iBACA;mBACE;;;eAGJ;iBACE;iBACA;iBACA;mBACE;;;eAGJ;iBACE;iBACA;iBACA;iBACA;mBACE;mBACA;mBACA;mBACA;;iBAEF;mBACE;mBACA;qBACE;uBACE;uBACA;;;;;eAKR;iBACE;iBACA;iBACA;mBACE;mBACA;mBACA;mBACA;;iBAEF;mBACE;mBACA;qBACE;uBACE;uBACA;;;;;eAKR;iBACE;iBACA;iBACA;iBACA;mBACE;mBACA;qBACE;;;;eAIN;iBACE;iBACA;iBACA;mBACE;mBACA;qBACE;;;;eAIN;iBACE;iBACA;iBACA;iBACA;mBACE;;;eAGJ;iBACE;iBACA;iBACA;iBACA;mBACE;;;;aAIN,WAAW,SAAS,kEAAkE;aACtF,uEAAuE;;WAEzE;aACE;aACA,YAAY,8DAA8D;eACxE;eACA;iBACE;iBACA,MAAM,uBAAuB,cAAc,eAAe;iBAC1D;;;aAGJ;;aAEA;aACA,YAAY,8DAA8D;eACxE;eACA;iBACE;iBACA,MAAM,WAAW;iBACjB;;;aAGJ;;aAEA;aACA,YAAY,8DAA8D;eACxE;eACA;iBACE;iBACA,MAAM,wBAAwB,cAAc,gBAAgB;iBAC5D;;;aAGJ;;aAEA;aACA,8DAA8D;4DACf;WACjD;aACE,yBAAyB;aACzB,gFAAgF;;WAElF;WACA;WACA;WACA;WACA;WACA;WACA,mEAAmE;WACnE;aACE;aACA;;WAEF,eAAe;;cAEZ,kCAAkC;WACrC,eAAe;WACf;aACE;eACE;eACA"}
|
|
1
|
+
{"version":3,"file":"pack-CuB4QWcE.d.mts","names":[],"sources":["../../../../3-targets/mysql/1-mysql/1-target/dist/pack.d.mts"],"mappings":";;;;;;;;;;;KAWK;UACK;WACC,MAAM;WACN;;;;;KAKN;;;UAGK;WACC;WACA,MAAM;WACN;;UAED;WACC;WACA,MAAM;WACN,UAAU,cAAc;WACxB;;KAEN,eAAe,YAAY;;;;;;;;;;cAUlB,uBAAuB;WAC1B,OAAO;WACP,MAAM;WACN;WACA;WACA,QAAQ;;WAER;EACT,YAAY,OAAO,YAAY,gBAAgB,QAAQ,YAAY;MAC/D;MACA;;EAEJ,SAAS;EACT,UAAU;;MAEN,sBAAsB;;MAEtB,sBAAsB;;MAEtB,aAAa;;MAEb,aAAa;;KAEd,gBAAgB,aAAa;cACpB;;UAEJ;SACD,QAAQ;SACR,OAAO,OAAO,cAAc;SAC5B,QAAQ,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BACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;;eAMV;iBACE;iBACA;iBACA;mBACE;mBACA;mBACA;mBACA;mBACA;;mBAEA;mBACA;mBACA;mBACA;mBACA;;mBAEA;mBACA;mBACA;mBACA;;iBAEF;mBACE;qBACE;qBACA;;mBAEF;mBACA;qBACE;;;mBAGF;qBACE;qBACA;;mBAEF;mBACA;qBACE;;;mBAGF;qBACE;qBACA;;mBAEF;mBACA;qBACE;;;mBAGF;qBACE;qBACA;;mBAEF;mBACA;qBACE;;;mBAGF;qBACE;qBACA;;mBAEF;mBACA;qBACE;;;mBAGF;qBACE;qBACA;;mBAEF;mBACA;qBACE;;;;eAIN;iBACE;iBACA;iBACA;mBACE;mBACA;mBACA;mBACA;mBACA;;mBAEA;mBACA;mBACA;mBACA;mBACA;;iBAEF;mBACE;qBACE;qBACA;;mBAEF;;mBAEA;qBACE;qBACA;;mBAEF;;;eAGJ;iBACE;iBACA;iBACA;mBACE;mBACA;mBACA;mBACA;mBACA;;mBAEA;mBACA;mBACA;mBACA;mBACA;;mBAEA;mBACA;mBACA;mBACA;;iBAEF;mBACE;qBACE;qBACA;;mBAEF;mBACA;qBACE;;;mBAGF;qBACE;qBACA;;mBAEF;mBACA;qBACE;;;;eAIN;iBACE;iBACA;iBACA;mBACE;mBACA;mBACA;mBACA;mBACA;;mBAEA;mBACA;mBACA;mBACA;mBACA;;iBAEF;mBACE;qBACE;qBACA;;mBAEF;;;eAGJ;iBACE;iBACA;iBACA;iBACA;mBACE;mBACA;mBACA;mBACA;;iBAEF;mBACE;mBACA;qBACE;uBACE;uBACA;;;;;eAKR;iBACE;iBACA;iBACA;mBACE;mBACA;mBACA;mBACA;;iBAEF;mBACE;mBACA;qBACE;uBACE;uBACA;;;;;eAKR;iBACE;iBACA;iBACA;mBACE;mBACA;mBACA;mBACA;;iBAEF;mBACE;mBACA;qBACE;uBACE;uBACA;;;;;eAKR;iBACE;iBACA;iBACA;iBACA;mBACE;mBACA;mBACA;mBACA;;iBAEF;mBACE;mBACA;qBACE;uBACE;uBACA;;;;;eAKR;iBACE;iBACA;iBACA;mBACE;mBACA;mBACA;mBACA;;iBAEF;mBACE;mBACA;qBACE;uBACE;uBACA;;;;;eAKR;iBACE;iBACA;iBACA;mBACE;mBACA;mBACA;mBACA;;iBAEF;mBACE;mBACA;qBACE;uBACE;uBACA;;;;;eAKR;iBACE;iBACA;iBACA;iBACA;mBACE;;;eAGJ;iBACE;iBACA;iBACA;mBACE;;;eAGJ;iBACE;iBACA;iBACA;iBACA;mBACE;mBACA;mBACA;mBACA;;iBAEF;mBACE;mBACA;qBACE;uBACE;uBACA;;;;;eAKR;iBACE;iBACA;iBACA;mBACE;mBACA;mBACA;mBACA;;iBAEF;mBACE;mBACA;qBACE;uBACE;uBACA;;;;;eAKR;iBACE;iBACA;iBACA;iBACA;mBACE;mBACA;qBACE;;;;eAIN;iBACE;iBACA;iBACA;mBACE;mBACA;qBACE;;;;eAIN;iBACE;iBACA;iBACA;iBACA;mBACE;;;eAGJ;iBACE;iBACA;iBACA;iBACA;mBACE;;;;aAIN,WAAW,SAAS,kEAAkE;aACtF,uEAAuE;;WAEzE;aACE;aACA,YAAY,8DAA8D;eACxE;eACA;iBACE;iBACA,MAAM,uBAAuB,cAAc,eAAe;iBAC1D;;;aAGJ;;aAEA;aACA,YAAY,8DAA8D;eACxE;eACA;iBACE;iBACA,MAAM,WAAW;iBACjB;;;aAGJ;;aAEA;aACA,YAAY,8DAA8D;eACxE;eACA;iBACE;iBACA,MAAM,wBAAwB,cAAc,gBAAgB;iBAC5D;;;aAGJ;;aAEA;aACA,8DAA8D;4DACf;WACjD;aACE,yBAAyB;aACzB,gFAAgF;;WAElF;WACA;WACA;WACA;WACA;WACA;WACA,mEAAmE;WACnE;aACE;;WAEF,eAAe;;cAEZ,kCAAkC;WACrC,eAAe;WACf;aACE;eACE;eACA"}
|
|
@@ -50,5 +50,16 @@ declare class MysqlContractSerializer extends SqlContractSerializerBase<Contract
|
|
|
50
50
|
interface MysqlRuntimeTargetInstance extends RuntimeTargetInstance<'sql', 'mysql'> {}
|
|
51
51
|
declare const mysqlRuntimeTargetDescriptor: SqlRuntimeTargetDescriptor<'mysql', MysqlRuntimeTargetInstance>;
|
|
52
52
|
//#endregion
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
//#region src/core/transaction-isolation.d.ts
|
|
54
|
+
declare const mysqlIsolationLevels: {
|
|
55
|
+
readonly ReadUncommitted: "ReadUncommitted";
|
|
56
|
+
readonly ReadCommitted: "ReadCommitted";
|
|
57
|
+
readonly RepeatableRead: "RepeatableRead";
|
|
58
|
+
readonly Serializable: "Serializable";
|
|
59
|
+
};
|
|
60
|
+
type MysqlIsolationLevel = (typeof mysqlIsolationLevels)[keyof typeof mysqlIsolationLevels];
|
|
61
|
+
declare const mysqlIsolationLevelSchema: import("arktype/internal/variants/string.ts").StringType<"ReadUncommitted" | "ReadCommitted" | "RepeatableRead" | "Serializable", {}>;
|
|
62
|
+
declare function validateMysqlIsolationLevel(value: unknown): MysqlIsolationLevel;
|
|
63
|
+
//#endregion
|
|
64
|
+
export { mysqlIsolationLevels as a, validateMysqlIsolationLevel as c, mysqlIsolationLevelSchema as i, MysqlIsolationLevel as n, mysqlNowGenerators as o, MysqlRuntimeTargetInstance as r, mysqlRuntimeTargetDescriptor as s, MysqlContractSerializer as t };
|
|
65
|
+
//# sourceMappingURL=runtime-CbqytTbM.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-
|
|
1
|
+
{"version":3,"file":"runtime-CbqytTbM.d.mts","names":[],"sources":["../../../../3-targets/mysql/1-mysql/1-target/dist/runtime.d.mts"],"mappings":";;;;;;;;;;;;iBAWiB,WAAW,SAAS,kBAAkB,SAAS;iBAC/C,gBAAgB,SAAS;iBACzB,aAAa,SAAS,kBAAkB,SAAS;iBACjD,iBAAiB,SAAS;iBAC1B,cAAc,SAAS;;;;cAI1B;WACH;WACA,iBAAiB;;WAEjB;WACA,iBAAiB;;WAEjB;WACA,iBAAiB;;WAEjB;WACA,iBAAiB;;WAEjB;WACA,iBAAiB,UAAU;;WAE3B;WACA,iBAAiB;;;;;cAKd,gCAAgC,0BAA0B,SAAS;EAC/E;YACU,yBAAyB,cAAc,KAAK,0BAA0B,YAAY;EAC5F,kBAAkB,UAAU,SAAS,cAAc;;;;UAI3C,mCAAmC;cAC/B,8BAA8B,oCAAoC;;;cAGlE;WACH;WACA;WACA;WACA;;KAEN,8BAA8B,mCAAmC;cACxD,yEAAyE;iBACtE,4BAA4B,iBAAiB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { i as validateMysqlIsolationLevel } from "./runtime-DUDdsFyy.mjs";
|
|
1
2
|
import { c as mysqlConnectionOptions, d as mysqlPoolOptions, f as normalizeMysqlError, i as connectingCannotSucceed, l as mysqlDriverDescriptorMetaFor, m as statementFor, n as acquireClientQueryLock, s as isFatal, t as SessionSettingsGuard, u as mysqlPoolIdleTimeoutMillis } from "./statement-CT5tB4uX-CHqHFM3z.mjs";
|
|
2
3
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
3
4
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
@@ -114,7 +115,7 @@ function startStream(client, request, outcome) {
|
|
|
114
115
|
const { sql, values } = statementFor(client, request.sql, request.params ?? []);
|
|
115
116
|
return client.queryStream(sql, values);
|
|
116
117
|
} catch (error) {
|
|
117
|
-
|
|
118
|
+
settle(error, outcome);
|
|
118
119
|
}
|
|
119
120
|
}
|
|
120
121
|
/** What a statement's result reports: the rows it changed, and, when it changed one row, the value MySQL numbered for it. MySQL reports 0 when it numbered none. */
|
|
@@ -130,13 +131,13 @@ function statementStats(result) {
|
|
|
130
131
|
/** The error to report for `error`, after noting in `outcome` whether it left the client unusable. */
|
|
131
132
|
function settle(error, outcome) {
|
|
132
133
|
if (isFatal(error)) outcome.destroy = true;
|
|
133
|
-
|
|
134
|
+
throw normalizeMysqlError(error);
|
|
134
135
|
}
|
|
135
136
|
/**
|
|
136
137
|
* Whether the package has received the end of the result, so that any rows the caller has not read are already in the stream's buffer. The package pushes the end of the stream when MySQL's last packet arrives; Node records that in `_readableState.ended`, and its public API reports the end only after the caller has read every row.
|
|
137
138
|
*/
|
|
138
139
|
function resultReceived(rows) {
|
|
139
|
-
const state =
|
|
140
|
+
const state = "_readableState" in rows ? rows._readableState : void 0;
|
|
140
141
|
return typeof state === "object" && state !== null && "ended" in state && state.ended === true;
|
|
141
142
|
}
|
|
142
143
|
/**
|
|
@@ -213,7 +214,7 @@ var MysqlQueryable = class {
|
|
|
213
214
|
releaseLock();
|
|
214
215
|
}
|
|
215
216
|
} catch (error) {
|
|
216
|
-
|
|
217
|
+
settle(error, outcome);
|
|
217
218
|
} finally {
|
|
218
219
|
await this.releaseClient(client, outcome);
|
|
219
220
|
}
|
|
@@ -241,7 +242,7 @@ var MysqlQueryable = class {
|
|
|
241
242
|
settled = true;
|
|
242
243
|
} catch (error) {
|
|
243
244
|
settled = true;
|
|
244
|
-
|
|
245
|
+
settle(error, outcome);
|
|
245
246
|
} finally {
|
|
246
247
|
if (!settled && !this.handedBack) await this.#stopEarly(client, rows, outcome);
|
|
247
248
|
if (outcome.destroy) rows.destroy();
|
|
@@ -370,8 +371,18 @@ var MysqlConnectionImpl = class extends MysqlHeldQueryable {
|
|
|
370
371
|
this.#onRelease = void 0;
|
|
371
372
|
onRelease?.();
|
|
372
373
|
}
|
|
373
|
-
async beginTransaction() {
|
|
374
|
-
|
|
374
|
+
async beginTransaction(start) {
|
|
375
|
+
const isolationLevel = start?.isolationLevel === void 0 ? void 0 : validateMysqlIsolationLevel(start.isolationLevel);
|
|
376
|
+
const statements = {
|
|
377
|
+
ReadUncommitted: "SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED",
|
|
378
|
+
ReadCommitted: "SET TRANSACTION ISOLATION LEVEL READ COMMITTED",
|
|
379
|
+
RepeatableRead: "SET TRANSACTION ISOLATION LEVEL REPEATABLE READ",
|
|
380
|
+
Serializable: "SET TRANSACTION ISOLATION LEVEL SERIALIZABLE"
|
|
381
|
+
};
|
|
382
|
+
await this.underLock(async () => {
|
|
383
|
+
if (isolationLevel !== void 0) await this.client.query(statements[isolationLevel]);
|
|
384
|
+
await this.client.beginTransaction();
|
|
385
|
+
});
|
|
375
386
|
return new MysqlTransactionImpl(this.client, this.held, this.streams);
|
|
376
387
|
}
|
|
377
388
|
/**
|
|
@@ -421,6 +432,27 @@ var MysqlTransactionImpl = class extends MysqlHeldQueryable {
|
|
|
421
432
|
async rollback() {
|
|
422
433
|
await this.underLock(() => this.client.rollback());
|
|
423
434
|
}
|
|
435
|
+
async savepoint(name) {
|
|
436
|
+
await this.underLock(() => this.client.query(`SAVEPOINT ${name}`));
|
|
437
|
+
return new MysqlSavepointImpl(this.client, this.held, this.streams, name);
|
|
438
|
+
}
|
|
439
|
+
};
|
|
440
|
+
var MysqlSavepointImpl = class MysqlSavepointImpl extends MysqlHeldQueryable {
|
|
441
|
+
name;
|
|
442
|
+
constructor(client, held, streams, name) {
|
|
443
|
+
super(client, held, streams);
|
|
444
|
+
this.name = name;
|
|
445
|
+
}
|
|
446
|
+
async commit() {
|
|
447
|
+
await this.underLock(() => this.client.query(`RELEASE SAVEPOINT ${this.name}`));
|
|
448
|
+
}
|
|
449
|
+
async rollback() {
|
|
450
|
+
await this.underLock(() => this.client.query(`ROLLBACK TO SAVEPOINT ${this.name}`));
|
|
451
|
+
}
|
|
452
|
+
async savepoint(name) {
|
|
453
|
+
await this.underLock(() => this.client.query(`SAVEPOINT ${name}`));
|
|
454
|
+
return new MysqlSavepointImpl(this.client, this.held, this.streams, name);
|
|
455
|
+
}
|
|
424
456
|
};
|
|
425
457
|
/** How many clients the driver has handed out and not had back, a held connection or one lent to a single statement, so `close()` can wait until every one is back. */
|
|
426
458
|
var ClientsInUse = class {
|
|
@@ -566,4 +598,4 @@ const mysqlRuntimeDriverDescriptor = createMysqlRuntimeDriverDescriptor("mysql")
|
|
|
566
598
|
//#endregion
|
|
567
599
|
export { mysqlRuntimeDriverDescriptor as n, createMysqlRuntimeDriverDescriptor as t };
|
|
568
600
|
|
|
569
|
-
//# sourceMappingURL=runtime-
|
|
601
|
+
//# sourceMappingURL=runtime-DB0w8R7i.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-DB0w8R7i.mjs","names":["#url","#idleTimeoutMillis","#closed","#idleTimer","#connection","#open","#setAside","#pending","#pendingOn","#idleLater","#streamRows","#runReleasing","#stopEarly","#refuseIfUnusable","#onRelease","#cancelRunning","#runningSettled","#close","#released","#count","#idle","#fail","#canceller","#options","#sessionSettings","#state","#inUse"],"sources":["../../../../3-targets/mysql/1-mysql/3-driver/dist/runtime.mjs"],"sourcesContent":["import { a as connectingCannotSucceed, c as isFatal, d as mysqlConnectionOptions, f as mysqlPoolIdleTimeoutMillis, l as normalizeMysqlError, m as acquireClientQueryLock, n as SessionSettingsGuard, p as mysqlPoolOptions, t as statementFor, u as mysqlDriverDescriptorMetaFor } from \"./statement-CT5tB4uX.mjs\";\nimport { errorRuntime } from \"@internal/errors/execution\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { createConnection, createPool } from \"mariadb\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { EventEmitter } from \"node:events\";\nimport { finished } from \"node:stream/promises\";\nimport { validateMysqlIsolationLevel } from \"@internal/target-mysql/runtime\";\n//#region src/core/runtime/canceller.ts\n/** How long the canceller waits to open its connection, and for MySQL to answer a `KILL QUERY`. */\nconst CANCEL_TIMEOUT_MILLIS = 2e3;\nfunction timeout(millis) {\n\tlet timer;\n\treturn {\n\t\texpired: new Promise((resolve) => {\n\t\t\ttimer = setTimeout(() => resolve(\"expired\"), millis);\n\t\t}),\n\t\tclear: () => clearTimeout(timer)\n\t};\n}\n/**\n* Cancels statements with `KILL QUERY`, which MySQL takes only from another connection. It keeps one connection of its own, outside the pool, so a cancel neither waits for a pooled connection nor normally opens one; it opens it on first need, and ends it once it has been idle for the pool's idle timeout, as the pool ends its own; with a timeout of 0 it keeps it open, as the pool keeps its own. Opening it and each `KILL QUERY` are bounded by two seconds. The connection is never destroyed: the package's `destroy()` sends a `KILL` of its own whose failure it does not handle (`mariadb` 3.5.4). A connection that stops answering is set aside and ended with `end()` once its statement settles.\n*/\nvar Canceller = class {\n\t#url;\n\t#idleTimeoutMillis;\n\t#connection;\n\t#pending = /* @__PURE__ */ new WeakMap();\n\t#closed = false;\n\t#idleTimer;\n\tconstructor(url, idleTimeoutMillis) {\n\t\tthis.#url = url;\n\t\tthis.#idleTimeoutMillis = idleTimeoutMillis;\n\t}\n\t/** Sends `KILL QUERY` for `threadId`. Never rejects. A kept connection that is no longer valid is replaced once. */\n\tasync cancel(threadId, replaced = false) {\n\t\tif (this.#closed || threadId === null) return \"unsent\";\n\t\tclearTimeout(this.#idleTimer);\n\t\tconst opening = this.#connection ?? this.#open();\n\t\tthis.#connection = opening;\n\t\tconst connection = await opening;\n\t\tif (connection === void 0) {\n\t\t\tthis.#setAside(opening);\n\t\t\treturn \"unsent\";\n\t\t}\n\t\tif (!connection.isValid()) {\n\t\t\tthis.#setAside(opening);\n\t\t\treturn replaced ? \"unsent\" : this.cancel(threadId, true);\n\t\t}\n\t\tthis.#pending.set(connection, this.#pendingOn(connection) + 1);\n\t\tconst killing = connection.query(\"KILL QUERY ?\", [threadId]).then(() => \"sent\", (error) => isFatal(error) ? \"unconfirmed\" : \"unsent\");\n\t\tkilling.then(() => {\n\t\t\tthis.#pending.set(connection, this.#pendingOn(connection) - 1);\n\t\t\tthis.#idleLater(opening, connection);\n\t\t});\n\t\tconst limit = timeout(CANCEL_TIMEOUT_MILLIS);\n\t\tconst result = await Promise.race([killing, limit.expired]);\n\t\tlimit.clear();\n\t\tif (result === \"sent\" || result === \"unsent\") return result;\n\t\tthis.#setAside(opening);\n\t\tconnection.end().catch(() => void 0);\n\t\treturn \"unconfirmed\";\n\t}\n\t/** Ends the connection: `end()` sends `QUIT` once any `KILL QUERY` on it settles. Waits for that only when no `KILL QUERY` is pending on it, so a connection that stopped answering cannot hold `close()` up. */\n\tasync close() {\n\t\tthis.#closed = true;\n\t\tclearTimeout(this.#idleTimer);\n\t\tconst connection = await this.#connection;\n\t\tthis.#connection = void 0;\n\t\tif (connection === void 0) return;\n\t\tconst ending = connection.end().catch(() => void 0);\n\t\tif (this.#pendingOn(connection) === 0) await ending;\n\t}\n\t#idleLater(opening, connection) {\n\t\tif (this.#idleTimeoutMillis === 0 || this.#pendingOn(connection) > 0 || this.#connection !== opening) return;\n\t\tclearTimeout(this.#idleTimer);\n\t\tthis.#idleTimer = setTimeout(() => {\n\t\t\tif (this.#pendingOn(connection) > 0 || this.#connection !== opening) return;\n\t\t\tthis.#connection = void 0;\n\t\t\tconnection.end().catch(() => void 0);\n\t\t}, this.#idleTimeoutMillis);\n\t\tthis.#idleTimer.unref();\n\t}\n\t#pendingOn(connection) {\n\t\treturn this.#pending.get(connection) ?? 0;\n\t}\n\t#setAside(opening) {\n\t\tif (this.#connection === opening) this.#connection = void 0;\n\t}\n\tasync #open() {\n\t\ttry {\n\t\t\tconst connection = await createConnection(mysqlConnectionOptions(this.#url, { connectTimeoutMs: CANCEL_TIMEOUT_MILLIS }));\n\t\t\tconnection.on(\"error\", () => void 0);\n\t\t\tif (this.#closed) {\n\t\t\t\tawait connection.end().catch(() => void 0);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn connection;\n\t\t} catch {\n\t\t\treturn;\n\t\t}\n\t}\n};\n//#endregion\n//#region src/core/runtime/mysql-driver.ts\nfunction notConnected(message) {\n\treturn errorRuntime(\"DRIVER.NOT_CONNECTED\", message, { fix: \"Call connect(binding) before running queries, and do not use the driver after close().\" });\n}\n/** Runs `request` on `client` in one round trip and returns its result: its `?N` placeholders written as `?`, and its values handed to the package, which writes them into the statement. Throws the package's error as it is. */\nasync function run(client, request) {\n\tconst { sql, values } = statementFor(client, request.sql, request.params ?? []);\n\treturn client.query(sql, values);\n}\n/** Starts streaming the rows of `request` on `client`, sent as {@link run} sends it. Throws the error to report, after noting in `outcome` whether it left the client unusable. */\nfunction startStream(client, request, outcome) {\n\ttry {\n\t\tconst { sql, values } = statementFor(client, request.sql, request.params ?? []);\n\t\treturn client.queryStream(sql, values);\n\t} catch (error) {\n\t\tsettle(error, outcome);\n\t}\n}\n/** What a statement's result reports: the rows it changed, and, when it changed one row, the value MySQL numbered for it. MySQL reports 0 when it numbered none. */\nfunction statementStats(result) {\n\tif (typeof result !== \"object\" || result === null) return { affectedRows: 0 };\n\tconst affectedRows = \"affectedRows\" in result && typeof result.affectedRows === \"number\" ? result.affectedRows : 0;\n\tconst insertId = \"insertId\" in result ? result.insertId : void 0;\n\treturn affectedRows === 1 && (typeof insertId === \"bigint\" || typeof insertId === \"number\") && insertId > 0 ? {\n\t\taffectedRows,\n\t\tinsertId: String(insertId)\n\t} : { affectedRows };\n}\n/** The error to report for `error`, after noting in `outcome` whether it left the client unusable. */\nfunction settle(error, outcome) {\n\tif (isFatal(error)) outcome.destroy = true;\n\tthrow normalizeMysqlError(error);\n}\n/**\n* Whether the package has received the end of the result, so that any rows the caller has not read are already in the stream's buffer. The package pushes the end of the stream when MySQL's last packet arrives; Node records that in `_readableState.ended`, and its public API reports the end only after the caller has read every row.\n*/\nfunction resultReceived(rows) {\n\tconst state = \"_readableState\" in rows ? rows._readableState : void 0;\n\treturn typeof state === \"object\" && state !== null && \"ended\" in state && state.ended === true;\n}\n/**\n* Reads and drops what is left of a stream's result. The package's `close()` stops it keeping new rows; the rows already buffered are read here with `read()`, which works whether or not the caller's iterator is still attached to the stream, so an iterator the caller abandoned cannot hold the drain up.\n*/\nasync function dropRest(rows) {\n\trows.close?.();\n\tconst drain = () => {\n\t\twhile (rows.read() !== null);\n\t};\n\trows.on(\"readable\", drain);\n\ttry {\n\t\tdrain();\n\t\tawait finished(rows);\n\t} finally {\n\t\trows.off(\"readable\", drain);\n\t}\n}\nfunction cancelNotConfirmed() {\n\treturn errorRuntime(\"DRIVER.NOT_CONNECTED\", \"A cancel on this MySQL connection could not be confirmed, so the connection can no longer be used\", {\n\t\twhy: \"The driver cancelled a stream the caller stopped early, and MySQL did not answer the KILL QUERY in time. It may still arrive and would interrupt whatever statement the connection runs then.\",\n\t\tfix: \"Release the connection, which closes it; MySQL rolls back an open transaction on it. Acquire another connection and run the work again.\"\n\t});\n}\nfunction connectionReleased() {\n\treturn errorRuntime(\"DRIVER.NOT_CONNECTED\", \"MySQL connection was released\", { fix: \"Send statements on a connection only until you release it, and await each one before release().\" });\n}\n/** The package can report an error on a stream after the caller stopped reading it, such as MySQL's for a statement the driver cancelled; the generator has already settled by then. */\nfunction ignoreAfterStop() {}\n/** MySQL's error for a statement `KILL QUERY` cancelled (`ER_QUERY_INTERRUPTED`). The package marks it fatal when it arrives in the middle of a result, but the connection stays usable. */\nfunction isQueryInterrupted(error) {\n\treturn error instanceof Error && \"errno\" in error && error.errno === 1317;\n}\nvar MysqlQueryable = class {\n\tstreams;\n\tconstructor(streams) {\n\t\tthis.streams = streams;\n\t}\n\t/** Records a stream that is open, and returns the call that records its end. */\n\tstreamOpened(_rows) {\n\t\treturn () => {};\n\t}\n\t/** Takes the client's lock, which keeps statements on it one at a time in the order sent. */\n\tlockClient(client) {\n\t\treturn acquireClientQueryLock(client);\n\t}\n\t/** Runs one statement that is not a stream, under the client's lock. */\n\trunStatement(work) {\n\t\treturn work();\n\t}\n\t/** Whether the client went back to the pool under this queryable, so it must send nothing more on it. */\n\tget handedBack() {\n\t\treturn false;\n\t}\n\tasync *query(request) {\n\t\tif (this.streams) {\n\t\t\tyield* this.#streamRows(request);\n\t\t\treturn;\n\t\t}\n\t\tconst result = await this.#runReleasing(request);\n\t\tfor (const row of Array.isArray(result) ? result : []) yield blindCast(row);\n\t}\n\tasync execute(request) {\n\t\treturn statementStats(await this.#runReleasing(request));\n\t}\n\tasync #runReleasing(request) {\n\t\tconst client = await this.acquireClient();\n\t\tconst outcome = { destroy: false };\n\t\ttry {\n\t\t\tconst releaseLock = await this.lockClient(client);\n\t\t\ttry {\n\t\t\t\treturn await this.runStatement(() => run(client, request));\n\t\t\t} finally {\n\t\t\t\treleaseLock();\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tsettle(error, outcome);\n\t\t} finally {\n\t\t\tawait this.releaseClient(client, outcome);\n\t\t}\n\t}\n\t/**\n\t* Streams the rows of `request` as they arrive; the package pauses the socket while the caller is busy. A caller that stops reading early is handled by {@link MysqlQueryable.#stopEarly}. A fatal error, such as a lost connection, destroys the client.\n\t*/\n\tasync *#streamRows(request) {\n\t\tconst client = await this.acquireClient();\n\t\tconst outcome = { destroy: false };\n\t\tlet releaseLock;\n\t\ttry {\n\t\t\treleaseLock = await this.lockClient(client);\n\t\t} catch (error) {\n\t\t\tawait this.releaseClient(client, outcome);\n\t\t\tthrow error;\n\t\t}\n\t\ttry {\n\t\t\tconst rows = startStream(client, request, outcome);\n\t\t\trows.on(\"error\", ignoreAfterStop);\n\t\t\tconst streamClosed = this.streamOpened(rows);\n\t\t\tlet settled = false;\n\t\t\ttry {\n\t\t\t\tfor await (const row of rows.iterator({ destroyOnReturn: false })) yield blindCast(row);\n\t\t\t\tsettled = true;\n\t\t\t} catch (error) {\n\t\t\t\tsettled = true;\n\t\t\t\tsettle(error, outcome);\n\t\t\t} finally {\n\t\t\t\tif (!settled && !this.handedBack) await this.#stopEarly(client, rows, outcome);\n\t\t\t\tif (outcome.destroy) rows.destroy();\n\t\t\t\tstreamClosed();\n\t\t\t}\n\t\t} finally {\n\t\t\treleaseLock();\n\t\t\tawait this.releaseClient(client, outcome);\n\t\t}\n\t}\n\t/**\n\t* Ends a stream the caller stopped reading early, and keeps the client usable. While its result is still arriving, the statement is first cancelled with `KILL QUERY`, so a large result is not downloaded only to be thrown away; MySQL does not say how many rows remain. On a held connection or in a transaction, as on a pooled one: `KILL QUERY` ends only the statement, the session survives, and in a transaction MySQL rolls back only that statement. The rest of the result is then read and dropped, MySQL's error for the cancelled statement among it. The client is never destroyed while its statement runs: the package's `destroy()` would send `KILL` itself, on a connection whose failure it does not handle.\n\t*/\n\tasync #stopEarly(client, rows, outcome) {\n\t\tconst cancel = resultReceived(rows) ? \"unsent\" : await this.cancelStatement(client.threadId);\n\t\tawait dropRest(rows).catch((error) => {\n\t\t\tif (isFatal(error) && !(cancel !== \"unsent\" && isQueryInterrupted(error))) outcome.destroy = true;\n\t\t});\n\t\tif (cancel === \"unconfirmed\") this.cancelUnconfirmed(outcome);\n\t}\n\t/**\n\t* A cancel that went out without an answer may still reach MySQL and interrupt the next statement on the client, so the client must not serve another caller. Once its rest has been read, nothing is receiving on it, so closing it sends no `KILL` of the package's own; a late `KILL QUERY` then finds no thread.\n\t*/\n\tcancelUnconfirmed(outcome) {\n\t\toutcome.destroy = true;\n\t}\n};\nfunction handedBackState() {\n\tlet refuse = () => {};\n\tconst signal = new Promise((_, reject) => {\n\t\trefuse = () => reject(connectionReleased());\n\t});\n\tsignal.catch(() => void 0);\n\tconst state = {\n\t\tdone: false,\n\t\tsignal,\n\t\trefuse: () => {\n\t\t\tstate.done = true;\n\t\t\trefuse();\n\t\t}\n\t};\n\treturn state;\n}\n/**\n* A queryable on a connection the caller holds, whose statements all run on the same session, in the order they are sent, under the client's lock. A statement sent while a stream on the connection is open waits for that stream to end; one awaited inside the stream's own loop never finishes, as on Postgres with a cursor.\n*/\nvar MysqlHeldQueryable = class extends MysqlQueryable {\n\tclient;\n\theld;\n\tholdsClient = true;\n\tget cancelStatement() {\n\t\treturn this.held.cancel;\n\t}\n\tstreamOpened(rows) {\n\t\tthis.held.streams.add(rows);\n\t\treturn () => this.held.streams.delete(rows);\n\t}\n\tget handedBack() {\n\t\treturn this.held.handedBack.done;\n\t}\n\tcancelUnconfirmed() {\n\t\tthis.held.cancelUnconfirmed = true;\n\t}\n\t/** Takes the client's lock, or fails once the connection is handed back, whether the statement was sent after that or was still waiting for the lock. A lock taken after that is given straight back. */\n\tasync lockClient(client) {\n\t\tthis.#refuseIfUnusable();\n\t\tconst locking = acquireClientQueryLock(client);\n\t\ttry {\n\t\t\tconst releaseLock = await Promise.race([locking, this.held.handedBack.signal]);\n\t\t\tif (!this.held.handedBack.done && !this.held.cancelUnconfirmed) return releaseLock;\n\t\t\treleaseLock();\n\t\t} catch {\n\t\t\tlocking.then((releaseLock) => releaseLock());\n\t\t}\n\t\tthis.#refuseIfUnusable();\n\t\tthrow connectionReleased();\n\t}\n\t/** Refuses a statement on a connection that was handed back, or whose cancel went out without an answer: a late `KILL QUERY` would interrupt it. */\n\t#refuseIfUnusable() {\n\t\tif (this.held.handedBack.done) throw connectionReleased();\n\t\tif (this.held.cancelUnconfirmed) throw cancelNotConfirmed();\n\t}\n\trunStatement(work) {\n\t\tconst running = work();\n\t\tthis.held.running.add(running);\n\t\trunning.then(() => this.held.running.delete(running), () => this.held.running.delete(running));\n\t\treturn running;\n\t}\n\tconstructor(client, held, streams) {\n\t\tsuper(streams);\n\t\tthis.client = client;\n\t\tthis.held = held;\n\t}\n\tasync acquireClient() {\n\t\tthis.#refuseIfUnusable();\n\t\treturn this.client;\n\t}\n\tasync releaseClient() {}\n\t/** Runs one of the package's transaction calls under the client's lock, taken as a statement takes it, so it keeps its place among the statements sent. */\n\tasync underLock(call) {\n\t\tconst client = await this.acquireClient();\n\t\tconst releaseLock = await this.lockClient(client);\n\t\ttry {\n\t\t\tawait this.runStatement(call);\n\t\t} catch (error) {\n\t\t\tthrow normalizeMysqlError(error);\n\t\t} finally {\n\t\t\treleaseLock();\n\t\t}\n\t}\n};\nvar MysqlConnectionImpl = class extends MysqlHeldQueryable {\n\t#onRelease;\n\tconstructor(client, streams, cancel, onRelease) {\n\t\tsuper(client, {\n\t\t\tstreams: /* @__PURE__ */ new Set(),\n\t\t\tcancelUnconfirmed: false,\n\t\t\trunning: /* @__PURE__ */ new Set(),\n\t\t\tcancel,\n\t\t\thandedBack: handedBackState()\n\t\t}, streams);\n\t\tthis.#onRelease = onRelease;\n\t}\n\t#released() {\n\t\tconst onRelease = this.#onRelease;\n\t\tthis.#onRelease = void 0;\n\t\tonRelease?.();\n\t}\n\tasync beginTransaction(start) {\n\t\tconst isolationLevel = start?.isolationLevel === void 0 ? void 0 : validateMysqlIsolationLevel(start.isolationLevel);\n\t\tconst statements = {\n\t\t\tReadUncommitted: \"SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED\",\n\t\t\tReadCommitted: \"SET TRANSACTION ISOLATION LEVEL READ COMMITTED\",\n\t\t\tRepeatableRead: \"SET TRANSACTION ISOLATION LEVEL REPEATABLE READ\",\n\t\t\tSerializable: \"SET TRANSACTION ISOLATION LEVEL SERIALIZABLE\"\n\t\t};\n\t\tawait this.underLock(async () => {\n\t\t\tif (isolationLevel !== void 0) await this.client.query(statements[isolationLevel]);\n\t\t\tawait this.client.beginTransaction();\n\t\t});\n\t\treturn new MysqlTransactionImpl(this.client, this.held, this.streams);\n\t}\n\t/**\n\t* Returns the connection to the pool, as the Postgres driver's `release()` does. From then on the connection refuses every statement, those still waiting for its lock included, so none runs later in another caller's session. A statement that is not a stream and is already running finishes, as on Postgres. A stream still open, such as one the caller dropped, is cancelled and read to its end by the driver: the package's release sends `ROLLBACK` behind that statement and waits for it, which would otherwise never finish, where `pg`'s release does not wait on the server.\n\t*/\n\tasync release() {\n\t\tif (this.held.handedBack.done) return;\n\t\tthis.held.handedBack.refuse();\n\t\ttry {\n\t\t\tif (this.held.streams.size > 0) await this.#cancelRunning();\n\t\t\tawait this.#runningSettled();\n\t\t\tif (this.held.cancelUnconfirmed) await this.#close();\n\t\t\telse await this.client.release();\n\t\t} finally {\n\t\t\tthis.#released();\n\t\t}\n\t}\n\t/** Closes the connection instead of returning it. It refuses every statement from then on, cancels whatever still runs and waits for it to end, so the package's `destroy()` never sends a `KILL` of its own. */\n\tasync destroy(_reason) {\n\t\tif (this.held.handedBack.done) return;\n\t\tthis.held.handedBack.refuse();\n\t\ttry {\n\t\t\tif (this.held.streams.size > 0 || this.held.running.size > 0) await this.#cancelRunning();\n\t\t\tawait this.#runningSettled();\n\t\t\tawait this.#close();\n\t\t} finally {\n\t\t\tthis.#released();\n\t\t}\n\t}\n\t/** Closes the client once the `ping` queued behind anything left on it has answered, so nothing is receiving and the package's `destroy()` sends no `KILL` of its own. */\n\tasync #close() {\n\t\tawait this.client.ping().catch(() => void 0);\n\t\tthis.client.destroy();\n\t}\n\tasync #cancelRunning() {\n\t\tif (await this.held.cancel(this.client.threadId) === \"unconfirmed\") this.held.cancelUnconfirmed = true;\n\t\tawait Promise.all([...this.held.streams].map((rows) => dropRest(rows).catch(() => void 0)));\n\t}\n\tasync #runningSettled() {\n\t\tawait Promise.allSettled([...this.held.running]);\n\t}\n};\nvar MysqlTransactionImpl = class extends MysqlHeldQueryable {\n\tasync commit() {\n\t\tawait this.underLock(() => this.client.commit());\n\t}\n\tasync rollback() {\n\t\tawait this.underLock(() => this.client.rollback());\n\t}\n\tasync savepoint(name) {\n\t\tawait this.underLock(() => this.client.query(`SAVEPOINT ${name}`));\n\t\treturn new MysqlSavepointImpl(this.client, this.held, this.streams, name);\n\t}\n};\nvar MysqlSavepointImpl = class MysqlSavepointImpl extends MysqlHeldQueryable {\n\tname;\n\tconstructor(client, held, streams, name) {\n\t\tsuper(client, held, streams);\n\t\tthis.name = name;\n\t}\n\tasync commit() {\n\t\tawait this.underLock(() => this.client.query(`RELEASE SAVEPOINT ${this.name}`));\n\t}\n\tasync rollback() {\n\t\tawait this.underLock(() => this.client.query(`ROLLBACK TO SAVEPOINT ${this.name}`));\n\t}\n\tasync savepoint(name) {\n\t\tawait this.underLock(() => this.client.query(`SAVEPOINT ${name}`));\n\t\treturn new MysqlSavepointImpl(this.client, this.held, this.streams, name);\n\t}\n};\n/** How many clients the driver has handed out and not had back, a held connection or one lent to a single statement, so `close()` can wait until every one is back. */\nvar ClientsInUse = class {\n\t#count = 0;\n\t#idle = [];\n\tacquired() {\n\t\tthis.#count += 1;\n\t}\n\treleased() {\n\t\tthis.#count -= 1;\n\t\tif (this.#count === 0) for (const resolve of this.#idle.splice(0)) resolve();\n\t}\n\tnone() {\n\t\treturn this.#count === 0 ? Promise.resolve() : new Promise((resolve) => this.#idle.push(resolve));\n\t}\n};\n/** The pool reports a connection it failed to open on its `'error'` event, and again as the cause of a `getConnection` that times out; the driver reports it there. */\nfunction ignoreConnectionFailure() {}\n/**\n* The statements waiting for a connection from the pool. The pool keeps retrying a connection it cannot open, with a growing pause between attempts, and fails a waiting `getConnection` only when `connectionTimeoutMillis` ends; the package reports each failure to its `logger.error` as it happens, together with every failed statement. `pg.Pool` instead rejects a pending connect whose connection fails, at once. So the driver fails the waiting statements at once with a failure no retry can get past. It keeps no failure: a later statement waits for the pool's next attempt.\n*/\nvar WaitingForConnection = class {\n\t#fail = /* @__PURE__ */ new Set();\n\tasync race(getting) {\n\t\tlet fail = () => {};\n\t\tconst failed = new Promise((_, reject) => {\n\t\t\tfail = reject;\n\t\t});\n\t\tthis.#fail.add(fail);\n\t\ttry {\n\t\t\treturn await Promise.race([getting, failed]);\n\t\t} finally {\n\t\t\tthis.#fail.delete(fail);\n\t\t}\n\t}\n\t/** Reacts to an error the package reports: only a failure to connect, which the package marks fatal, that no retry can get past. A statement can fail with the same error number, such as 1524 for a missing authentication plugin, but not fatally. */\n\treported(error) {\n\t\tif (!isFatal(error) || !connectingCannotSucceed(error)) return;\n\t\tfor (const fail of this.#fail) fail(error);\n\t\tthis.#fail.clear();\n\t}\n};\n/** Gives a connection the pool hands over after its statement stopped waiting back to the pool. */\nfunction releaseLate(getting) {\n\tgetting.then((late) => late.release(), ignoreConnectionFailure).catch(ignoreConnectionFailure);\n}\n/**\n* The MySQL runtime driver: a `mariadb` pool. Every statement takes one round trip over the text protocol, the package writing its values into it. A query reads its whole result before the first row unless `stream` is set. The pool runs the session setup once on each physical connection, and the driver then sets the target's session settings on it; a connection goes back to the pool after each statement as it is; a broken connection is destroyed. `close()` waits for every connection and stream it has handed out before it ends the pool.\n*/\nvar MysqlDriver = class extends MysqlQueryable {\n\tfamilyId = \"sql\";\n\ttargetId;\n\tholdsClient = false;\n\t#state = { kind: \"unbound\" };\n\t#inUse = new ClientsInUse();\n\t#canceller;\n\tcancelStatement = (threadId) => this.#canceller?.cancel(threadId) ?? Promise.resolve(\"unsent\");\n\t#options;\n\t#sessionSettings;\n\tconstructor(options, targetId) {\n\t\tsuper(options.stream ?? false);\n\t\tthis.targetId = targetId;\n\t\tthis.#options = options;\n\t\tthis.#sessionSettings = new SessionSettingsGuard(options.sessionSettings ?? {});\n\t}\n\tget state() {\n\t\treturn this.#state.kind;\n\t}\n\tasync connect(binding) {\n\t\tif (this.#state.kind === \"connected\") throw errorRuntime(\"DRIVER.ALREADY_CONNECTED\", \"MySQL driver already connected\", { fix: \"Call close() before connecting again.\" });\n\t\tconst waiting = new WaitingForConnection();\n\t\tconst pool = createPool({\n\t\t\t...mysqlPoolOptions(binding.url, this.#options.poolOptions),\n\t\t\tlogger: { error: (error) => waiting.reported(error) }\n\t\t});\n\t\tif (pool instanceof EventEmitter) pool.on(\"error\", ignoreConnectionFailure);\n\t\tthis.#state = {\n\t\t\tkind: \"connected\",\n\t\t\tpool,\n\t\t\twaiting\n\t\t};\n\t\tthis.#canceller = new Canceller(binding.url, mysqlPoolIdleTimeoutMillis(this.#options.poolOptions));\n\t}\n\tasync acquireConnection() {\n\t\treturn new MysqlConnectionImpl(await this.acquireClient(), this.streams, this.cancelStatement, () => this.#inUse.released());\n\t}\n\tasync close() {\n\t\tif (this.#state.kind !== \"connected\") return;\n\t\tconst { pool } = this.#state;\n\t\tthis.#state = { kind: \"closed\" };\n\t\tawait this.#inUse.none();\n\t\tawait this.#canceller?.close();\n\t\tthis.#canceller = void 0;\n\t\tawait pool.end();\n\t}\n\tasync acquireClient() {\n\t\tif (this.#state.kind !== \"connected\") throw notConnected(this.#state.kind === \"closed\" ? \"MySQL driver is closed\" : \"MySQL driver not connected\");\n\t\tconst { pool, waiting } = this.#state;\n\t\tthis.#inUse.acquired();\n\t\tconst getting = pool.getConnection();\n\t\tlet client;\n\t\ttry {\n\t\t\tclient = await waiting.race(getting);\n\t\t} catch (error) {\n\t\t\treleaseLate(getting);\n\t\t\tthis.#inUse.released();\n\t\t\tthrow normalizeMysqlError(error);\n\t\t}\n\t\ttry {\n\t\t\tawait this.#sessionSettings.ensure(client);\n\t\t} catch (error) {\n\t\t\tclient.destroy();\n\t\t\tthis.#inUse.released();\n\t\t\tthrow normalizeMysqlError(error);\n\t\t}\n\t\treturn client;\n\t}\n\t/**\n\t* Destroys a client only after an error the package marks fatal, or after a cancel that went out without an answer once the rest of its result was read (`cancelUnconfirmed`). The package marks an error fatal when the connection's socket is gone or can no longer be trusted, and it has then already set the connection closed and failed every command on it (`fatalError` in its `connection.js`), so no command is receiving and its `destroy()` sends no `KILL`. A statement the caller stopped early is cancelled and read to its end instead (`#stopEarly`).\n\t*/\n\tasync releaseClient(client, { destroy }) {\n\t\ttry {\n\t\t\tif (destroy) client.destroy();\n\t\t\telse await client.release();\n\t\t} finally {\n\t\t\tthis.#inUse.released();\n\t\t}\n\t}\n};\n//#endregion\n//#region src/core/runtime/runtime-driver.ts\n/** The runtime driver descriptor of MySQL, or of a target that extends it, whose drivers carry `targetId`. */\nfunction createMysqlRuntimeDriverDescriptor(targetId) {\n\treturn {\n\t\t...mysqlDriverDescriptorMetaFor(targetId),\n\t\tcreate(options, sessionSettings) {\n\t\t\treturn new MysqlDriver({\n\t\t\t\t...options,\n\t\t\t\t...ifDefined(\"sessionSettings\", sessionSettings)\n\t\t\t}, targetId);\n\t\t}\n\t};\n}\nconst mysqlRuntimeDriverDescriptor = createMysqlRuntimeDriverDescriptor(\"mysql\");\n//#endregion\nexport { createMysqlRuntimeDriverDescriptor, mysqlRuntimeDriverDescriptor as default };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;;;;;;;;AAUA,MAAM,wBAAwB;AAC9B,SAAS,Q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KAAKA,SAAS,EAAE,MAAM,SAAS;EAC/B,MAAM,KAAKC,OAAO,KAAK;EACvB,MAAM,KAAKJ,YAAY,MAAM;EAC7B,KAAKA,aAAa,KAAK;EACvB,MAAM,KAAK,IAAI;CAChB;CACA,MAAM,gBAAgB;EACrB,IAAI,KAAKG,OAAO,SAAS,aAAa,MAAM,aAAa,KAAKA,OAAO,SAAS,WAAW,2BAA2B,4BAA4B;EAChJ,MAAM,EAAE,MAAM,YAAY,KAAKA;EAC/B,KAAKC,OAAO,SAAS;EACrB,MAAM,UAAU,KAAK,cAAc;EACnC,IAAI;EACJ,IAAI;GACH,SAAS,MAAM,QAAQ,KAAK,OAAO;EACpC,SAAS,OAAO;GACf,YAAY,OAAO;GACnB,KAAKA,OAAO,SAAS;GACrB,MAAM,oBAAoB,KAAK;EAChC;EACA,IAAI;GACH,MAAM,KAAKF,iBAAiB,OAAO,MAAM;EAC1C,SAAS,OAAO;GACf,OAAO,QAAQ;GACf,KAAKE,OAAO,SAAS;GACrB,MAAM,oBAAoB,KAAK;EAChC;EACA,OAAO;CACR;;;;CAIA,MAAM,cAAc,QAAQ,EAAE,WAAW;EACxC,IAAI;GACH,IAAI,SAAS,OAAO,QAAQ;QACvB,MAAM,OAAO,QAAQ;EAC3B,UAAU;GACT,KAAKA,OAAO,SAAS;EACtB;CACD;AACD;;AAIA,SAAS,mCAAmC,UAAU;CACrD,OAAO;EACN,GAAG,6BAA6B,QAAQ;EACxC,OAAO,SAAS,iBAAiB;GAChC,OAAO,IAAI,YAAY;IACtB,GAAG;IACH,GAAG,UAAU,mBAAmB,eAAe;GAChD,GAAG,QAAQ;EACZ;CACD;AACD;AACA,MAAM,+BAA+B,mCAAmC,OAAO"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { n as mysqlTargetDescriptorMetaRuntime } from "./date-time-now-generators-BKakW3gd-CIFPuRdM.mjs";
|
|
2
|
+
import { structuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
3
|
+
import { type } from "arktype";
|
|
4
|
+
//#region ../../../3-targets/mysql/1-mysql/1-target/dist/runtime.mjs
|
|
5
|
+
const mysqlRuntimeTargetDescriptor = {
|
|
6
|
+
...mysqlTargetDescriptorMetaRuntime,
|
|
7
|
+
codecs: () => [],
|
|
8
|
+
create() {
|
|
9
|
+
return {
|
|
10
|
+
familyId: "sql",
|
|
11
|
+
targetId: "mysql"
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
const mysqlIsolationLevels = {
|
|
16
|
+
ReadUncommitted: "ReadUncommitted",
|
|
17
|
+
ReadCommitted: "ReadCommitted",
|
|
18
|
+
RepeatableRead: "RepeatableRead",
|
|
19
|
+
Serializable: "Serializable"
|
|
20
|
+
};
|
|
21
|
+
const mysqlIsolationLevelSchema = type.enumerated(...Object.values(mysqlIsolationLevels));
|
|
22
|
+
function validateMysqlIsolationLevel(value) {
|
|
23
|
+
const result = mysqlIsolationLevelSchema(value);
|
|
24
|
+
if (result instanceof type.errors) throw structuredError("RUNTIME.ARGUMENT_INVALID", "Invalid transaction isolation level", {
|
|
25
|
+
why: result.summary,
|
|
26
|
+
fix: "Use ReadUncommitted, ReadCommitted, RepeatableRead, or Serializable.",
|
|
27
|
+
meta: {
|
|
28
|
+
argument: "isolationLevel",
|
|
29
|
+
received: value
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
return result;
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
export { validateMysqlIsolationLevel as i, mysqlIsolationLevels as n, mysqlRuntimeTargetDescriptor as r, mysqlIsolationLevelSchema as t };
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=runtime-DUDdsFyy.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-DUDdsFyy.mjs","names":[],"sources":["../../../../3-targets/mysql/1-mysql/1-target/dist/runtime.mjs"],"sourcesContent":["import { n as mysqlTargetDescriptorMetaRuntime, t as mysqlNowGenerators } from \"./date-time-now-generators-BKakW3gd.mjs\";\nimport { t as MysqlContractSerializer } from \"./mysql-contract-serializer-BnTKRSsN.mjs\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { type } from \"arktype\";\n//#region src/core/runtime/runtime-target.ts\nconst mysqlRuntimeTargetDescriptor = {\n\t...mysqlTargetDescriptorMetaRuntime,\n\tcodecs: () => [],\n\tcreate() {\n\t\treturn {\n\t\t\tfamilyId: \"sql\",\n\t\t\ttargetId: \"mysql\"\n\t\t};\n\t}\n};\n//#endregion\n//#region src/core/transaction-isolation.ts\nconst mysqlIsolationLevels = {\n\tReadUncommitted: \"ReadUncommitted\",\n\tReadCommitted: \"ReadCommitted\",\n\tRepeatableRead: \"RepeatableRead\",\n\tSerializable: \"Serializable\"\n};\nconst mysqlIsolationLevelSchema = type.enumerated(...Object.values(mysqlIsolationLevels));\nfunction validateMysqlIsolationLevel(value) {\n\tconst result = mysqlIsolationLevelSchema(value);\n\tif (result instanceof type.errors) throw structuredError(\"RUNTIME.ARGUMENT_INVALID\", \"Invalid transaction isolation level\", {\n\t\twhy: result.summary,\n\t\tfix: \"Use ReadUncommitted, ReadCommitted, RepeatableRead, or Serializable.\",\n\t\tmeta: {\n\t\t\targument: \"isolationLevel\",\n\t\t\treceived: value\n\t\t}\n\t});\n\treturn result;\n}\n//#endregion\nexport { MysqlContractSerializer, mysqlRuntimeTargetDescriptor as default, mysqlIsolationLevelSchema, mysqlIsolationLevels, mysqlNowGenerators, validateMysqlIsolationLevel };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;;AAKA,MAAM,+BAA+B;CACpC,GAAG;CACH,cAAc,CAAC;CACf,SAAS;EACR,OAAO;GACN,UAAU;GACV,UAAU;EACX;CACD;AACD;AAGA,MAAM,uBAAuB;CAC5B,iBAAiB;CACjB,eAAe;CACf,gBAAgB;CAChB,cAAc;AACf;AACA,MAAM,4BAA4B,KAAK,WAAW,GAAG,OAAO,OAAO,oBAAoB,CAAC;AACxF,SAAS,4BAA4B,OAAO;CAC3C,MAAM,SAAS,0BAA0B,KAAK;CAC9C,IAAI,kBAAkB,KAAK,QAAQ,MAAM,gBAAgB,4BAA4B,uCAAuC;EAC3H,KAAK,OAAO;EACZ,KAAK;EACL,MAAM;GACL,UAAU;GACV,UAAU;EACX;CACD,CAAC;CACD,OAAO;AACR"}
|
package/dist/target.d.mts
CHANGED
|
@@ -18,8 +18,8 @@ import { n as mysqlResolveDefault, r as readMysqlDefault, t as MysqlReportedDefa
|
|
|
18
18
|
import { n as mysqlQueryNotYetSupported, t as mysqlError } from "./errors-DjCkC9IM.mjs";
|
|
19
19
|
import { i as withMarkerLock, n as acquireMarkerLock, r as releaseMarkerLock, t as MARKER_LOCK_TIMEOUT_SECONDS } from "./marker-lock-Px2qK06F.mjs";
|
|
20
20
|
import { A as unique, C as createMysqlMigrationRunner, D as primaryKey, E as placeholder, O as rawSql, S as createMysqlMigrationPlanner, T as lit, _ as MysqlOpFactoryCall, a as CreateTableCall, b as TypeScriptRenderableMysqlMigration, c as DropIndexCall, d as MigrationCLI, f as MysqlMigration, g as MysqlMigrationTarget, h as MysqlMigrationPlanner, i as CreateIndexCall, k as sql, l as DropTableCall, m as MysqlMigrationDestinationInfo, n as AddForeignKeyCall, o as DropColumnCall, p as MysqlMigrationBase, r as AddUniqueCall, s as DropForeignKeyCall, t as AddColumnCall, u as DropUniqueCall, v as MysqlPlanResult, w as fn, x as col, y as RawSqlCall } from "./migration-DILkj7kB.mjs";
|
|
21
|
-
import "./pack-
|
|
22
|
-
import { n as
|
|
21
|
+
import "./pack-CuB4QWcE.mjs";
|
|
22
|
+
import { a as mysqlIsolationLevels, c as validateMysqlIsolationLevel, i as mysqlIsolationLevelSchema, n as MysqlIsolationLevel, o as mysqlNowGenerators, r as MysqlRuntimeTargetInstance, t as MysqlContractSerializer } from "./runtime-CbqytTbM.mjs";
|
|
23
23
|
import { a as quoteLiteral, i as quoteIdentifier, n as MysqlSqlToken, o as tokenizeMysqlSql, r as escapeLiteral, t as MysqlPlaceholderToken } from "./sql-utils-DBvre8Ar.mjs";
|
|
24
24
|
import { n as mysqlCreateNamespace, t as MysqlDatabase } from "./types-gXYDzQXs.mjs";
|
|
25
|
-
export { type AdaptedMysqlCodecDescriptor, AddColumnCall, AddForeignKeyCall, AddUniqueCall, type AnyMysqlCodecDescriptor, type AnyMysqlDdlNode, CONTROL_TABLE_NAMES, CodecTypes, CreateIndexCall, CreateTableCall, DropColumnCall, DropForeignKeyCall, DropIndexCall, DropTableCall, DropUniqueCall, LEDGER_TABLE_NAME, MARKER_LOCK_TIMEOUT_SECONDS, MARKER_TABLE_NAME, MYSQL_BIGINT_CODEC_ID, MYSQL_DATETIME_CODEC_ID, MYSQL_DATETIME_RANGE, MYSQL_DATETIME_STRING_CODEC_ID, MYSQL_DATETIME_TEMPORAL_CODEC_ID, MYSQL_DATE_NOW, MYSQL_DATE_STRING_CODEC_ID, MYSQL_DATE_TEMPORAL_CODEC_ID, MYSQL_DURATION_STRING_CODEC_ID, MYSQL_ENUM_CODEC_ID, MYSQL_INSTANT_NOW, MYSQL_INT_CODEC_ID, MYSQL_TEXT_CODEC_ID, MYSQL_TIMESTAMP_DATE_CODEC_ID, MYSQL_TIMESTAMP_RANGE, MYSQL_TIMESTAMP_STRING_CODEC_ID, MYSQL_TIMESTAMP_TEMPORAL_CODEC_ID, MYSQL_TIME_NOW, MYSQL_TIME_STRING_CODEC_ID, MYSQL_TIME_TEMPORAL_CODEC_ID, MysqlMigration as Migration, MigrationCLI, MysqlCodecDescriptor, type MysqlCodecDescriptorRegistry, type MysqlCodecOptions, type MysqlCodecRegistry, MysqlContractSerializer, type MysqlControlTargetOptions, MysqlCreateTable, MysqlDatabase, MysqlDdlNode, type MysqlDdlVisitor, MysqlMigrationBase, type MysqlMigrationDestinationInfo, MysqlMigrationPlanner, type MysqlMigrationTarget, type MysqlOpFactoryCall, type MysqlPlaceholderToken, type MysqlPlanResult, type MysqlPlanTargetDetails, type MysqlReportedDefault, type MysqlRuntimeTargetInstance, type MysqlSqlToken, RawSqlCall, SQL_CHAR_CODEC_ID, SQL_RAW_CODEC_ID, SQL_VARCHAR_CODEC_ID, TypeScriptRenderableMysqlMigration, acquireMarkerLock, assembleMysqlCodecRegistry, buildControlTableBootstrapQueries, buildMysqlCodecDescriptorRegistry, buildSignMarkerBootstrapQueries, col, createMysqlBuiltinCodecLookup, createMysqlControlTargetDescriptor, createMysqlMigrationPlanner, createMysqlMigrationRunner, createTable, decodeMysqlDatetime, encodeMysqlDatetime, escapeLiteral, fn, isMysqlCodecDescriptor, lit, mysqlBigint, mysqlChar, mysqlCharParams, mysqlCodec, mysqlCodecDescriptorRegistry, mysqlCodecRegistry, mysqlCreateNamespace, mysqlCurrentValueFor, mysqlDataTypeEntries, mysqlDataTypes, mysqlDate, mysqlDateText, mysqlDatetime, mysqlDatetimeParams, mysqlDatetimeText, mysqlDuration, mysqlDurationParams, mysqlDurationText, mysqlEnum, mysqlEnumParams, mysqlError, mysqlInt, mysqlNowExpression, mysqlNowGenerators, mysqlQueryNotYetSupported, mysqlResolveDefault, mysqlScalarTypeConstructors, mysqlText, mysqlTextDataTypes, mysqlTime, mysqlTimeText, mysqlTimestamp, mysqlTimestampText, mysqlVarchar, mysqlVarcharParams, placeholder, primaryKey, quoteIdentifier, quoteLiteral, rawSql, readMysqlDefault, releaseMarkerLock, renderMysqlEnumType, sql, tokenizeMysqlSql, unique, withMarkerLock };
|
|
25
|
+
export { type AdaptedMysqlCodecDescriptor, AddColumnCall, AddForeignKeyCall, AddUniqueCall, type AnyMysqlCodecDescriptor, type AnyMysqlDdlNode, CONTROL_TABLE_NAMES, CodecTypes, CreateIndexCall, CreateTableCall, DropColumnCall, DropForeignKeyCall, DropIndexCall, DropTableCall, DropUniqueCall, LEDGER_TABLE_NAME, MARKER_LOCK_TIMEOUT_SECONDS, MARKER_TABLE_NAME, MYSQL_BIGINT_CODEC_ID, MYSQL_DATETIME_CODEC_ID, MYSQL_DATETIME_RANGE, MYSQL_DATETIME_STRING_CODEC_ID, MYSQL_DATETIME_TEMPORAL_CODEC_ID, MYSQL_DATE_NOW, MYSQL_DATE_STRING_CODEC_ID, MYSQL_DATE_TEMPORAL_CODEC_ID, MYSQL_DURATION_STRING_CODEC_ID, MYSQL_ENUM_CODEC_ID, MYSQL_INSTANT_NOW, MYSQL_INT_CODEC_ID, MYSQL_TEXT_CODEC_ID, MYSQL_TIMESTAMP_DATE_CODEC_ID, MYSQL_TIMESTAMP_RANGE, MYSQL_TIMESTAMP_STRING_CODEC_ID, MYSQL_TIMESTAMP_TEMPORAL_CODEC_ID, MYSQL_TIME_NOW, MYSQL_TIME_STRING_CODEC_ID, MYSQL_TIME_TEMPORAL_CODEC_ID, MysqlMigration as Migration, MigrationCLI, MysqlCodecDescriptor, type MysqlCodecDescriptorRegistry, type MysqlCodecOptions, type MysqlCodecRegistry, MysqlContractSerializer, type MysqlControlTargetOptions, MysqlCreateTable, MysqlDatabase, MysqlDdlNode, type MysqlDdlVisitor, type MysqlIsolationLevel, MysqlMigrationBase, type MysqlMigrationDestinationInfo, MysqlMigrationPlanner, type MysqlMigrationTarget, type MysqlOpFactoryCall, type MysqlPlaceholderToken, type MysqlPlanResult, type MysqlPlanTargetDetails, type MysqlReportedDefault, type MysqlRuntimeTargetInstance, type MysqlSqlToken, RawSqlCall, SQL_CHAR_CODEC_ID, SQL_RAW_CODEC_ID, SQL_VARCHAR_CODEC_ID, TypeScriptRenderableMysqlMigration, acquireMarkerLock, assembleMysqlCodecRegistry, buildControlTableBootstrapQueries, buildMysqlCodecDescriptorRegistry, buildSignMarkerBootstrapQueries, col, createMysqlBuiltinCodecLookup, createMysqlControlTargetDescriptor, createMysqlMigrationPlanner, createMysqlMigrationRunner, createTable, decodeMysqlDatetime, encodeMysqlDatetime, escapeLiteral, fn, isMysqlCodecDescriptor, lit, mysqlBigint, mysqlChar, mysqlCharParams, mysqlCodec, mysqlCodecDescriptorRegistry, mysqlCodecRegistry, mysqlCreateNamespace, mysqlCurrentValueFor, mysqlDataTypeEntries, mysqlDataTypes, mysqlDate, mysqlDateText, mysqlDatetime, mysqlDatetimeParams, mysqlDatetimeText, mysqlDuration, mysqlDurationParams, mysqlDurationText, mysqlEnum, mysqlEnumParams, mysqlError, mysqlInt, mysqlIsolationLevelSchema, mysqlIsolationLevels, mysqlNowExpression, mysqlNowGenerators, mysqlQueryNotYetSupported, mysqlResolveDefault, mysqlScalarTypeConstructors, mysqlText, mysqlTextDataTypes, mysqlTime, mysqlTimeText, mysqlTimestamp, mysqlTimestampText, mysqlVarchar, mysqlVarcharParams, placeholder, primaryKey, quoteIdentifier, quoteLiteral, rawSql, readMysqlDefault, releaseMarkerLock, renderMysqlEnumType, sql, tokenizeMysqlSql, unique, validateMysqlIsolationLevel, withMarkerLock };
|
package/dist/target.mjs
CHANGED
|
@@ -11,14 +11,15 @@ import { n as MysqlDdlNode, t as MysqlCreateTable } from "./nodes-CvcX47ot-CcCy0
|
|
|
11
11
|
import { t as createTable } from "./ddl-DDmMHyA_-grdUmU3J.mjs";
|
|
12
12
|
import { n as buildSignMarkerBootstrapQueries, t as buildControlTableBootstrapQueries } from "./contract-free-DekbHRyr.mjs";
|
|
13
13
|
import { t as mysqlDataTypeEntries } from "./data-type-entries-C7VH2IHc-DM6TbTaz.mjs";
|
|
14
|
-
import { t as mysqlNowGenerators } from "./date-time-now-generators-
|
|
15
|
-
import { t as mysqlScalarTypeConstructors } from "./descriptor-meta-
|
|
14
|
+
import { t as mysqlNowGenerators } from "./date-time-now-generators-BKakW3gd-CIFPuRdM.mjs";
|
|
15
|
+
import { t as mysqlScalarTypeConstructors } from "./descriptor-meta-BF6YvSag-ChHHvlHc.mjs";
|
|
16
16
|
import { n as mysqlCreateNamespace, t as MysqlDatabase } from "./mysql-database-CHl9-oSL-B1arvq6Q.mjs";
|
|
17
17
|
import { t as MysqlContractSerializer } from "./mysql-contract-serializer-BnTKRSsN-BnV7fdYd.mjs";
|
|
18
18
|
import { n as readMysqlDefault, t as mysqlResolveDefault } from "./default-normalizer-C8pc7SbL-BXd70q02.mjs";
|
|
19
19
|
import { i as withMarkerLock, n as acquireMarkerLock, r as releaseMarkerLock, t as MARKER_LOCK_TIMEOUT_SECONDS } from "./marker-lock-Bwew7cAs-ElLxlCQp.mjs";
|
|
20
20
|
import { _ as createMysqlMigrationPlanner, a as CreateTableCall, c as DropIndexCall, f as MysqlMigration, g as TypeScriptRenderableMysqlMigration, h as RawSqlCall, i as CreateIndexCall, l as DropTableCall, m as MysqlMigrationPlanner, n as AddForeignKeyCall, o as DropColumnCall, p as MysqlMigrationBase, r as AddUniqueCall, s as DropForeignKeyCall, t as AddColumnCall, u as DropUniqueCall, v as createMysqlMigrationRunner, x as rawSql } from "./runner-BIjAWX-E-BgTmrD8f.mjs";
|
|
21
|
-
import { t as createMysqlControlTargetDescriptor } from "./control-
|
|
21
|
+
import { t as createMysqlControlTargetDescriptor } from "./control-DNuE7H2C.mjs";
|
|
22
22
|
import { a as placeholder, c as unique, i as lit, n as col, o as primaryKey, r as fn, s as sql, t as MigrationCLI } from "./migration-tFuoN9GB.mjs";
|
|
23
|
+
import { i as validateMysqlIsolationLevel, n as mysqlIsolationLevels, t as mysqlIsolationLevelSchema } from "./runtime-DUDdsFyy.mjs";
|
|
23
24
|
import { t as tokenizeMysqlSql } from "./sql-utils-BE8tDXHs.mjs";
|
|
24
|
-
export { AddColumnCall, AddForeignKeyCall, AddUniqueCall, CONTROL_TABLE_NAMES, CreateIndexCall, CreateTableCall, DropColumnCall, DropForeignKeyCall, DropIndexCall, DropTableCall, DropUniqueCall, LEDGER_TABLE_NAME, MARKER_LOCK_TIMEOUT_SECONDS, MARKER_TABLE_NAME, MYSQL_BIGINT_CODEC_ID, MYSQL_DATETIME_CODEC_ID, MYSQL_DATETIME_RANGE, MYSQL_DATETIME_STRING_CODEC_ID, MYSQL_DATETIME_TEMPORAL_CODEC_ID, MYSQL_DATE_NOW, MYSQL_DATE_STRING_CODEC_ID, MYSQL_DATE_TEMPORAL_CODEC_ID, MYSQL_DURATION_STRING_CODEC_ID, MYSQL_ENUM_CODEC_ID, MYSQL_INSTANT_NOW, MYSQL_INT_CODEC_ID, MYSQL_TEXT_CODEC_ID, MYSQL_TIMESTAMP_DATE_CODEC_ID, MYSQL_TIMESTAMP_RANGE, MYSQL_TIMESTAMP_STRING_CODEC_ID, MYSQL_TIMESTAMP_TEMPORAL_CODEC_ID, MYSQL_TIME_NOW, MYSQL_TIME_STRING_CODEC_ID, MYSQL_TIME_TEMPORAL_CODEC_ID, MysqlMigration as Migration, MigrationCLI, MysqlCodecDescriptor, MysqlContractSerializer, MysqlCreateTable, MysqlDatabase, MysqlDdlNode, MysqlMigrationBase, MysqlMigrationPlanner, RawSqlCall, SQL_CHAR_CODEC_ID, SQL_RAW_CODEC_ID, SQL_VARCHAR_CODEC_ID, TypeScriptRenderableMysqlMigration, acquireMarkerLock, assembleMysqlCodecRegistry, buildControlTableBootstrapQueries, buildMysqlCodecDescriptorRegistry, buildSignMarkerBootstrapQueries, col, createMysqlBuiltinCodecLookup, createMysqlControlTargetDescriptor, createMysqlMigrationPlanner, createMysqlMigrationRunner, createTable, decodeMysqlDatetime, encodeMysqlDatetime, escapeLiteral, fn, isMysqlCodecDescriptor, lit, mysqlBigint, mysqlChar, mysqlCharParams, mysqlCodec, mysqlCodecDescriptorRegistry, mysqlCodecRegistry, mysqlCreateNamespace, mysqlCurrentValueFor, mysqlDataTypeEntries, mysqlDataTypes, mysqlDate, mysqlDateText, mysqlDatetime, mysqlDatetimeParams, mysqlDatetimeText, mysqlDuration, mysqlDurationParams, mysqlDurationText, mysqlEnum, mysqlEnumParams, mysqlError, mysqlInt, mysqlNowExpression, mysqlNowGenerators, mysqlQueryNotYetSupported, mysqlResolveDefault, mysqlScalarTypeConstructors, mysqlText, mysqlTextDataTypes, mysqlTime, mysqlTimeText, mysqlTimestamp, mysqlTimestampText, mysqlVarchar, mysqlVarcharParams, placeholder, primaryKey, quoteIdentifier, quoteLiteral, rawSql, readMysqlDefault, releaseMarkerLock, renderMysqlEnumType, sql, tokenizeMysqlSql, unique, withMarkerLock };
|
|
25
|
+
export { AddColumnCall, AddForeignKeyCall, AddUniqueCall, CONTROL_TABLE_NAMES, CreateIndexCall, CreateTableCall, DropColumnCall, DropForeignKeyCall, DropIndexCall, DropTableCall, DropUniqueCall, LEDGER_TABLE_NAME, MARKER_LOCK_TIMEOUT_SECONDS, MARKER_TABLE_NAME, MYSQL_BIGINT_CODEC_ID, MYSQL_DATETIME_CODEC_ID, MYSQL_DATETIME_RANGE, MYSQL_DATETIME_STRING_CODEC_ID, MYSQL_DATETIME_TEMPORAL_CODEC_ID, MYSQL_DATE_NOW, MYSQL_DATE_STRING_CODEC_ID, MYSQL_DATE_TEMPORAL_CODEC_ID, MYSQL_DURATION_STRING_CODEC_ID, MYSQL_ENUM_CODEC_ID, MYSQL_INSTANT_NOW, MYSQL_INT_CODEC_ID, MYSQL_TEXT_CODEC_ID, MYSQL_TIMESTAMP_DATE_CODEC_ID, MYSQL_TIMESTAMP_RANGE, MYSQL_TIMESTAMP_STRING_CODEC_ID, MYSQL_TIMESTAMP_TEMPORAL_CODEC_ID, MYSQL_TIME_NOW, MYSQL_TIME_STRING_CODEC_ID, MYSQL_TIME_TEMPORAL_CODEC_ID, MysqlMigration as Migration, MigrationCLI, MysqlCodecDescriptor, MysqlContractSerializer, MysqlCreateTable, MysqlDatabase, MysqlDdlNode, MysqlMigrationBase, MysqlMigrationPlanner, RawSqlCall, SQL_CHAR_CODEC_ID, SQL_RAW_CODEC_ID, SQL_VARCHAR_CODEC_ID, TypeScriptRenderableMysqlMigration, acquireMarkerLock, assembleMysqlCodecRegistry, buildControlTableBootstrapQueries, buildMysqlCodecDescriptorRegistry, buildSignMarkerBootstrapQueries, col, createMysqlBuiltinCodecLookup, createMysqlControlTargetDescriptor, createMysqlMigrationPlanner, createMysqlMigrationRunner, createTable, decodeMysqlDatetime, encodeMysqlDatetime, escapeLiteral, fn, isMysqlCodecDescriptor, lit, mysqlBigint, mysqlChar, mysqlCharParams, mysqlCodec, mysqlCodecDescriptorRegistry, mysqlCodecRegistry, mysqlCreateNamespace, mysqlCurrentValueFor, mysqlDataTypeEntries, mysqlDataTypes, mysqlDate, mysqlDateText, mysqlDatetime, mysqlDatetimeParams, mysqlDatetimeText, mysqlDuration, mysqlDurationParams, mysqlDurationText, mysqlEnum, mysqlEnumParams, mysqlError, mysqlInt, mysqlIsolationLevelSchema, mysqlIsolationLevels, mysqlNowExpression, mysqlNowGenerators, mysqlQueryNotYetSupported, mysqlResolveDefault, mysqlScalarTypeConstructors, mysqlText, mysqlTextDataTypes, mysqlTime, mysqlTimeText, mysqlTimestamp, mysqlTimestampText, mysqlVarchar, mysqlVarcharParams, placeholder, primaryKey, quoteIdentifier, quoteLiteral, rawSql, readMysqlDefault, releaseMarkerLock, renderMysqlEnumType, sql, tokenizeMysqlSql, unique, validateMysqlIsolationLevel, withMarkerLock };
|
package/dist/target__control.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as mysqlScalarTypeConstructors } from "./descriptor-meta-
|
|
2
|
-
import { n as mysqlControlTargetDescriptor, t as createMysqlControlTargetDescriptor } from "./control-
|
|
1
|
+
import { t as mysqlScalarTypeConstructors } from "./descriptor-meta-BF6YvSag-ChHHvlHc.mjs";
|
|
2
|
+
import { n as mysqlControlTargetDescriptor, t as createMysqlControlTargetDescriptor } from "./control-DNuE7H2C.mjs";
|
|
3
3
|
export { createMysqlControlTargetDescriptor, mysqlControlTargetDescriptor as default, mysqlScalarTypeConstructors };
|
package/dist/target__pack.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as mysqlTargetDescriptorMeta } from "./pack-
|
|
1
|
+
import { t as mysqlTargetDescriptorMeta } from "./pack-CuB4QWcE.mjs";
|
|
2
2
|
export { mysqlTargetDescriptorMeta as default };
|
package/dist/target__pack.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as mysqlTargetDescriptorMeta } from "./descriptor-meta-
|
|
1
|
+
import { n as mysqlTargetDescriptorMeta } from "./descriptor-meta-BF6YvSag-ChHHvlHc.mjs";
|
|
2
2
|
export { mysqlTargetDescriptorMeta as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as
|
|
2
|
-
export { MysqlContractSerializer, type MysqlRuntimeTargetInstance, mysqlRuntimeTargetDescriptor as default, mysqlNowGenerators };
|
|
1
|
+
import { a as mysqlIsolationLevels, c as validateMysqlIsolationLevel, i as mysqlIsolationLevelSchema, n as MysqlIsolationLevel, o as mysqlNowGenerators, r as MysqlRuntimeTargetInstance, s as mysqlRuntimeTargetDescriptor, t as MysqlContractSerializer } from "./runtime-CbqytTbM.mjs";
|
|
2
|
+
export { MysqlContractSerializer, type MysqlIsolationLevel, type MysqlRuntimeTargetInstance, mysqlRuntimeTargetDescriptor as default, mysqlIsolationLevelSchema, mysqlIsolationLevels, mysqlNowGenerators, validateMysqlIsolationLevel };
|
package/dist/target__runtime.mjs
CHANGED
|
@@ -1,17 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as mysqlNowGenerators } from "./date-time-now-generators-BKakW3gd-CIFPuRdM.mjs";
|
|
2
2
|
import { t as MysqlContractSerializer } from "./mysql-contract-serializer-BnTKRSsN-BnV7fdYd.mjs";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
...mysqlTargetDescriptorMetaRuntime,
|
|
6
|
-
codecs: () => [],
|
|
7
|
-
create() {
|
|
8
|
-
return {
|
|
9
|
-
familyId: "sql",
|
|
10
|
-
targetId: "mysql"
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
//#endregion
|
|
15
|
-
export { MysqlContractSerializer, mysqlRuntimeTargetDescriptor as default, mysqlNowGenerators };
|
|
16
|
-
|
|
17
|
-
//# sourceMappingURL=target__runtime.mjs.map
|
|
3
|
+
import { i as validateMysqlIsolationLevel, n as mysqlIsolationLevels, r as mysqlRuntimeTargetDescriptor, t as mysqlIsolationLevelSchema } from "./runtime-DUDdsFyy.mjs";
|
|
4
|
+
export { MysqlContractSerializer, mysqlRuntimeTargetDescriptor as default, mysqlIsolationLevelSchema, mysqlIsolationLevels, mysqlNowGenerators, validateMysqlIsolationLevel };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/orm-target-mysql",
|
|
3
|
-
"version": "8.0.0-rc.
|
|
3
|
+
"version": "8.0.0-rc.24-dev.2",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -9,21 +9,21 @@
|
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@prisma/orm-family-sql": "8.0.0-rc.
|
|
13
|
-
"@prisma/orm-framework": "8.0.0-rc.
|
|
14
|
-
"@prisma/orm-toolchain": "8.0.0-rc.
|
|
12
|
+
"@prisma/orm-family-sql": "8.0.0-rc.24-dev.2",
|
|
13
|
+
"@prisma/orm-framework": "8.0.0-rc.24-dev.2",
|
|
14
|
+
"@prisma/orm-toolchain": "8.0.0-rc.24-dev.2",
|
|
15
15
|
"@standard-schema/spec": "1.1.0",
|
|
16
16
|
"arktype": "^2.2.2",
|
|
17
17
|
"mariadb": "3.5.4",
|
|
18
18
|
"temporal-spec": "1.0.1"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@internal/adapter-mysql": "8.0.0-rc.
|
|
22
|
-
"@internal/driver-mysql": "8.0.0-rc.
|
|
23
|
-
"@internal/target-mysql": "8.0.0-rc.
|
|
24
|
-
"@repo/test-utils": "8.0.0-rc.
|
|
25
|
-
"@repo/tsconfig": "8.0.0-rc.
|
|
26
|
-
"@repo/tsdown": "8.0.0-rc.
|
|
21
|
+
"@internal/adapter-mysql": "8.0.0-rc.24-dev.2",
|
|
22
|
+
"@internal/driver-mysql": "8.0.0-rc.24-dev.2",
|
|
23
|
+
"@internal/target-mysql": "8.0.0-rc.24-dev.2",
|
|
24
|
+
"@repo/test-utils": "8.0.0-rc.24-dev.2",
|
|
25
|
+
"@repo/tsconfig": "8.0.0-rc.24-dev.2",
|
|
26
|
+
"@repo/tsdown": "8.0.0-rc.24-dev.2",
|
|
27
27
|
"tsdown": "0.22.14",
|
|
28
28
|
"typescript": "5.9.3",
|
|
29
29
|
"vitest": "5.0.0-rc.2"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"date-time-now-generators-DY-8Bodc-DpQ5Se1u.mjs","names":[],"sources":["../../../../3-targets/mysql/1-mysql/1-target/dist/date-time-now-generators-DY-8Bodc.mjs"],"sourcesContent":["import { o as mysqlDataTypes } from \"./data-types-DOaaPS93.mjs\";\nimport { t as requireTemporal } from \"./require-temporal-DeDQhbTn.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, fractionDigitsOf } from \"@internal/type-implementations/now\";\n/** The runtime-safe part of the MySQL target's metadata: it leaves out `authoring`, which only contract construction reads. Every session runs in UTC, because the datetime codec reads and writes UTC, and at READ COMMITTED, as Postgres does, so a read inside a transaction sees rows other sessions committed. Transaction isolation controls will replace the setting. */\nconst mysqlTargetDescriptorMetaRuntime = {\n\tkind: \"target\",\n\tfamilyId: \"sql\",\n\ttargetId: \"mysql\",\n\tid: \"mysql\",\n\tversion: \"0.0.1\",\n\tcapabilities: {},\n\tdataTypes: mysqlDataTypes,\n\tsessionSettings: {\n\t\ttime_zone: \"+00:00\",\n\t\ttransaction_isolation: \"READ-COMMITTED\"\n\t}\n};\n//#endregion\n//#region src/core/date-time-now-generators.ts\n/** The fraction digits of a bare `datetime`, `timestamp` or `time`. */\nconst BARE_TYPE_FRACTION_DIGITS = 0;\nfunction fractionDigits(params) {\n\treturn fractionDigitsOf(params, BARE_TYPE_FRACTION_DIGITS);\n}\nfunction instantNow(params) {\n\treturn nowValues.instantNow(requireTemporal({ generatorId: INSTANT_NOW_GENERATOR_ID }), fractionDigits(params));\n}\nfunction plainDateNow() {\n\treturn nowValues.plainDateNow(requireTemporal({ generatorId: PLAIN_DATE_NOW_GENERATOR_ID }));\n}\nfunction plainTimeNow(params) {\n\treturn nowValues.plainTimeNow(requireTemporal({ generatorId: PLAIN_TIME_NOW_GENERATOR_ID }), fractionDigits(params));\n}\nfunction instantStringNow(params) {\n\treturn nowValues.instantStringNow(fractionDigits(params), \"trimmed\");\n}\nfunction timeStringNow(params) {\n\treturn nowValues.timeStringNow(fractionDigits(params), \"trimmed\");\n}\n/**\n* The MySQL \"now\" generators, one per date and time codec except `mysql/datetime@1` and `mysql/timestamp-date@1`, which use the SQL family's `timestampNow`. All read the clock through `Date.now()` and write UTC. Each rounds down to the column's `precision` param, so MySQL, which rounds a value to the column's fraction digits, stores the value the client holds rather than rounding it up. The string generators write the text their codec reads, with no trailing zeros in the fraction.\n*/\nconst mysqlNowGenerators = [\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 { mysqlTargetDescriptorMetaRuntime as n, mysqlNowGenerators as t };\n\n//# sourceMappingURL=date-time-now-generators-DY-8Bodc.mjs.map"],"mappings":";;;;;;AAKA,MAAM,mCAAmC;CACxC,MAAM;CACN,UAAU;CACV,UAAU;CACV,IAAI;CACJ,SAAS;CACT,cAAc,CAAC;CACf,WAAW;CACX,iBAAiB;EAChB,WAAW;EACX,uBAAuB;CACxB;AACD;;AAIA,MAAM,4BAA4B;AAClC,SAAS,eAAe,QAAQ;CAC/B,OAAO,iBAAiB,QAAQ,yBAAyB;AAC1D;AACA,SAAS,WAAW,QAAQ;CAC3B,OAAO,UAAU,WAAW,gBAAgB,EAAE,aAAa,yBAAyB,CAAC,GAAG,eAAe,MAAM,CAAC;AAC/G;AACA,SAAS,eAAe;CACvB,OAAO,UAAU,aAAa,gBAAgB,EAAE,aAAa,4BAA4B,CAAC,CAAC;AAC5F;AACA,SAAS,aAAa,QAAQ;CAC7B,OAAO,UAAU,aAAa,gBAAgB,EAAE,aAAa,4BAA4B,CAAC,GAAG,eAAe,MAAM,CAAC;AACpH;AACA,SAAS,iBAAiB,QAAQ;CACjC,OAAO,UAAU,iBAAiB,eAAe,MAAM,GAAG,SAAS;AACpE;AACA,SAAS,cAAc,QAAQ;CAC9B,OAAO,UAAU,cAAc,eAAe,MAAM,GAAG,SAAS;AACjE;;;;AAIA,MAAM,qBAAqB;CAC1B;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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-BGF0cSIt.mjs","names":["#url","#idleTimeoutMillis","#closed","#idleTimer","#connection","#open","#setAside","#pending","#pendingOn","#idleLater","#streamRows","#runReleasing","#stopEarly","#refuseIfUnusable","#onRelease","#cancelRunning","#runningSettled","#close","#released","#count","#idle","#fail","#canceller","#options","#sessionSettings","#state","#inUse"],"sources":["../../../../3-targets/mysql/1-mysql/3-driver/dist/runtime.mjs"],"sourcesContent":["import { a as connectingCannotSucceed, c as isFatal, d as mysqlConnectionOptions, f as mysqlPoolIdleTimeoutMillis, l as normalizeMysqlError, m as acquireClientQueryLock, n as SessionSettingsGuard, p as mysqlPoolOptions, t as statementFor, u as mysqlDriverDescriptorMetaFor } from \"./statement-CT5tB4uX.mjs\";\nimport { errorRuntime } from \"@internal/errors/execution\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { createConnection, createPool } from \"mariadb\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { EventEmitter } from \"node:events\";\nimport { finished } from \"node:stream/promises\";\n//#region src/core/runtime/canceller.ts\n/** How long the canceller waits to open its connection, and for MySQL to answer a `KILL QUERY`. */\nconst CANCEL_TIMEOUT_MILLIS = 2e3;\nfunction timeout(millis) {\n\tlet timer;\n\treturn {\n\t\texpired: new Promise((resolve) => {\n\t\t\ttimer = setTimeout(() => resolve(\"expired\"), millis);\n\t\t}),\n\t\tclear: () => clearTimeout(timer)\n\t};\n}\n/**\n* Cancels statements with `KILL QUERY`, which MySQL takes only from another connection. It keeps one connection of its own, outside the pool, so a cancel neither waits for a pooled connection nor normally opens one; it opens it on first need, and ends it once it has been idle for the pool's idle timeout, as the pool ends its own; with a timeout of 0 it keeps it open, as the pool keeps its own. Opening it and each `KILL QUERY` are bounded by two seconds. The connection is never destroyed: the package's `destroy()` sends a `KILL` of its own whose failure it does not handle (`mariadb` 3.5.4). A connection that stops answering is set aside and ended with `end()` once its statement settles.\n*/\nvar Canceller = class {\n\t#url;\n\t#idleTimeoutMillis;\n\t#connection;\n\t#pending = /* @__PURE__ */ new WeakMap();\n\t#closed = false;\n\t#idleTimer;\n\tconstructor(url, idleTimeoutMillis) {\n\t\tthis.#url = url;\n\t\tthis.#idleTimeoutMillis = idleTimeoutMillis;\n\t}\n\t/** Sends `KILL QUERY` for `threadId`. Never rejects. A kept connection that is no longer valid is replaced once. */\n\tasync cancel(threadId, replaced = false) {\n\t\tif (this.#closed || threadId === null) return \"unsent\";\n\t\tclearTimeout(this.#idleTimer);\n\t\tconst opening = this.#connection ?? this.#open();\n\t\tthis.#connection = opening;\n\t\tconst connection = await opening;\n\t\tif (connection === void 0) {\n\t\t\tthis.#setAside(opening);\n\t\t\treturn \"unsent\";\n\t\t}\n\t\tif (!connection.isValid()) {\n\t\t\tthis.#setAside(opening);\n\t\t\treturn replaced ? \"unsent\" : this.cancel(threadId, true);\n\t\t}\n\t\tthis.#pending.set(connection, this.#pendingOn(connection) + 1);\n\t\tconst killing = connection.query(\"KILL QUERY ?\", [threadId]).then(() => \"sent\", (error) => isFatal(error) ? \"unconfirmed\" : \"unsent\");\n\t\tkilling.then(() => {\n\t\t\tthis.#pending.set(connection, this.#pendingOn(connection) - 1);\n\t\t\tthis.#idleLater(opening, connection);\n\t\t});\n\t\tconst limit = timeout(CANCEL_TIMEOUT_MILLIS);\n\t\tconst result = await Promise.race([killing, limit.expired]);\n\t\tlimit.clear();\n\t\tif (result === \"sent\" || result === \"unsent\") return result;\n\t\tthis.#setAside(opening);\n\t\tconnection.end().catch(() => void 0);\n\t\treturn \"unconfirmed\";\n\t}\n\t/** Ends the connection: `end()` sends `QUIT` once any `KILL QUERY` on it settles. Waits for that only when no `KILL QUERY` is pending on it, so a connection that stopped answering cannot hold `close()` up. */\n\tasync close() {\n\t\tthis.#closed = true;\n\t\tclearTimeout(this.#idleTimer);\n\t\tconst connection = await this.#connection;\n\t\tthis.#connection = void 0;\n\t\tif (connection === void 0) return;\n\t\tconst ending = connection.end().catch(() => void 0);\n\t\tif (this.#pendingOn(connection) === 0) await ending;\n\t}\n\t#idleLater(opening, connection) {\n\t\tif (this.#idleTimeoutMillis === 0 || this.#pendingOn(connection) > 0 || this.#connection !== opening) return;\n\t\tclearTimeout(this.#idleTimer);\n\t\tthis.#idleTimer = setTimeout(() => {\n\t\t\tif (this.#pendingOn(connection) > 0 || this.#connection !== opening) return;\n\t\t\tthis.#connection = void 0;\n\t\t\tconnection.end().catch(() => void 0);\n\t\t}, this.#idleTimeoutMillis);\n\t\tthis.#idleTimer.unref();\n\t}\n\t#pendingOn(connection) {\n\t\treturn this.#pending.get(connection) ?? 0;\n\t}\n\t#setAside(opening) {\n\t\tif (this.#connection === opening) this.#connection = void 0;\n\t}\n\tasync #open() {\n\t\ttry {\n\t\t\tconst connection = await createConnection(mysqlConnectionOptions(this.#url, { connectTimeoutMs: CANCEL_TIMEOUT_MILLIS }));\n\t\t\tconnection.on(\"error\", () => void 0);\n\t\t\tif (this.#closed) {\n\t\t\t\tawait connection.end().catch(() => void 0);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn connection;\n\t\t} catch {\n\t\t\treturn;\n\t\t}\n\t}\n};\n//#endregion\n//#region src/core/runtime/mysql-driver.ts\nfunction notConnected(message) {\n\treturn errorRuntime(\"DRIVER.NOT_CONNECTED\", message, { fix: \"Call connect(binding) before running queries, and do not use the driver after close().\" });\n}\n/** Runs `request` on `client` in one round trip and returns its result: its `?N` placeholders written as `?`, and its values handed to the package, which writes them into the statement. Throws the package's error as it is. */\nasync function run(client, request) {\n\tconst { sql, values } = statementFor(client, request.sql, request.params ?? []);\n\treturn client.query(sql, values);\n}\n/** Starts streaming the rows of `request` on `client`, sent as {@link run} sends it. Throws the error to report, after noting in `outcome` whether it left the client unusable. */\nfunction startStream(client, request, outcome) {\n\ttry {\n\t\tconst { sql, values } = statementFor(client, request.sql, request.params ?? []);\n\t\treturn client.queryStream(sql, values);\n\t} catch (error) {\n\t\tthrow settle(error, outcome);\n\t}\n}\n/** What a statement's result reports: the rows it changed, and, when it changed one row, the value MySQL numbered for it. MySQL reports 0 when it numbered none. */\nfunction statementStats(result) {\n\tif (typeof result !== \"object\" || result === null) return { affectedRows: 0 };\n\tconst affectedRows = \"affectedRows\" in result && typeof result.affectedRows === \"number\" ? result.affectedRows : 0;\n\tconst insertId = \"insertId\" in result ? result.insertId : void 0;\n\treturn affectedRows === 1 && (typeof insertId === \"bigint\" || typeof insertId === \"number\") && insertId > 0 ? {\n\t\taffectedRows,\n\t\tinsertId: String(insertId)\n\t} : { affectedRows };\n}\n/** The error to report for `error`, after noting in `outcome` whether it left the client unusable. */\nfunction settle(error, outcome) {\n\tif (isFatal(error)) outcome.destroy = true;\n\treturn normalizeMysqlError(error);\n}\n/**\n* Whether the package has received the end of the result, so that any rows the caller has not read are already in the stream's buffer. The package pushes the end of the stream when MySQL's last packet arrives; Node records that in `_readableState.ended`, and its public API reports the end only after the caller has read every row.\n*/\nfunction resultReceived(rows) {\n\tconst state = Reflect.get(rows, \"_readableState\");\n\treturn typeof state === \"object\" && state !== null && \"ended\" in state && state.ended === true;\n}\n/**\n* Reads and drops what is left of a stream's result. The package's `close()` stops it keeping new rows; the rows already buffered are read here with `read()`, which works whether or not the caller's iterator is still attached to the stream, so an iterator the caller abandoned cannot hold the drain up.\n*/\nasync function dropRest(rows) {\n\trows.close?.();\n\tconst drain = () => {\n\t\twhile (rows.read() !== null);\n\t};\n\trows.on(\"readable\", drain);\n\ttry {\n\t\tdrain();\n\t\tawait finished(rows);\n\t} finally {\n\t\trows.off(\"readable\", drain);\n\t}\n}\nfunction cancelNotConfirmed() {\n\treturn errorRuntime(\"DRIVER.NOT_CONNECTED\", \"A cancel on this MySQL connection could not be confirmed, so the connection can no longer be used\", {\n\t\twhy: \"The driver cancelled a stream the caller stopped early, and MySQL did not answer the KILL QUERY in time. It may still arrive and would interrupt whatever statement the connection runs then.\",\n\t\tfix: \"Release the connection, which closes it; MySQL rolls back an open transaction on it. Acquire another connection and run the work again.\"\n\t});\n}\nfunction connectionReleased() {\n\treturn errorRuntime(\"DRIVER.NOT_CONNECTED\", \"MySQL connection was released\", { fix: \"Send statements on a connection only until you release it, and await each one before release().\" });\n}\n/** The package can report an error on a stream after the caller stopped reading it, such as MySQL's for a statement the driver cancelled; the generator has already settled by then. */\nfunction ignoreAfterStop() {}\n/** MySQL's error for a statement `KILL QUERY` cancelled (`ER_QUERY_INTERRUPTED`). The package marks it fatal when it arrives in the middle of a result, but the connection stays usable. */\nfunction isQueryInterrupted(error) {\n\treturn error instanceof Error && \"errno\" in error && error.errno === 1317;\n}\nvar MysqlQueryable = class {\n\tstreams;\n\tconstructor(streams) {\n\t\tthis.streams = streams;\n\t}\n\t/** Records a stream that is open, and returns the call that records its end. */\n\tstreamOpened(_rows) {\n\t\treturn () => {};\n\t}\n\t/** Takes the client's lock, which keeps statements on it one at a time in the order sent. */\n\tlockClient(client) {\n\t\treturn acquireClientQueryLock(client);\n\t}\n\t/** Runs one statement that is not a stream, under the client's lock. */\n\trunStatement(work) {\n\t\treturn work();\n\t}\n\t/** Whether the client went back to the pool under this queryable, so it must send nothing more on it. */\n\tget handedBack() {\n\t\treturn false;\n\t}\n\tasync *query(request) {\n\t\tif (this.streams) {\n\t\t\tyield* this.#streamRows(request);\n\t\t\treturn;\n\t\t}\n\t\tconst result = await this.#runReleasing(request);\n\t\tfor (const row of Array.isArray(result) ? result : []) yield blindCast(row);\n\t}\n\tasync execute(request) {\n\t\treturn statementStats(await this.#runReleasing(request));\n\t}\n\tasync #runReleasing(request) {\n\t\tconst client = await this.acquireClient();\n\t\tconst outcome = { destroy: false };\n\t\ttry {\n\t\t\tconst releaseLock = await this.lockClient(client);\n\t\t\ttry {\n\t\t\t\treturn await this.runStatement(() => run(client, request));\n\t\t\t} finally {\n\t\t\t\treleaseLock();\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tthrow settle(error, outcome);\n\t\t} finally {\n\t\t\tawait this.releaseClient(client, outcome);\n\t\t}\n\t}\n\t/**\n\t* Streams the rows of `request` as they arrive; the package pauses the socket while the caller is busy. A caller that stops reading early is handled by {@link MysqlQueryable.#stopEarly}. A fatal error, such as a lost connection, destroys the client.\n\t*/\n\tasync *#streamRows(request) {\n\t\tconst client = await this.acquireClient();\n\t\tconst outcome = { destroy: false };\n\t\tlet releaseLock;\n\t\ttry {\n\t\t\treleaseLock = await this.lockClient(client);\n\t\t} catch (error) {\n\t\t\tawait this.releaseClient(client, outcome);\n\t\t\tthrow error;\n\t\t}\n\t\ttry {\n\t\t\tconst rows = startStream(client, request, outcome);\n\t\t\trows.on(\"error\", ignoreAfterStop);\n\t\t\tconst streamClosed = this.streamOpened(rows);\n\t\t\tlet settled = false;\n\t\t\ttry {\n\t\t\t\tfor await (const row of rows.iterator({ destroyOnReturn: false })) yield blindCast(row);\n\t\t\t\tsettled = true;\n\t\t\t} catch (error) {\n\t\t\t\tsettled = true;\n\t\t\t\tthrow settle(error, outcome);\n\t\t\t} finally {\n\t\t\t\tif (!settled && !this.handedBack) await this.#stopEarly(client, rows, outcome);\n\t\t\t\tif (outcome.destroy) rows.destroy();\n\t\t\t\tstreamClosed();\n\t\t\t}\n\t\t} finally {\n\t\t\treleaseLock();\n\t\t\tawait this.releaseClient(client, outcome);\n\t\t}\n\t}\n\t/**\n\t* Ends a stream the caller stopped reading early, and keeps the client usable. While its result is still arriving, the statement is first cancelled with `KILL QUERY`, so a large result is not downloaded only to be thrown away; MySQL does not say how many rows remain. On a held connection or in a transaction, as on a pooled one: `KILL QUERY` ends only the statement, the session survives, and in a transaction MySQL rolls back only that statement. The rest of the result is then read and dropped, MySQL's error for the cancelled statement among it. The client is never destroyed while its statement runs: the package's `destroy()` would send `KILL` itself, on a connection whose failure it does not handle.\n\t*/\n\tasync #stopEarly(client, rows, outcome) {\n\t\tconst cancel = resultReceived(rows) ? \"unsent\" : await this.cancelStatement(client.threadId);\n\t\tawait dropRest(rows).catch((error) => {\n\t\t\tif (isFatal(error) && !(cancel !== \"unsent\" && isQueryInterrupted(error))) outcome.destroy = true;\n\t\t});\n\t\tif (cancel === \"unconfirmed\") this.cancelUnconfirmed(outcome);\n\t}\n\t/**\n\t* A cancel that went out without an answer may still reach MySQL and interrupt the next statement on the client, so the client must not serve another caller. Once its rest has been read, nothing is receiving on it, so closing it sends no `KILL` of the package's own; a late `KILL QUERY` then finds no thread.\n\t*/\n\tcancelUnconfirmed(outcome) {\n\t\toutcome.destroy = true;\n\t}\n};\nfunction handedBackState() {\n\tlet refuse = () => {};\n\tconst signal = new Promise((_, reject) => {\n\t\trefuse = () => reject(connectionReleased());\n\t});\n\tsignal.catch(() => void 0);\n\tconst state = {\n\t\tdone: false,\n\t\tsignal,\n\t\trefuse: () => {\n\t\t\tstate.done = true;\n\t\t\trefuse();\n\t\t}\n\t};\n\treturn state;\n}\n/**\n* A queryable on a connection the caller holds, whose statements all run on the same session, in the order they are sent, under the client's lock. A statement sent while a stream on the connection is open waits for that stream to end; one awaited inside the stream's own loop never finishes, as on Postgres with a cursor.\n*/\nvar MysqlHeldQueryable = class extends MysqlQueryable {\n\tclient;\n\theld;\n\tholdsClient = true;\n\tget cancelStatement() {\n\t\treturn this.held.cancel;\n\t}\n\tstreamOpened(rows) {\n\t\tthis.held.streams.add(rows);\n\t\treturn () => this.held.streams.delete(rows);\n\t}\n\tget handedBack() {\n\t\treturn this.held.handedBack.done;\n\t}\n\tcancelUnconfirmed() {\n\t\tthis.held.cancelUnconfirmed = true;\n\t}\n\t/** Takes the client's lock, or fails once the connection is handed back, whether the statement was sent after that or was still waiting for the lock. A lock taken after that is given straight back. */\n\tasync lockClient(client) {\n\t\tthis.#refuseIfUnusable();\n\t\tconst locking = acquireClientQueryLock(client);\n\t\ttry {\n\t\t\tconst releaseLock = await Promise.race([locking, this.held.handedBack.signal]);\n\t\t\tif (!this.held.handedBack.done && !this.held.cancelUnconfirmed) return releaseLock;\n\t\t\treleaseLock();\n\t\t} catch {\n\t\t\tlocking.then((releaseLock) => releaseLock());\n\t\t}\n\t\tthis.#refuseIfUnusable();\n\t\tthrow connectionReleased();\n\t}\n\t/** Refuses a statement on a connection that was handed back, or whose cancel went out without an answer: a late `KILL QUERY` would interrupt it. */\n\t#refuseIfUnusable() {\n\t\tif (this.held.handedBack.done) throw connectionReleased();\n\t\tif (this.held.cancelUnconfirmed) throw cancelNotConfirmed();\n\t}\n\trunStatement(work) {\n\t\tconst running = work();\n\t\tthis.held.running.add(running);\n\t\trunning.then(() => this.held.running.delete(running), () => this.held.running.delete(running));\n\t\treturn running;\n\t}\n\tconstructor(client, held, streams) {\n\t\tsuper(streams);\n\t\tthis.client = client;\n\t\tthis.held = held;\n\t}\n\tasync acquireClient() {\n\t\tthis.#refuseIfUnusable();\n\t\treturn this.client;\n\t}\n\tasync releaseClient() {}\n\t/** Runs one of the package's transaction calls under the client's lock, taken as a statement takes it, so it keeps its place among the statements sent. */\n\tasync underLock(call) {\n\t\tconst client = await this.acquireClient();\n\t\tconst releaseLock = await this.lockClient(client);\n\t\ttry {\n\t\t\tawait this.runStatement(call);\n\t\t} catch (error) {\n\t\t\tthrow normalizeMysqlError(error);\n\t\t} finally {\n\t\t\treleaseLock();\n\t\t}\n\t}\n};\nvar MysqlConnectionImpl = class extends MysqlHeldQueryable {\n\t#onRelease;\n\tconstructor(client, streams, cancel, onRelease) {\n\t\tsuper(client, {\n\t\t\tstreams: /* @__PURE__ */ new Set(),\n\t\t\tcancelUnconfirmed: false,\n\t\t\trunning: /* @__PURE__ */ new Set(),\n\t\t\tcancel,\n\t\t\thandedBack: handedBackState()\n\t\t}, streams);\n\t\tthis.#onRelease = onRelease;\n\t}\n\t#released() {\n\t\tconst onRelease = this.#onRelease;\n\t\tthis.#onRelease = void 0;\n\t\tonRelease?.();\n\t}\n\tasync beginTransaction() {\n\t\tawait this.underLock(() => this.client.beginTransaction());\n\t\treturn new MysqlTransactionImpl(this.client, this.held, this.streams);\n\t}\n\t/**\n\t* Returns the connection to the pool, as the Postgres driver's `release()` does. From then on the connection refuses every statement, those still waiting for its lock included, so none runs later in another caller's session. A statement that is not a stream and is already running finishes, as on Postgres. A stream still open, such as one the caller dropped, is cancelled and read to its end by the driver: the package's release sends `ROLLBACK` behind that statement and waits for it, which would otherwise never finish, where `pg`'s release does not wait on the server.\n\t*/\n\tasync release() {\n\t\tif (this.held.handedBack.done) return;\n\t\tthis.held.handedBack.refuse();\n\t\ttry {\n\t\t\tif (this.held.streams.size > 0) await this.#cancelRunning();\n\t\t\tawait this.#runningSettled();\n\t\t\tif (this.held.cancelUnconfirmed) await this.#close();\n\t\t\telse await this.client.release();\n\t\t} finally {\n\t\t\tthis.#released();\n\t\t}\n\t}\n\t/** Closes the connection instead of returning it. It refuses every statement from then on, cancels whatever still runs and waits for it to end, so the package's `destroy()` never sends a `KILL` of its own. */\n\tasync destroy(_reason) {\n\t\tif (this.held.handedBack.done) return;\n\t\tthis.held.handedBack.refuse();\n\t\ttry {\n\t\t\tif (this.held.streams.size > 0 || this.held.running.size > 0) await this.#cancelRunning();\n\t\t\tawait this.#runningSettled();\n\t\t\tawait this.#close();\n\t\t} finally {\n\t\t\tthis.#released();\n\t\t}\n\t}\n\t/** Closes the client once the `ping` queued behind anything left on it has answered, so nothing is receiving and the package's `destroy()` sends no `KILL` of its own. */\n\tasync #close() {\n\t\tawait this.client.ping().catch(() => void 0);\n\t\tthis.client.destroy();\n\t}\n\tasync #cancelRunning() {\n\t\tif (await this.held.cancel(this.client.threadId) === \"unconfirmed\") this.held.cancelUnconfirmed = true;\n\t\tawait Promise.all([...this.held.streams].map((rows) => dropRest(rows).catch(() => void 0)));\n\t}\n\tasync #runningSettled() {\n\t\tawait Promise.allSettled([...this.held.running]);\n\t}\n};\nvar MysqlTransactionImpl = class extends MysqlHeldQueryable {\n\tasync commit() {\n\t\tawait this.underLock(() => this.client.commit());\n\t}\n\tasync rollback() {\n\t\tawait this.underLock(() => this.client.rollback());\n\t}\n};\n/** How many clients the driver has handed out and not had back, a held connection or one lent to a single statement, so `close()` can wait until every one is back. */\nvar ClientsInUse = class {\n\t#count = 0;\n\t#idle = [];\n\tacquired() {\n\t\tthis.#count += 1;\n\t}\n\treleased() {\n\t\tthis.#count -= 1;\n\t\tif (this.#count === 0) for (const resolve of this.#idle.splice(0)) resolve();\n\t}\n\tnone() {\n\t\treturn this.#count === 0 ? Promise.resolve() : new Promise((resolve) => this.#idle.push(resolve));\n\t}\n};\n/** The pool reports a connection it failed to open on its `'error'` event, and again as the cause of a `getConnection` that times out; the driver reports it there. */\nfunction ignoreConnectionFailure() {}\n/**\n* The statements waiting for a connection from the pool. The pool keeps retrying a connection it cannot open, with a growing pause between attempts, and fails a waiting `getConnection` only when `connectionTimeoutMillis` ends; the package reports each failure to its `logger.error` as it happens, together with every failed statement. `pg.Pool` instead rejects a pending connect whose connection fails, at once. So the driver fails the waiting statements at once with a failure no retry can get past. It keeps no failure: a later statement waits for the pool's next attempt.\n*/\nvar WaitingForConnection = class {\n\t#fail = /* @__PURE__ */ new Set();\n\tasync race(getting) {\n\t\tlet fail = () => {};\n\t\tconst failed = new Promise((_, reject) => {\n\t\t\tfail = reject;\n\t\t});\n\t\tthis.#fail.add(fail);\n\t\ttry {\n\t\t\treturn await Promise.race([getting, failed]);\n\t\t} finally {\n\t\t\tthis.#fail.delete(fail);\n\t\t}\n\t}\n\t/** Reacts to an error the package reports: only a failure to connect, which the package marks fatal, that no retry can get past. A statement can fail with the same error number, such as 1524 for a missing authentication plugin, but not fatally. */\n\treported(error) {\n\t\tif (!isFatal(error) || !connectingCannotSucceed(error)) return;\n\t\tfor (const fail of this.#fail) fail(error);\n\t\tthis.#fail.clear();\n\t}\n};\n/** Gives a connection the pool hands over after its statement stopped waiting back to the pool. */\nfunction releaseLate(getting) {\n\tgetting.then((late) => late.release(), ignoreConnectionFailure).catch(ignoreConnectionFailure);\n}\n/**\n* The MySQL runtime driver: a `mariadb` pool. Every statement takes one round trip over the text protocol, the package writing its values into it. A query reads its whole result before the first row unless `stream` is set. The pool runs the session setup once on each physical connection, and the driver then sets the target's session settings on it; a connection goes back to the pool after each statement as it is; a broken connection is destroyed. `close()` waits for every connection and stream it has handed out before it ends the pool.\n*/\nvar MysqlDriver = class extends MysqlQueryable {\n\tfamilyId = \"sql\";\n\ttargetId;\n\tholdsClient = false;\n\t#state = { kind: \"unbound\" };\n\t#inUse = new ClientsInUse();\n\t#canceller;\n\tcancelStatement = (threadId) => this.#canceller?.cancel(threadId) ?? Promise.resolve(\"unsent\");\n\t#options;\n\t#sessionSettings;\n\tconstructor(options, targetId) {\n\t\tsuper(options.stream ?? false);\n\t\tthis.targetId = targetId;\n\t\tthis.#options = options;\n\t\tthis.#sessionSettings = new SessionSettingsGuard(options.sessionSettings ?? {});\n\t}\n\tget state() {\n\t\treturn this.#state.kind;\n\t}\n\tasync connect(binding) {\n\t\tif (this.#state.kind === \"connected\") throw errorRuntime(\"DRIVER.ALREADY_CONNECTED\", \"MySQL driver already connected\", { fix: \"Call close() before connecting again.\" });\n\t\tconst waiting = new WaitingForConnection();\n\t\tconst pool = createPool({\n\t\t\t...mysqlPoolOptions(binding.url, this.#options.poolOptions),\n\t\t\tlogger: { error: (error) => waiting.reported(error) }\n\t\t});\n\t\tif (pool instanceof EventEmitter) pool.on(\"error\", ignoreConnectionFailure);\n\t\tthis.#state = {\n\t\t\tkind: \"connected\",\n\t\t\tpool,\n\t\t\twaiting\n\t\t};\n\t\tthis.#canceller = new Canceller(binding.url, mysqlPoolIdleTimeoutMillis(this.#options.poolOptions));\n\t}\n\tasync acquireConnection() {\n\t\treturn new MysqlConnectionImpl(await this.acquireClient(), this.streams, this.cancelStatement, () => this.#inUse.released());\n\t}\n\tasync close() {\n\t\tif (this.#state.kind !== \"connected\") return;\n\t\tconst { pool } = this.#state;\n\t\tthis.#state = { kind: \"closed\" };\n\t\tawait this.#inUse.none();\n\t\tawait this.#canceller?.close();\n\t\tthis.#canceller = void 0;\n\t\tawait pool.end();\n\t}\n\tasync acquireClient() {\n\t\tif (this.#state.kind !== \"connected\") throw notConnected(this.#state.kind === \"closed\" ? \"MySQL driver is closed\" : \"MySQL driver not connected\");\n\t\tconst { pool, waiting } = this.#state;\n\t\tthis.#inUse.acquired();\n\t\tconst getting = pool.getConnection();\n\t\tlet client;\n\t\ttry {\n\t\t\tclient = await waiting.race(getting);\n\t\t} catch (error) {\n\t\t\treleaseLate(getting);\n\t\t\tthis.#inUse.released();\n\t\t\tthrow normalizeMysqlError(error);\n\t\t}\n\t\ttry {\n\t\t\tawait this.#sessionSettings.ensure(client);\n\t\t} catch (error) {\n\t\t\tclient.destroy();\n\t\t\tthis.#inUse.released();\n\t\t\tthrow normalizeMysqlError(error);\n\t\t}\n\t\treturn client;\n\t}\n\t/**\n\t* Destroys a client only after an error the package marks fatal, or after a cancel that went out without an answer once the rest of its result was read (`cancelUnconfirmed`). The package marks an error fatal when the connection's socket is gone or can no longer be trusted, and it has then already set the connection closed and failed every command on it (`fatalError` in its `connection.js`), so no command is receiving and its `destroy()` sends no `KILL`. A statement the caller stopped early is cancelled and read to its end instead (`#stopEarly`).\n\t*/\n\tasync releaseClient(client, { destroy }) {\n\t\ttry {\n\t\t\tif (destroy) client.destroy();\n\t\t\telse await client.release();\n\t\t} finally {\n\t\t\tthis.#inUse.released();\n\t\t}\n\t}\n};\n//#endregion\n//#region src/core/runtime/runtime-driver.ts\n/** The runtime driver descriptor of MySQL, or of a target that extends it, whose drivers carry `targetId`. */\nfunction createMysqlRuntimeDriverDescriptor(targetId) {\n\treturn {\n\t\t...mysqlDriverDescriptorMetaFor(targetId),\n\t\tcreate(options, sessionSettings) {\n\t\t\treturn new MysqlDriver({\n\t\t\t\t...options,\n\t\t\t\t...ifDefined(\"sessionSettings\", sessionSettings)\n\t\t\t}, targetId);\n\t\t}\n\t};\n}\nconst mysqlRuntimeDriverDescriptor = createMysqlRuntimeDriverDescriptor(\"mysql\");\n//#endregion\nexport { createMysqlRuntimeDriverDescriptor, mysqlRuntimeDriverDescriptor as default };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;;;;;;;AASA,MAAM,wBAAwB;AAC9B,SAAS,QAAQ,QAAQ;CACxB,IAAI;CACJ,OAAO;EACN,SAAS,IAAI,SAAS,YAAY;GACjC,QAAQ,iBAAiB,QAAQ,SAAS,GAAG,MAAM;EACpD,CAAC;EACD,aAAa,aAAa,KAAK;CAChC;AACD;;;;AAIA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O"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"target__runtime.mjs","names":[],"sources":["../../../../3-targets/mysql/1-mysql/1-target/dist/runtime.mjs"],"sourcesContent":["import { n as mysqlTargetDescriptorMetaRuntime, t as mysqlNowGenerators } from \"./date-time-now-generators-DY-8Bodc.mjs\";\nimport { t as MysqlContractSerializer } from \"./mysql-contract-serializer-BnTKRSsN.mjs\";\n//#region src/core/runtime/runtime-target.ts\nconst mysqlRuntimeTargetDescriptor = {\n\t...mysqlTargetDescriptorMetaRuntime,\n\tcodecs: () => [],\n\tcreate() {\n\t\treturn {\n\t\t\tfamilyId: \"sql\",\n\t\t\ttargetId: \"mysql\"\n\t\t};\n\t}\n};\n//#endregion\nexport { MysqlContractSerializer, mysqlRuntimeTargetDescriptor as default, mysqlNowGenerators };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;AAGA,MAAM,+BAA+B;CACpC,GAAG;CACH,cAAc,CAAC;CACf,SAAS;EACR,OAAO;GACN,UAAU;GACV,UAAU;EACX;CACD;AACD"}
|