@prisma/orm-target-postgres 0.17.0-dev.1 → 0.17.0-dev.10
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-DhqcO3YO-jzwDVcCv.mjs → adapter-wewzDGJh-DkJnr3kE.mjs} +4 -3
- package/dist/adapter-wewzDGJh-DkJnr3kE.mjs.map +1 -0
- package/dist/adapter.d.mts +2 -1
- package/dist/adapter.mjs +4 -3
- package/dist/adapter__adapter.mjs +1 -1
- package/dist/adapter__control.mjs +2 -2
- package/dist/adapter__control.mjs.map +1 -1
- package/dist/adapter__runtime.mjs +4 -4
- package/dist/adapter__runtime.mjs.map +1 -1
- package/dist/adapter__sql-renderer.d.mts +2 -0
- package/dist/adapter__sql-renderer.mjs +2 -0
- package/dist/aggregates-CgqNfj2O.d.mts +10 -0
- package/dist/aggregates-CgqNfj2O.d.mts.map +1 -0
- package/dist/aggregates-ftUgi-eC.mjs +102 -0
- package/dist/aggregates-ftUgi-eC.mjs.map +1 -0
- package/dist/{codecs-CBl0nD44-CaWPc1bd.mjs → codecs-CBl0nD44-CjInu_aV.mjs} +2 -2
- package/dist/{codecs-CBl0nD44-CaWPc1bd.mjs.map → codecs-CBl0nD44-CjInu_aV.mjs.map} +1 -1
- package/dist/{codecs-CHIVTNZs.mjs → codecs-rujsdlZR.mjs} +2 -2
- package/dist/{codecs-CHIVTNZs.mjs.map → codecs-rujsdlZR.mjs.map} +1 -1
- package/dist/{control-DRMWptiJ.mjs → control-BzDnaGim.mjs} +5 -5
- package/dist/{control-DRMWptiJ.mjs.map → control-BzDnaGim.mjs.map} +1 -1
- package/dist/{control-adapter-B9t0g7Pf-HrCxlM65.mjs → control-adapter-CipVam9p-B-E2SF8_.mjs} +9 -578
- package/dist/control-adapter-CipVam9p-B-E2SF8_.mjs.map +1 -0
- package/dist/{control-policy-Cl3RRSPg-CT3QGpR3.mjs → control-policy-Cl3RRSPg-BUi6pcI-.mjs} +3 -3
- package/dist/{control-policy-Cl3RRSPg-CT3QGpR3.mjs.map → control-policy-Cl3RRSPg-BUi6pcI-.mjs.map} +1 -1
- package/dist/{descriptor-meta-2IlVC6_d-DnV00Qd_.mjs → descriptor-meta--MCrvIgj-DFsLFDj1.mjs} +6 -4
- package/dist/descriptor-meta--MCrvIgj-DFsLFDj1.mjs.map +1 -0
- package/dist/{descriptor-meta-DnHabAS3-C53XXPQw.mjs → descriptor-meta-DnHabAS3-BiTguA3K.mjs} +2 -2
- package/dist/{descriptor-meta-DnHabAS3-C53XXPQw.mjs.map → descriptor-meta-DnHabAS3-BiTguA3K.mjs.map} +1 -1
- package/dist/{diff-database-schema-BfRs2vrG-D2o4KII0.mjs → diff-database-schema-BfRs2vrG-DInOv5LW.mjs} +2 -2
- package/dist/{diff-database-schema-BfRs2vrG-D2o4KII0.mjs.map → diff-database-schema-BfRs2vrG-DInOv5LW.mjs.map} +1 -1
- package/dist/{op-factory-call-DifL68KT-Bo6pxs-R.mjs → op-factory-call-DifL68KT-CNFEDNsf.mjs} +2 -2
- package/dist/{op-factory-call-DifL68KT-Bo6pxs-R.mjs.map → op-factory-call-DifL68KT-CNFEDNsf.mjs.map} +1 -1
- package/dist/{planner-Bmje9ii8-B99fEsNM.mjs → planner-Bmje9ii8-DdjXZxyD.mjs} +5 -5
- package/dist/{planner-Bmje9ii8-B99fEsNM.mjs.map → planner-Bmje9ii8-DdjXZxyD.mjs.map} +1 -1
- package/dist/{planner-ddl-builders-CbfICQfm-CxYiLrhX.mjs → planner-ddl-builders-CbfICQfm-CGjwaNy7.mjs} +2 -2
- package/dist/{planner-ddl-builders-CbfICQfm-CxYiLrhX.mjs.map → planner-ddl-builders-CbfICQfm-CGjwaNy7.mjs.map} +1 -1
- package/dist/{planner-produced-postgres-migration-Cicg2sXg-Ck9iDxGI.mjs → planner-produced-postgres-migration-Cicg2sXg-CZI7mdz9.mjs} +2 -2
- package/dist/{planner-produced-postgres-migration-Cicg2sXg-Ck9iDxGI.mjs.map → planner-produced-postgres-migration-Cicg2sXg-CZI7mdz9.mjs.map} +1 -1
- package/dist/{postgres-migration-CJshdIZn-DYYjgdD0.mjs → postgres-migration-CJshdIZn-CT6Cxd4x.mjs} +2 -2
- package/dist/{postgres-migration-CJshdIZn-DYYjgdD0.mjs.map → postgres-migration-CJshdIZn-CT6Cxd4x.mjs.map} +1 -1
- package/dist/sql-renderer-CZE98PJj-Bx5D-Txz.mjs +579 -0
- package/dist/sql-renderer-CZE98PJj-Bx5D-Txz.mjs.map +1 -0
- package/dist/sql-renderer-Cyls5Xy4.d.mts +19 -0
- package/dist/sql-renderer-Cyls5Xy4.d.mts.map +1 -0
- package/dist/target.d.mts +2 -1
- package/dist/target.mjs +13 -12
- package/dist/target__aggregates.d.mts +2 -0
- package/dist/target__aggregates.mjs +2 -0
- package/dist/target__codecs.mjs +2 -2
- package/dist/target__control.mjs +1 -1
- package/dist/target__diff-database-schema.mjs +1 -1
- package/dist/target__issue-planner.mjs +1 -1
- package/dist/target__migration.mjs +2 -2
- package/dist/target__op-factory-call.mjs +1 -1
- package/dist/target__pack.mjs +1 -1
- package/dist/target__planner-ddl-builders.mjs +1 -1
- package/dist/target__planner-produced-postgres-migration.mjs +1 -1
- package/dist/target__planner.mjs +2 -2
- package/package.json +11 -9
- package/dist/adapter-DhqcO3YO-jzwDVcCv.mjs.map +0 -1
- package/dist/control-adapter-B9t0g7Pf-HrCxlM65.mjs.map +0 -1
- package/dist/descriptor-meta-2IlVC6_d-DnV00Qd_.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sql-renderer-CZE98PJj-Bx5D-Txz.mjs","names":[],"sources":["../../../../3-targets/6-adapters/postgres/dist/sql-renderer-CZE98PJj.mjs"],"sourcesContent":["import { LiteralExpr, collectOrderedParamRefs } from \"@internal/sql-relational-core/ast\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { isPgEnumParams } from \"@internal/target-postgres/codecs\";\nimport { escapeLiteral, quoteIdentifier, quoteQualifiedName } from \"@internal/target-postgres/sql-utils\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { InternalError, assertNever } from \"@internal/utils/internal-error\";\nimport { runtimeError } from \"@internal/framework-components/runtime\";\n//#region src/core/adapter-errors.ts\nfunction adapterError(code, message, options) {\n\treturn structuredError(code, message, options);\n}\n//#endregion\n//#region src/core/sql-renderer.ts\n/**\n* Postgres native types whose unknown-OID parameter inference is reliable in arbitrary expression positions. Parameters bound to a descriptor whose `nativeTypeFor` result falls in this set are emitted as plain `$N`; everything else (including `json`, `jsonb`, extension types like `vector`, and unknown user types) is emitted as `$N::<nativeType>` so the planner picks an unambiguous overload.\n*\n* `json` / `jsonb` are intentionally excluded despite being Postgres builtins: their operator overloads make context inference unreliable in expression positions (e.g. `$1 -> 'key'` is ambiguous between the two).\n*\n* Spellings match the target descriptors' `nativeTypeFor` results, not the `udt_name` abbreviations that ADR 205 used as illustrative shorthand. The registry-based cast policy compares against these strings directly.\n*/\nconst POSTGRES_INFERRABLE_NATIVE_TYPES = /* @__PURE__ */ new Set([\n\t\"integer\",\n\t\"smallint\",\n\t\"bigint\",\n\t\"real\",\n\t\"double precision\",\n\t\"numeric\",\n\t\"boolean\",\n\t\"text\",\n\t\"character\",\n\t\"character varying\",\n\t\"timestamp\",\n\t\"timestamp without time zone\",\n\t\"timestamp with time zone\",\n\t\"time\",\n\t\"timetz\",\n\t\"interval\",\n\t\"bit\",\n\t\"bit varying\"\n]);\nfunction renderTypedParam(index, codecId, codecDescriptorRegistry, many, typeParams) {\n\tif (codecId === void 0) return `$${index}`;\n\tconst descriptor = codecDescriptorRegistry.descriptorFor(codecId);\n\tif (descriptor === void 0) throw adapterError(\"RUNTIME.PARAM_REF_MISSING_CODEC\", `Postgres lowering: ParamRef carries codecId \"${codecId}\" but the validated PostgreSQL codec registry has no entry for it. This usually indicates a missing extension pack in the runtime stack — register the pack that contributes this codec (e.g. \\`extensions: [pgvectorRuntime]\\`), or use the codec directly from \\`@internal/target-postgres/codecs\\` if it's a builtin.`, { meta: { codecId } });\n\tconst ref = {\n\t\tcodecId,\n\t\t...ifDefined(\"many\", many),\n\t\t...ifDefined(\"typeParams\", typeParams)\n\t};\n\tconst nativeType = descriptor.nativeTypeFor(ref);\n\tconst arraySuffix = many ? \"[]\" : \"\";\n\tif (isPgEnumParams(typeParams)) return `$${index}::${quoteQualifiedName(nativeType)}${arraySuffix}`;\n\tif (!POSTGRES_INFERRABLE_NATIVE_TYPES.has(nativeType) || many) return `$${index}::${nativeType}${arraySuffix}`;\n\treturn `$${index}`;\n}\nfunction unreachableKind(value) {\n\tconst candidate = value;\n\tif (typeof candidate === \"object\" && candidate !== null && \"kind\" in candidate && typeof candidate.kind === \"string\") return candidate.kind;\n\treturn \"unknown\";\n}\n/**\n* Render a SQL query AST to a Postgres-flavored `{ sql, params }` payload.\n*\n* Shared between the runtime (`PostgresAdapterImpl.lower`) and control (`PostgresControlAdapter.lower`) entrypoints so emit-time and run-time paths produce byte-identical output for the same AST.\n*/\nfunction renderLoweredSql(ast, contract, codecDescriptorRegistry) {\n\tconst orderedRefs = collectOrderedParamRefs(ast);\n\tconst indexMap = /* @__PURE__ */ new Map();\n\tconst params = orderedRefs.map((ref, i) => {\n\t\tindexMap.set(ref, i + 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 pim = {\n\t\tindexMap,\n\t\tcodecDescriptorRegistry\n\t};\n\tconst node = ast;\n\tlet sql;\n\tswitch (node.kind) {\n\t\tcase \"select\":\n\t\t\tsql = renderSelect(node, contract, pim);\n\t\t\tbreak;\n\t\tcase \"insert\":\n\t\t\tsql = renderInsert(node, contract, pim);\n\t\t\tbreak;\n\t\tcase \"update\":\n\t\t\tsql = renderUpdate(node, contract, pim);\n\t\t\tbreak;\n\t\tcase \"delete\":\n\t\t\tsql = renderDelete(node, contract, pim);\n\t\t\tbreak;\n\t\tcase \"raw-sql\":\n\t\t\tsql = renderRawSql(node, contract, pim);\n\t\t\tbreak;\n\t\t// v8 ignore next 4\n\t\tdefault: assertNever(node, `Unsupported AST node kind: ${unreachableKind(node)}`);\n\t}\n\treturn Object.freeze({\n\t\tsql,\n\t\tparams: Object.freeze(params)\n\t});\n}\nfunction renderLimitOffset(keyword, value, contract, pim) {\n\tif (value === void 0) return \"\";\n\tif (typeof value === \"number\") return `${keyword} ${value}`;\n\treturn `${keyword} ${renderExpr(value, contract, pim)}`;\n}\nfunction renderSelect(ast, contract, pim) {\n\tconst sourcesByRef = collectTableSources(ast);\n\treturn [\n\t\t`SELECT ${renderDistinctPrefix(ast.distinct, ast.distinctOn, sourcesByRef, contract, pim)}${renderProjection(ast.projection, contract, pim)}`,\n\t\tast.from !== void 0 ? `FROM ${renderSource(ast.from, contract, pim)}` : \"\",\n\t\tast.joins?.length ? ast.joins.map((join) => renderJoin(join, contract, pim)).join(\" \") : \"\",\n\t\tast.where ? `WHERE ${renderWhere(ast.where, contract, pim)}` : \"\",\n\t\tast.groupBy?.length ? `GROUP BY ${ast.groupBy.map((expr) => renderExpr(expr, contract, pim)).join(\", \")}` : \"\",\n\t\tast.having ? `HAVING ${renderWhere(ast.having, contract, pim)}` : \"\",\n\t\tast.orderBy?.length ? `ORDER BY ${ast.orderBy.map((order) => {\n\t\t\treturn `${renderOrderByExpr(order.expr, sourcesByRef, contract, pim)} ${order.dir.toUpperCase()}`;\n\t\t}).join(\", \")}` : \"\",\n\t\trenderLimitOffset(\"LIMIT\", ast.limit, contract, pim),\n\t\trenderLimitOffset(\"OFFSET\", ast.offset, contract, pim)\n\t].filter((part) => part.length > 0).join(\" \").trim();\n}\n/**\n* Map a SELECT's table references (the FROM source and any JOIN sources) to their storage coordinate, keyed by the name a `ColumnRef.table` would carry (the alias when present, otherwise the table name). Derived-table sources are skipped — their columns are projected through a sub-select, not a base storage column, so the enum hook does not apply.\n*/\nfunction collectTableSources(ast) {\n\tconst sources = /* @__PURE__ */ new Map();\n\tconst add = (source) => {\n\t\tif (source.kind !== \"table-source\") return;\n\t\tconst ref = source.alias ?? source.name;\n\t\tsources.set(ref, {\n\t\t\tname: source.name,\n\t\t\tnamespaceId: source.namespaceId\n\t\t});\n\t};\n\tif (ast.from !== void 0) add(ast.from);\n\tfor (const join of ast.joins ?? []) add(join.source);\n\treturn sources;\n}\n/**\n* Ordered, codec-encoded values of the value-set a storage column restricts to, or `undefined` when the referenced column carries no value-set (the common, non-enum case). Resolves the column's storage coordinate from the SELECT's table sources, then the column's `valueSet` ref to the value-set's `values`.\n*/\nfunction allStrings(values) {\n\treturn values.every((value) => typeof value === \"string\");\n}\nfunction resolveEnumOrderValues(ref, sourcesByRef, contract) {\n\tconst source = sourcesByRef.get(ref.table);\n\tif (source === void 0 || source.namespaceId === void 0) return;\n\tconst sourceNs = contract.storage.namespaces[source.namespaceId];\n\tconst valueSet = (sourceNs !== void 0 ? sourceNs.entries.table?.[source.name]?.columns[ref.column] : void 0)?.valueSet;\n\tif (valueSet === void 0) return;\n\tconst valueSetNs = contract.storage.namespaces[valueSet.namespaceId];\n\treturn valueSetNs !== void 0 ? valueSetNs.entries.valueSet?.[valueSet.entityName]?.values : void 0;\n}\n/**\n* Ordered values for an unqualified ORDER BY column (an `identifier-ref`, the shape the sql-builder emits for `.orderBy('col')`). Scans every FROM/JOIN source for a column of that name. Resolves only when exactly one source has a column of that name and it carries a value-set; if more than one source has such a column the bare identifier is ambiguous (regardless of which are enum-backed), so it falls through to the plain column rendering.\n*/\nfunction resolveEnumOrderValuesForIdentifier(name, sourcesByRef, contract) {\n\tlet matchedColumns = 0;\n\tlet resolved;\n\tfor (const source of sourcesByRef.values()) {\n\t\tif (source.namespaceId === void 0) continue;\n\t\tconst identNs = contract.storage.namespaces[source.namespaceId];\n\t\tconst column = identNs !== void 0 ? identNs.entries.table?.[source.name]?.columns[name] : void 0;\n\t\tif (column === void 0) continue;\n\t\tmatchedColumns += 1;\n\t\tif (matchedColumns > 1) return;\n\t\tconst valueSet = column.valueSet;\n\t\tif (valueSet === void 0) return;\n\t\tconst valueSetNs = contract.storage.namespaces[valueSet.namespaceId];\n\t\tresolved = valueSetNs !== void 0 ? valueSetNs.entries.valueSet?.[valueSet.entityName]?.values : void 0;\n\t}\n\treturn resolved;\n}\n/**\n* Render an ORDER BY expression. A column reference onto an enum-restricted column sorts by declaration order via `array_position(ARRAY[…]::text[], <col>)` over the value-set's ordered values (NULLs return `NULL` from `array_position`, sorting per the clause's default NULL handling). Both qualified `column-ref`s and the unqualified `identifier-ref`s the sql-builder emits for `.orderBy('col')` are intercepted. Every other expression renders unchanged.\n*/\nfunction renderOrderByExpr(expr, sourcesByRef, contract, pim) {\n\tif (expr.kind === \"column-ref\") {\n\t\tconst orderValues = resolveEnumOrderValues(expr, sourcesByRef, contract);\n\t\tif (orderValues !== void 0 && allStrings(orderValues)) return `array_position(ARRAY[${orderValues.map((value) => `'${escapeLiteral(value)}'`).join(\", \")}]::text[], ${renderColumn(expr)})`;\n\t}\n\tif (expr.kind === \"identifier-ref\") {\n\t\tconst orderValues = resolveEnumOrderValuesForIdentifier(expr.name, sourcesByRef, contract);\n\t\tif (orderValues !== void 0 && allStrings(orderValues)) return `array_position(ARRAY[${orderValues.map((value) => `'${escapeLiteral(value)}'`).join(\", \")}]::text[], ${quoteIdentifier(expr.name)})`;\n\t}\n\treturn renderExpr(expr, contract, pim);\n}\nfunction renderProjection(projection, contract, pim) {\n\treturn projection.map((item) => {\n\t\tconst alias = quoteIdentifier(item.alias);\n\t\tif (item.expr.kind === \"literal\") return `${renderLiteral(item.expr)} AS ${alias}`;\n\t\treturn `${renderExpr(item.expr, contract, pim)} AS ${alias}`;\n\t}).join(\", \");\n}\nfunction renderReturning(items, contract, pim) {\n\treturn items.map((item) => {\n\t\tif (item.expr.kind === \"column-ref\") {\n\t\t\tconst rendered = renderColumn(item.expr);\n\t\t\treturn item.expr.column === item.alias ? rendered : `${rendered} AS ${quoteIdentifier(item.alias)}`;\n\t\t}\n\t\tif (item.expr.kind === \"literal\") return `${renderLiteral(item.expr)} AS ${quoteIdentifier(item.alias)}`;\n\t\treturn `${renderExpr(item.expr, contract, pim)} AS ${quoteIdentifier(item.alias)}`;\n\t}).join(\", \");\n}\nfunction renderDistinctPrefix(distinct, distinctOn, sourcesByRef, contract, pim) {\n\tif (distinctOn && distinctOn.length > 0) return `DISTINCT ON (${distinctOn.map((expr) => renderOrderByExpr(expr, sourcesByRef, contract, pim)).join(\", \")}) `;\n\tif (distinct) return \"DISTINCT \";\n\treturn \"\";\n}\nfunction hasExplicitSchema(table) {\n\treturn \"schema\" in table && typeof table.schema === \"string\";\n}\nfunction qualifyTableFromNamespaceCoordinate(table, contract) {\n\tif (hasExplicitSchema(table)) return `${quoteIdentifier(table.schema)}.${quoteIdentifier(table.name)}`;\n\tif (table.namespaceId === void 0) return quoteIdentifier(table.name);\n\tconst namespace = contract.storage.namespaces[table.namespaceId];\n\tif (namespace === void 0) throw adapterError(\"RUNTIME.NAMESPACE_UNKNOWN\", `Table \"${table.name}\" references namespace \"${table.namespaceId}\" which is not present as a Postgres schema on the contract`, { meta: {\n\t\ttable: table.name,\n\t\tnamespaceId: table.namespaceId,\n\t\treason: \"not-present\"\n\t} });\n\tconst qualifyTable = namespace.qualifyTable;\n\tif (qualifyTable === void 0) throw adapterError(\"RUNTIME.NAMESPACE_UNKNOWN\", `Table \"${table.name}\" references namespace \"${table.namespaceId}\" which is not materialised as a Postgres schema on the contract`, { meta: {\n\t\ttable: table.name,\n\t\tnamespaceId: table.namespaceId,\n\t\treason: \"not-materialised\"\n\t} });\n\treturn qualifyTable.call(namespace, table.name);\n}\nfunction renderTableSource(source, contract) {\n\tconst qualified = qualifyTableFromNamespaceCoordinate(source, contract);\n\tif (!source.alias) return qualified;\n\treturn `${qualified} AS ${quoteIdentifier(source.alias)}`;\n}\nfunction renderSource(source, contract, pim) {\n\tconst node = source;\n\tswitch (node.kind) {\n\t\tcase \"table-source\": return renderTableSource(node, contract);\n\t\tcase \"derived-table-source\": return `(${renderSelect(node.query, contract, pim)}) AS ${quoteIdentifier(node.alias)}`;\n\t\tcase \"function-source\": {\n\t\t\tconst args = node.args.map((arg) => renderExpr(arg, contract, pim)).join(\", \");\n\t\t\treturn `${`${node.fn}(${args})`}${node.ordinality ? \" WITH ORDINALITY\" : \"\"}${node.alias === void 0 ? \"\" : ` AS ${quoteIdentifier(node.alias)}`}${node.columnAliases === void 0 ? \"\" : `(${node.columnAliases.map((column) => quoteIdentifier(column)).join(\", \")})`}`;\n\t\t}\n\t\t// v8 ignore next 4\n\t\tdefault: assertNever(node, `Unsupported source node kind: ${unreachableKind(node)}`);\n\t}\n}\nfunction assertScalarSubquery(query) {\n\tif (query.projection.length !== 1) throw adapterError(\"RUNTIME.AST_INVALID\", \"Subquery expressions must project exactly one column\", { meta: { node: \"subquery-expr\" } });\n}\nfunction renderSubqueryExpr(expr, contract, pim) {\n\tassertScalarSubquery(expr.query);\n\treturn `(${renderSelect(expr.query, contract, pim)})`;\n}\nfunction renderWhere(expr, contract, pim) {\n\treturn renderExpr(expr, contract, pim);\n}\nfunction renderNullCheck(expr, contract, pim) {\n\tconst rendered = renderExpr(expr.expr, contract, pim);\n\tconst renderedExpr = isAtomicExpressionKind(expr.expr.kind) ? rendered : `(${rendered})`;\n\treturn expr.isNull ? `${renderedExpr} IS NULL` : `${renderedExpr} IS NOT NULL`;\n}\n/**\n* Atomic expression kinds whose rendered SQL is already self-delimited (a column reference, parameter, literal, function call, aggregate, etc.) and therefore does not need surrounding parentheses when used as the left operand of a postfix predicate like `IS NULL` or `IS NOT NULL`, or as either operand of a binary infix operator.\n*\n* Anything not in this set is treated as composite (binary, AND/OR/NOT, EXISTS, nested IS NULL, subqueries, operation templates) and gets wrapped to preserve grouping.\n*/\nfunction isAtomicExpressionKind(kind) {\n\tswitch (kind) {\n\t\tcase \"column-ref\":\n\t\tcase \"identifier-ref\":\n\t\tcase \"param-ref\":\n\t\tcase \"prepared-param-ref\":\n\t\tcase \"literal\":\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 \"list\": return true;\n\t\tcase \"subquery\":\n\t\tcase \"operation\":\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 \"raw-expr\": return false;\n\t}\n}\nfunction renderBinary(expr, contract, pim) {\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 leftExpr = expr.left;\n\tconst left = renderExpr(leftExpr, contract, pim);\n\tconst leftRendered = leftExpr.kind === \"operation\" || leftExpr.kind === \"subquery\" ? `(${left})` : left;\n\tconst rightNode = expr.right;\n\tlet right;\n\tswitch (rightNode.kind) {\n\t\tcase \"list\":\n\t\t\tright = renderListLiteral(rightNode, contract, pim);\n\t\t\tbreak;\n\t\tcase \"literal\":\n\t\t\tright = renderLiteral(rightNode);\n\t\t\tbreak;\n\t\tcase \"column-ref\":\n\t\t\tright = renderColumn(rightNode);\n\t\t\tbreak;\n\t\tcase \"param-ref\":\n\t\tcase \"prepared-param-ref\":\n\t\t\tright = renderParamRef(rightNode, pim);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tright = renderExpr(rightNode, contract, pim);\n\t\t\tbreak;\n\t}\n\treturn `${leftRendered} ${{\n\t\teq: \"=\",\n\t\tneq: \"!=\",\n\t\tgt: \">\",\n\t\tlt: \"<\",\n\t\tgte: \">=\",\n\t\tlte: \"<=\",\n\t\tlike: \"LIKE\",\n\t\tin: \"IN\",\n\t\tnotIn: \"NOT IN\"\n\t}[expr.op]} ${right}`;\n}\nfunction renderListLiteral(expr, contract, pim) {\n\tif (expr.values.length === 0) return \"(NULL)\";\n\treturn `(${expr.values.map((v) => {\n\t\tif (v.kind === \"param-ref\" || v.kind === \"prepared-param-ref\") return renderParamRef(v, pim);\n\t\tif (v.kind === \"literal\") return renderLiteral(v);\n\t\treturn renderExpr(v, contract, pim);\n\t}).join(\", \")})`;\n}\nfunction renderColumn(ref) {\n\tif (ref.table === \"excluded\") return `excluded.${quoteIdentifier(ref.column)}`;\n\treturn `${quoteIdentifier(ref.table)}.${quoteIdentifier(ref.column)}`;\n}\nfunction renderAggregateExpr(expr, contract, pim) {\n\tconst fn = expr.fn.toUpperCase();\n\tif (!expr.expr) return `${fn}(*)`;\n\treturn `${fn}(${renderExpr(expr.expr, contract, pim)})`;\n}\nfunction renderWindowFuncExpr(expr, contract, pim) {\n\treturn `${expr.fn.toUpperCase()}(${expr.args.map((arg) => renderExpr(arg, contract, pim)).join(\", \")}) OVER (${[expr.partitionBy && expr.partitionBy.length > 0 ? `PARTITION BY ${expr.partitionBy.map((e) => renderExpr(e, contract, pim)).join(\", \")}` : \"\", expr.orderBy && expr.orderBy.length > 0 ? `ORDER BY ${renderOrderByItems(expr.orderBy, contract, pim)}` : \"\"].filter((part) => part.length > 0).join(\" \")})`;\n}\nfunction renderFunctionCallExpr(expr, contract, pim) {\n\tconst args = expr.args.map((arg) => renderExpr(arg, contract, pim)).join(\", \");\n\treturn `${expr.fn}(${args})`;\n}\nfunction renderCastExpr(expr, contract, pim) {\n\treturn `CAST(${renderExpr(expr.expr, contract, pim)} AS ${expr.targetType})`;\n}\nfunction renderCaseExpr(expr, contract, pim) {\n\treturn `CASE ${expr.branches.map((branch) => `WHEN ${renderExpr(branch.condition, contract, pim)} THEN ${renderExpr(branch.value, contract, pim)}`).join(\" \")}${expr.elseExpr === void 0 ? \"\" : ` ELSE ${renderExpr(expr.elseExpr, contract, pim)}`} END`;\n}\nfunction renderJsonValueProjection(projection, contract, pim) {\n\treturn projection.accept({\n\t\tcodec: ({ value, codec }) => renderExpr(projectJsonThroughCodec(value, codec, pim), contract, pim),\n\t\tnative: ({ value }) => renderExpr(value, contract, pim),\n\t\tdocument: ({ value }) => renderExpr(value, contract, pim)\n\t});\n}\nfunction projectJsonThroughCodec(value, codec, pim) {\n\tconst descriptor = pim.codecDescriptorRegistry.descriptorFor(codec.codecId);\n\tif (descriptor === void 0) throw adapterError(\"RUNTIME.PARAM_REF_MISSING_CODEC\", `Postgres lowering: a JSON projection carries codecId \"${codec.codecId}\" but the validated PostgreSQL codec registry has no entry for it. This usually indicates a missing extension pack in the runtime stack — register the pack that contributes this codec (e.g. \\`extensions: [pgvectorRuntime]\\`), or use the codec directly from \\`@internal/target-postgres/codecs\\` if it's a builtin.`, { meta: { codecId: codec.codecId } });\n\treturn descriptor.projectJson(value, codec);\n}\nfunction renderJsonObjectExpr(expr, contract, pim) {\n\treturn `json_build_object(${expr.entries.flatMap((entry) => {\n\t\treturn [`'${escapeLiteral(entry.key)}'`, renderJsonValueProjection(entry.value, contract, pim)];\n\t}).join(\", \")})`;\n}\nfunction renderOrderByItems(items, contract, pim) {\n\treturn items.map((item) => `${renderExpr(item.expr, contract, pim)} ${item.dir.toUpperCase()}`).join(\", \");\n}\nfunction renderJsonArrayAggExpr(expr, contract, pim) {\n\tconst aggregateOrderBy = expr.orderBy && expr.orderBy.length > 0 ? ` ORDER BY ${renderOrderByItems(expr.orderBy, contract, pim)}` : \"\";\n\tconst aggregated = `json_agg(${renderJsonValueProjection(expr.expr, contract, pim)}${aggregateOrderBy})`;\n\tif (expr.onEmpty === \"emptyArray\") return `coalesce(${aggregated}, json_build_array())`;\n\treturn aggregated;\n}\nfunction renderExpr(expr, contract, pim) {\n\tconst node = expr;\n\tswitch (node.kind) {\n\t\tcase \"column-ref\": return renderColumn(node);\n\t\tcase \"identifier-ref\": return quoteIdentifier(node.name);\n\t\tcase \"operation\": return renderOperation(node, contract, pim);\n\t\tcase \"subquery\": return renderSubqueryExpr(node, contract, pim);\n\t\tcase \"aggregate\": return renderAggregateExpr(node, contract, pim);\n\t\tcase \"window-func\": return renderWindowFuncExpr(node, contract, pim);\n\t\tcase \"function-call\": return renderFunctionCallExpr(node, contract, pim);\n\t\tcase \"cast\": return renderCastExpr(node, contract, pim);\n\t\tcase \"case\": return renderCaseExpr(node, contract, pim);\n\t\tcase \"json-object\": return renderJsonObjectExpr(node, contract, pim);\n\t\tcase \"json-array-agg\": return renderJsonArrayAggExpr(node, contract, pim);\n\t\tcase \"binary\": return renderBinary(node, contract, pim);\n\t\tcase \"and\":\n\t\t\tif (node.exprs.length === 0) return \"TRUE\";\n\t\t\treturn `(${node.exprs.map((part) => renderExpr(part, contract, pim)).join(\" AND \")})`;\n\t\tcase \"or\":\n\t\t\tif (node.exprs.length === 0) return \"FALSE\";\n\t\t\treturn `(${node.exprs.map((part) => renderExpr(part, contract, pim)).join(\" OR \")})`;\n\t\tcase \"exists\": return `${node.notExists ? \"NOT \" : \"\"}EXISTS (${renderSelect(node.subquery, contract, pim)})`;\n\t\tcase \"null-check\": return renderNullCheck(node, contract, pim);\n\t\tcase \"not\": return `NOT (${renderExpr(node.expr, contract, pim)})`;\n\t\tcase \"param-ref\":\n\t\tcase \"prepared-param-ref\": return renderParamRef(node, pim);\n\t\tcase \"literal\": return renderLiteral(node);\n\t\tcase \"list\": return renderListLiteral(node, contract, pim);\n\t\tcase \"raw-expr\": return renderRawExpr(node, contract, pim);\n\t\t// v8 ignore next 4\n\t\tdefault: assertNever(node, `Unsupported expression node kind: ${unreachableKind(node)}`);\n\t}\n}\nfunction renderParamRef(ref, pim) {\n\tconst index = pim.indexMap.get(ref);\n\tif (index === void 0) throw new InternalError(\"ParamRef not found in index map\");\n\tif (ref.kind === \"prepared-param-ref\") return renderTypedParam(index, ref.codec.codecId, pim.codecDescriptorRegistry, ref.codec.many, ref.codec.typeParams);\n\tif (ref.codec === void 0) throw runtimeError(\"RUNTIME.PARAM_REF_MISSING_CODEC\", \"Postgres renderer: ParamRef reached lowering without a bound CodecRef. Every column-bound ParamRef must carry a codec under the AST-bound codec contract. This usually indicates a builder path that constructed a ParamRef without threading the column codec.\", {\n\t\tparamIndex: index,\n\t\t...ifDefined(\"name\", ref.name)\n\t});\n\treturn renderTypedParam(index, ref.codec.codecId, pim.codecDescriptorRegistry, ref.codec.many, ref.codec.typeParams);\n}\nfunction renderLiteral(expr) {\n\tif (typeof expr.value === \"string\") return `'${escapeLiteral(expr.value)}'`;\n\tif (typeof expr.value === \"number\" || typeof expr.value === \"boolean\") return String(expr.value);\n\tif (typeof expr.value === \"bigint\") return String(expr.value);\n\tif (expr.value === null) return \"NULL\";\n\tif (expr.value === void 0) return \"NULL\";\n\tif (expr.value instanceof Date) return `'${escapeLiteral(expr.value.toISOString())}'`;\n\tif (Array.isArray(expr.value)) return `ARRAY[${expr.value.map((v) => renderLiteral(new LiteralExpr(v))).join(\", \")}]`;\n\tconst json = JSON.stringify(expr.value);\n\tif (json === void 0) return \"NULL\";\n\treturn `'${escapeLiteral(json)}'`;\n}\nfunction renderOperation(expr, contract, pim) {\n\tconst self = renderExpr(expr.self, contract, pim);\n\tconst args = expr.args.map((arg) => {\n\t\treturn renderExpr(arg, contract, pim);\n\t});\n\treturn expr.lowering.template.replace(/\\{\\{self\\}\\}|\\{\\{arg(\\d+)\\}\\}/g, (token, argIndex) => {\n\t\tif (token === \"{{self}}\") return self;\n\t\tconst arg = args[Number(argIndex)];\n\t\tif (arg === void 0) throw adapterError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Operation lowering template for \"${expr.method}\" referenced missing argument {{arg${argIndex}}}; template has ${args.length} arg(s)`, { meta: { method: expr.method } });\n\t\treturn arg;\n\t});\n}\nfunction renderJoin(join, contract, pim) {\n\treturn `${join.joinType.toUpperCase()} JOIN ${join.lateral ? \"LATERAL \" : \"\"}${renderSource(join.source, contract, pim)} ON ${renderJoinOn(join.on, contract, pim)}`;\n}\nfunction renderJoinOn(on, contract, pim) {\n\tif (on.kind === \"eq-col-join-on\") return `${renderColumn(on.left)} = ${renderColumn(on.right)}`;\n\treturn renderWhere(on, contract, pim);\n}\nfunction getInsertColumnOrder(rows, contract, tableRef) {\n\tconst tableName = tableRef.name;\n\tconst orderedColumns = [];\n\tconst seenColumns = /* @__PURE__ */ new Set();\n\tfor (const row of rows) for (const column of Object.keys(row)) {\n\t\tif (seenColumns.has(column)) continue;\n\t\tseenColumns.add(column);\n\t\torderedColumns.push(column);\n\t}\n\tif (orderedColumns.length > 0) return orderedColumns;\n\tlet table;\n\tif (tableRef.namespaceId !== void 0) {\n\t\tconst ns = contract.storage.namespaces[tableRef.namespaceId];\n\t\ttable = ns !== void 0 ? ns.entries.table?.[tableName] : void 0;\n\t}\n\tif (table === void 0) for (const ns of Object.values(contract.storage.namespaces)) {\n\t\tconst found = ns.entries.table?.[tableName];\n\t\tif (found !== void 0) {\n\t\t\ttable = found;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif (!table) throw adapterError(\"RUNTIME.AST_INVALID\", `INSERT target table not found in contract storage: ${tableName}`, { meta: {\n\t\tnode: \"insert\",\n\t\ttable: tableName\n\t} });\n\treturn Object.keys(table.columns);\n}\nfunction renderInsertValue(value, contract, pim) {\n\tif (!value || value.kind === \"default-value\") return \"DEFAULT\";\n\tswitch (value.kind) {\n\t\tcase \"param-ref\":\n\t\tcase \"prepared-param-ref\": return renderParamRef(value, pim);\n\t\tcase \"column-ref\": return renderColumn(value);\n\t\tcase \"raw-expr\": return renderExpr(value, contract, pim);\n\t\t// v8 ignore next 4\n\t\tdefault: assertNever(value, `Unsupported value node in INSERT: ${unreachableKind(value)}`);\n\t}\n}\nfunction renderInsert(ast, contract, pim) {\n\tconst table = qualifyTableFromNamespaceCoordinate(ast.table, contract);\n\tconst rows = ast.rows;\n\tif (rows.length === 0) throw adapterError(\"RUNTIME.AST_INVALID\", \"INSERT requires at least one row\", { meta: { node: \"insert\" } });\n\tconst hasExplicitValues = rows.some((row) => Object.keys(row).length > 0);\n\treturn `${(() => {\n\t\tif (!hasExplicitValues) {\n\t\t\tif (rows.length === 1) return `INSERT INTO ${table} DEFAULT VALUES`;\n\t\t\tconst defaultColumns = getInsertColumnOrder(rows, contract, ast.table);\n\t\t\tif (defaultColumns.length === 0) return `INSERT INTO ${table} VALUES ${rows.map(() => \"()\").join(\", \")}`;\n\t\t\tconst quotedColumns = defaultColumns.map((column) => quoteIdentifier(column));\n\t\t\tconst defaultRow = `(${defaultColumns.map(() => \"DEFAULT\").join(\", \")})`;\n\t\t\treturn `INSERT INTO ${table} (${quotedColumns.join(\", \")}) VALUES ${rows.map(() => defaultRow).join(\", \")}`;\n\t\t}\n\t\tconst columnOrder = getInsertColumnOrder(rows, contract, ast.table);\n\t\tconst columns = columnOrder.map((column) => quoteIdentifier(column));\n\t\tconst values = rows.map((row) => {\n\t\t\treturn `(${columnOrder.map((column) => renderInsertValue(row[column], contract, pim)).join(\", \")})`;\n\t\t}).join(\", \");\n\t\treturn `INSERT INTO ${table} (${columns.join(\", \")}) VALUES ${values}`;\n\t})()}${ast.onConflict ? (() => {\n\t\tconst conflictColumns = ast.onConflict.columns.map((col) => quoteIdentifier(col.column));\n\t\tif (conflictColumns.length === 0) throw adapterError(\"RUNTIME.AST_INVALID\", \"INSERT onConflict requires at least one conflict column\", { meta: { node: \"insert-on-conflict\" } });\n\t\tconst action = ast.onConflict.action;\n\t\tswitch (action.kind) {\n\t\t\tcase \"do-nothing\": return ` ON CONFLICT (${conflictColumns.join(\", \")}) DO NOTHING`;\n\t\t\tcase \"do-update-set\": {\n\t\t\t\tconst updateEntries = Object.entries(action.set);\n\t\t\t\tif (updateEntries.length === 0) throw adapterError(\"RUNTIME.AST_INVALID\", \"INSERT onConflict do-update-set requires at least one assignment\", { meta: { node: \"insert-on-conflict\" } });\n\t\t\t\tconst updates = updateEntries.map(([colName, value]) => {\n\t\t\t\t\treturn `${quoteIdentifier(colName)} = ${renderExpr(value, contract, pim)}`;\n\t\t\t\t});\n\t\t\t\treturn ` ON CONFLICT (${conflictColumns.join(\", \")}) DO UPDATE SET ${updates.join(\", \")}`;\n\t\t\t}\n\t\t\t// v8 ignore next 4\n\t\t\tdefault: assertNever(action, `Unsupported onConflict action: ${unreachableKind(action)}`);\n\t\t}\n\t})() : \"\"}${ast.returning?.length ? ` RETURNING ${renderReturning(ast.returning, contract, pim)}` : \"\"}`;\n}\nfunction renderUpdate(ast, contract, pim) {\n\tconst table = qualifyTableFromNamespaceCoordinate(ast.table, contract);\n\tconst setEntries = Object.entries(ast.set);\n\tif (setEntries.length === 0) throw adapterError(\"RUNTIME.AST_INVALID\", \"UPDATE requires at least one SET assignment\", { meta: { node: \"update\" } });\n\tconst setClauses = setEntries.map(([col, val]) => {\n\t\treturn `${quoteIdentifier(col)} = ${renderExpr(val, contract, pim)}`;\n\t});\n\tconst whereClause = ast.where ? ` WHERE ${renderWhere(ast.where, contract, pim)}` : \"\";\n\tconst returningClause = ast.returning?.length ? ` RETURNING ${renderReturning(ast.returning, contract, pim)}` : \"\";\n\treturn `UPDATE ${table} SET ${setClauses.join(\", \")}${whereClause}${returningClause}`;\n}\nfunction renderDelete(ast, contract, pim) {\n\treturn `DELETE FROM ${qualifyTableFromNamespaceCoordinate(ast.table, contract)}${ast.where ? ` WHERE ${renderWhere(ast.where, contract, pim)}` : \"\"}${ast.returning?.length ? ` RETURNING ${renderReturning(ast.returning, contract, pim)}` : \"\"}`;\n}\nfunction renderRawSql(ast, contract, pim) {\n\tconst out = [];\n\tfor (let i = 0; i < ast.fragments.length; i++) {\n\t\tout.push(ast.fragments[i] ?? \"\");\n\t\tif (i < ast.args.length) {\n\t\t\tconst arg = ast.args[i];\n\t\t\tif (arg !== void 0) out.push(renderExpr(arg, contract, pim));\n\t\t}\n\t}\n\treturn out.join(\"\");\n}\nfunction renderRawExpr(node, contract, pim) {\n\treturn node.parts.map((part) => typeof part === \"string\" ? part : renderExpr(part, contract, pim)).join(\"\");\n}\n//#endregion\nexport { adapterError as n, renderLoweredSql as t };\n\n//# sourceMappingURL=sql-renderer-CZE98P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AAQ,KAAK;EAC9C,IAAI,KAAK,IAAI,UAAU,MAAM,EAAE;EAC/B,IAAI,IAAI,IAAI,KAAK,QAAQ;GACxB,MAAM,MAAM,IAAI,KAAK;GACrB,IAAI,QAAQ,KAAK,GAAG,IAAI,KAAK,WAAW,KAAK,UAAU,GAAG,CAAC;EAC5D;CACD;CACA,OAAO,IAAI,KAAK,EAAE;AACnB;AACA,SAAS,cAAc,MAAM,UAAU,KAAK;CAC3C,OAAO,KAAK,MAAM,KAAK,SAAS,OAAO,SAAS,WAAW,OAAO,WAAW,MAAM,UAAU,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE;AAC3G"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { i as PostgresCodecDescriptorRegistry } from "./codec-descriptor-Bec_zukr-BfvtUqhm.mjs";
|
|
2
|
+
import "./codec-descriptor-Bg-_412t.mjs";
|
|
3
|
+
import { t as PostgresContract } from "./postgres-schema-Xsjt3RKO-Buv2X8ai.mjs";
|
|
4
|
+
import "./types-CkryN1AS-6MNZLjLY.mjs";
|
|
5
|
+
import { AnyQueryAst, LoweredParam } from "@prisma/orm-family-sql/relational-core/ast";
|
|
6
|
+
//#region ../../../3-targets/6-adapters/postgres/dist/sql-renderer.d.mts
|
|
7
|
+
//#region src/core/sql-renderer.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* Render a SQL query AST to a Postgres-flavored `{ sql, params }` payload.
|
|
10
|
+
*
|
|
11
|
+
* Shared between the runtime (`PostgresAdapterImpl.lower`) and control (`PostgresControlAdapter.lower`) entrypoints so emit-time and run-time paths produce byte-identical output for the same AST.
|
|
12
|
+
*/
|
|
13
|
+
declare function renderLoweredSql(ast: AnyQueryAst, contract: PostgresContract, codecDescriptorRegistry: PostgresCodecDescriptorRegistry): {
|
|
14
|
+
readonly sql: string;
|
|
15
|
+
readonly params: readonly LoweredParam[];
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
export { renderLoweredSql as t };
|
|
19
|
+
//# sourceMappingURL=sql-renderer-Cyls5Xy4.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sql-renderer-Cyls5Xy4.d.mts","names":[],"sources":["../../../../3-targets/6-adapters/postgres/dist/sql-renderer.d.mts"],"mappings":";;;;;;;;;;;;iBASiB,iBAAiB,KAAK,aAAa,UAAU,kBAAkB,yBAAyB;WAC9F;WACA,iBAAiB"}
|
package/dist/target.d.mts
CHANGED
|
@@ -13,6 +13,7 @@ import "./ddl-B4Rh8ntj.mjs";
|
|
|
13
13
|
import { n as postgresResolveDefault, t as parsePostgresDefault } from "./default-normalizer-B36TOul4.mjs";
|
|
14
14
|
import { t as normalizeSchemaNativeType } from "./native-type-normalizer-DqJlOTeX.mjs";
|
|
15
15
|
import { a as validateEnumValueLength, i as quoteQualifiedName, n as qualifyName, r as quoteIdentifier, t as escapeLiteral } from "./sql-utils-DW6fkczF.mjs";
|
|
16
|
+
import { t as postgresAggregateDescriptors } from "./aggregates-CgqNfj2O.mjs";
|
|
16
17
|
import { A as SQL_INT_CODEC_ID, C as PG_TIMETZ_CODEC_ID, D as PG_VARCHAR_CODEC_ID, E as PG_VARBIT_CODEC_ID, M as SQL_TIMESTAMP_CODEC_ID, N as SQL_VARCHAR_CODEC_ID, O as SQL_CHAR_CODEC_ID, S as PG_TIMESTAMP_CODEC_ID, T as PG_UUID_CODEC_ID, _ as PG_JSON_CODEC_ID, a as PG_DATE_CODEC_ID, b as PG_TEXT_CODEC_ID, c as PG_FLOAT8_CODEC_ID, d as PG_INT2_CODEC_ID, f as PG_INT4_CODEC_ID, g as PG_JSONB_CODEC_ID, h as PG_INT_CODEC_ID, i as PG_CHAR_CODEC_ID, j as SQL_TEXT_CODEC_ID, k as SQL_FLOAT_CODEC_ID, l as PG_FLOAT_CODEC_ID, m as PG_INTERVAL_CODEC_ID, n as PG_BOOL_CODEC_ID, o as PG_ENUM_CODEC_ID, p as PG_INT8_CODEC_ID, r as PG_BYTEA_CODEC_ID, s as PG_FLOAT4_CODEC_ID, t as PG_BIT_CODEC_ID, u as PG_INET_CODEC_ID, v as PG_NUMERIC_CODEC_ID, w as PG_TIME_CODEC_ID, x as PG_TIMESTAMPTZ_CODEC_ID, y as PG_TEXT_ARRAY_CODEC_ID } from "./codec-ids-CsOU3xDv-mPI0INiF.mjs";
|
|
17
18
|
import "./codec-ids-fgafMLR7.mjs";
|
|
18
19
|
import { $ as pgUuidColumn, A as isPgEnumParams, B as pgInt2Column, C as PgTimeDescriptor, D as PgUuidDescriptor, E as PgTimetzDescriptor, F as pgEnumDescriptor, G as pgJsonColumn, H as pgInt8Column, I as pgFloat4Column, J as pgTextColumn, K as pgJsonbColumn, L as pgFloat8Column, M as pgBoolColumn, N as pgCharColumn, O as PgVarbitDescriptor, P as pgDateColumn, Q as pgTimetzColumn, R as pgFloatColumn, S as PgTextDescriptor, T as PgTimestamptzDescriptor, U as pgIntColumn, V as pgInt4Column, W as pgIntervalColumn, X as pgTimestampColumn, Y as pgTimeColumn, Z as pgTimestamptzColumn, _ as PgInterval, a as PgDateDescriptor, b as PgJsonbDescriptor, c as PgEnumParams, d as PgFloatDescriptor, et as pgVarbitColumn, f as PgInetDescriptor, g as PgIntDescriptor, h as PgInt8Descriptor, i as PgCharDescriptor, j as pgBitColumn, k as PgVarcharDescriptor, l as PgFloat4Descriptor, m as PgInt4Descriptor, n as PgBoolDescriptor, o as PgEnumCodec, p as PgInt2Descriptor, q as pgNumericColumn, s as PgEnumDescriptor, t as PgBitDescriptor, tt as pgVarcharColumn, u as PgFloat8Descriptor, v as PgIntervalDescriptor, w as PgTimestampDescriptor, x as PgNumericDescriptor, y as PgJsonDescriptor, z as pgInetColumn } from "./codecs-Cvqvb9pV-Cdc51FKY.mjs";
|
|
@@ -44,4 +45,4 @@ import { t as renderOps } from "./render-ops-DPwhZt2W.mjs";
|
|
|
44
45
|
import { t as renderCallsToTypeScript } from "./render-typescript-6sCFvMBh.mjs";
|
|
45
46
|
import { n as PostgresRuntimeTargetInstance, t as PostgresContractSerializer } from "./runtime-_TfO66h5.mjs";
|
|
46
47
|
import { t as resolveDdlSchemaForNamespaceStorage } from "./schema-ir-annotations-DuuYh0gl.mjs";
|
|
47
|
-
export { type AdaptedPostgresCodecDescriptor, AddCheckConstraintCall, AddColumnAction, AddColumnCall, AddForeignKeyCall, AddNativeEnumValueCall, AddNotNullColumnWithTempDefaultCall, AddPrimaryKeyCall, AddUniqueCall, AlterColumnTypeCall, type AlterTableActionVisitor, type AnyAlterTableAction, type AnyPostgresCodecDescriptor, type AnyPostgresDdlNode, Bit, Char, CodecTypes, type ColumnDefaultCheckBuilder, type ColumnExistsCheckBuilder, type ConstraintExistsCheckBuilder, type ContentHashParts, CreateExtensionCall, CreateIndexCall, CreateNativeEnumTypeCall, CreatePostgresRlsPolicyCall, CreateSchemaCall, CreateTableCall, DataTransformCall, type DataTransformClosure, type DataTransformOptions, type DdlIndexElements, DisableRowLevelSecurityCall, DropCheckConstraintCall, DropColumnCall, DropConstraintCall, DropDefaultAction, DropDefaultCall, DropIndexCall, DropNativeEnumTypeCall, DropNotNullCall, DropPostgresRlsPolicyCall, DropTableCall, EnableRowLevelSecurityCall, type ExtensionExistsCheckBuilder, type IndexExistsCheckBuilder, Interval, type JsonValue$1 as JsonValue, PostgresMigration as Migration, MigrationCLI, Numeric, PG_BIT_CODEC_ID, PG_BOOL_CODEC_ID, PG_BYTEA_CODEC_ID, PG_CHAR_CODEC_ID, PG_DATE_CODEC_ID, PG_ENUM_CODEC_ID, PG_FLOAT4_CODEC_ID, PG_FLOAT8_CODEC_ID, PG_FLOAT_CODEC_ID, PG_INET_CODEC_ID, PG_INT2_CODEC_ID, PG_INT4_CODEC_ID, PG_INT8_CODEC_ID, PG_INTERVAL_CODEC_ID, PG_INT_CODEC_ID, PG_JSONB_CODEC_ID, PG_JSON_CODEC_ID, PG_NUMERIC_CODEC_ID, PG_TEXT_ARRAY_CODEC_ID, PG_TEXT_CODEC_ID, PG_TIMESTAMPTZ_CODEC_ID, PG_TIMESTAMP_CODEC_ID, PG_TIMETZ_CODEC_ID, PG_TIME_CODEC_ID, PG_UUID_CODEC_ID, PG_VARBIT_CODEC_ID, PG_VARCHAR_CODEC_ID, POLICY_OPERATION_PREDICATES, type PgBitDescriptor, type PgBoolDescriptor, type PgCharDescriptor, type PgDateDescriptor, type PgEnumCodec, type PgEnumDescriptor, type PgEnumParams, type PgFloat4Descriptor, type PgFloat8Descriptor, type PgFloatDescriptor, type PgInetDescriptor, type PgInt2Descriptor, type PgInt4Descriptor, type PgInt8Descriptor, type PgIntDescriptor, type PgInterval, type PgIntervalDescriptor, type PgJsonDescriptor, type PgJsonbDescriptor, type PgNumericDescriptor, type PgTextDescriptor, type PgTimeDescriptor, type PgTimestampDescriptor, type PgTimestamptzDescriptor, type PgTimetzDescriptor, type PgUuidDescriptor, type PgVarbitDescriptor, type PgVarcharDescriptor, PostgresAlterIndexRename, PostgresAlterPolicyRename, PostgresAlterTable, PostgresCodecDescriptor, type PostgresCodecDescriptorRegistry, type PostgresCodecOptions, type PostgresColumnDefault, type PostgresContract, PostgresContractSerializer, PostgresContractView, PostgresCreateIndex, PostgresCreatePolicy, PostgresCreateSchema, PostgresCreateTable, PostgresCreateType, PostgresDatabaseSchemaNode, type PostgresDatabaseSchemaNodeInput, PostgresDdlNode, type PostgresDdlVisitor, PostgresDisableRowLevelSecurity, PostgresDropIndex, PostgresDropPolicy, PostgresDropType, PostgresNamespaceSchemaNode, type PostgresNamespaceSchemaNodeInput, PostgresNativeEnum, type PostgresNativeEnumInput, PostgresNativeEnumSchemaNode, type PostgresNativeEnumSchemaNodeInput, type PostgresPlanTargetDetails, PostgresPolicySchemaNode, type PostgresPolicySchemaNodeInput, PostgresRlsEnablement, type PostgresRlsEnablementInput, PostgresRlsPolicy, type PostgresRlsPolicyInput, PostgresRole, type PostgresRoleInput, PostgresRoleSchemaNode, type PostgresRoleSchemaNodeInput, PostgresRuntimeTargetInstance, PostgresSchema, PostgresSchemaNodeKind, PostgresTableSchemaNode, type PostgresTableSchemaNodeInput, PostgresTableSource, PostgresUnboundSchema, RawSqlCall, RenameIndexCall, RenamePostgresRlsPolicyCall, type RenderedRlsPolicyLiteral, type RlsEnabledCheckBuilder, type RlsPolicyExistsCheckBuilder, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_TIMESTAMP_CODEC_ID, SQL_VARCHAR_CODEC_ID, type SerializedRlsPolicy, SetDefaultCall, SetNotNullCall, type TableExistsCheckBuilder, type TablePrimaryKeyCheckBuilder, Time, Timestamp, Timestamptz, Timetz, TypeScriptRenderablePostgresMigration, VarBit, Varchar, addColumnAction, alterTable, buildBuiltinIdentityValue, buildColumnDefaultSql, buildColumnTypeSql, buildControlTableBootstrapQueries, buildExpectedFormatType, buildPostgresCodecDescriptorRegistry, buildPostgresPlanDiff, buildSchemaLookupMap, buildSignMarkerBootstrapQueries, checkExpression, coalesceSubtreeIssues, col, columnDefaultAst, columnExistsAst, columnNullabilityAst, columnTypeAst, computeContentHash, constraintExistsAst, contractToPostgresDatabaseSchemaNode, createExtension, createPostgresMigrationPlanner, createSchema, createTable, dataTransform, definePostgresCodecs, dropDefaultAction, errorPostgresMigrationStackMissing, escapeLiteral, extensionExistsAst, fn, foreignKey, hasForeignKey, hasIndex, hasUniqueConstraint, indexExistsAst, int4, int8, isPgEnumParams, isPostgresCodecDescriptor, isPostgresSchema, jsonb, lit, noNullValuesAst, normalizeSchemaNativeType, parsePostgresDefault, pgBitColumn, pgBoolColumn, pgCharColumn, pgDateColumn, pgEnumDescriptor, pgFloat4Column, pgFloat8Column, pgFloatColumn, pgInetColumn, pgInt2Column, pgInt4Column, pgInt8Column, pgIntColumn, pgIntervalColumn, pgJsonColumn, pgJsonbColumn, pgNumericColumn, pgTable, pgTextColumn, pgTimeColumn, pgTimestampColumn, pgTimestamptzColumn, pgTimetzColumn, pgUuidColumn, pgVarbitColumn, pgVarcharColumn, placeholder, planIssues, policyInputFromSerialized, postgresCodec, postgresCodecDescriptorRegistry, postgresCodecRegistry, postgresCreateNamespace, postgresError, postgresRenderDefault, postgresResolveDefault, primaryKey, qualifyName, qualifyTableName, quoteIdentifier, quoteQualifiedName, rawSql, renderCallsToTypeScript, renderDefaultLiteral, renderOps, resolveDdlSchemaForNamespaceStorage, resolveIdentityValue, rlsEnabledAst, rlsPolicyExistsAst, tableExistsAst, tableIsEmptyAst, tablePrimaryKeyAst, text, textArray, timestamptz, toRegclass, unique, validateEnumValueLength };
|
|
48
|
+
export { type AdaptedPostgresCodecDescriptor, AddCheckConstraintCall, AddColumnAction, AddColumnCall, AddForeignKeyCall, AddNativeEnumValueCall, AddNotNullColumnWithTempDefaultCall, AddPrimaryKeyCall, AddUniqueCall, AlterColumnTypeCall, type AlterTableActionVisitor, type AnyAlterTableAction, type AnyPostgresCodecDescriptor, type AnyPostgresDdlNode, Bit, Char, CodecTypes, type ColumnDefaultCheckBuilder, type ColumnExistsCheckBuilder, type ConstraintExistsCheckBuilder, type ContentHashParts, CreateExtensionCall, CreateIndexCall, CreateNativeEnumTypeCall, CreatePostgresRlsPolicyCall, CreateSchemaCall, CreateTableCall, DataTransformCall, type DataTransformClosure, type DataTransformOptions, type DdlIndexElements, DisableRowLevelSecurityCall, DropCheckConstraintCall, DropColumnCall, DropConstraintCall, DropDefaultAction, DropDefaultCall, DropIndexCall, DropNativeEnumTypeCall, DropNotNullCall, DropPostgresRlsPolicyCall, DropTableCall, EnableRowLevelSecurityCall, type ExtensionExistsCheckBuilder, type IndexExistsCheckBuilder, Interval, type JsonValue$1 as JsonValue, PostgresMigration as Migration, MigrationCLI, Numeric, PG_BIT_CODEC_ID, PG_BOOL_CODEC_ID, PG_BYTEA_CODEC_ID, PG_CHAR_CODEC_ID, PG_DATE_CODEC_ID, PG_ENUM_CODEC_ID, PG_FLOAT4_CODEC_ID, PG_FLOAT8_CODEC_ID, PG_FLOAT_CODEC_ID, PG_INET_CODEC_ID, PG_INT2_CODEC_ID, PG_INT4_CODEC_ID, PG_INT8_CODEC_ID, PG_INTERVAL_CODEC_ID, PG_INT_CODEC_ID, PG_JSONB_CODEC_ID, PG_JSON_CODEC_ID, PG_NUMERIC_CODEC_ID, PG_TEXT_ARRAY_CODEC_ID, PG_TEXT_CODEC_ID, PG_TIMESTAMPTZ_CODEC_ID, PG_TIMESTAMP_CODEC_ID, PG_TIMETZ_CODEC_ID, PG_TIME_CODEC_ID, PG_UUID_CODEC_ID, PG_VARBIT_CODEC_ID, PG_VARCHAR_CODEC_ID, POLICY_OPERATION_PREDICATES, type PgBitDescriptor, type PgBoolDescriptor, type PgCharDescriptor, type PgDateDescriptor, type PgEnumCodec, type PgEnumDescriptor, type PgEnumParams, type PgFloat4Descriptor, type PgFloat8Descriptor, type PgFloatDescriptor, type PgInetDescriptor, type PgInt2Descriptor, type PgInt4Descriptor, type PgInt8Descriptor, type PgIntDescriptor, type PgInterval, type PgIntervalDescriptor, type PgJsonDescriptor, type PgJsonbDescriptor, type PgNumericDescriptor, type PgTextDescriptor, type PgTimeDescriptor, type PgTimestampDescriptor, type PgTimestamptzDescriptor, type PgTimetzDescriptor, type PgUuidDescriptor, type PgVarbitDescriptor, type PgVarcharDescriptor, PostgresAlterIndexRename, PostgresAlterPolicyRename, PostgresAlterTable, PostgresCodecDescriptor, type PostgresCodecDescriptorRegistry, type PostgresCodecOptions, type PostgresColumnDefault, type PostgresContract, PostgresContractSerializer, PostgresContractView, PostgresCreateIndex, PostgresCreatePolicy, PostgresCreateSchema, PostgresCreateTable, PostgresCreateType, PostgresDatabaseSchemaNode, type PostgresDatabaseSchemaNodeInput, PostgresDdlNode, type PostgresDdlVisitor, PostgresDisableRowLevelSecurity, PostgresDropIndex, PostgresDropPolicy, PostgresDropType, PostgresNamespaceSchemaNode, type PostgresNamespaceSchemaNodeInput, PostgresNativeEnum, type PostgresNativeEnumInput, PostgresNativeEnumSchemaNode, type PostgresNativeEnumSchemaNodeInput, type PostgresPlanTargetDetails, PostgresPolicySchemaNode, type PostgresPolicySchemaNodeInput, PostgresRlsEnablement, type PostgresRlsEnablementInput, PostgresRlsPolicy, type PostgresRlsPolicyInput, PostgresRole, type PostgresRoleInput, PostgresRoleSchemaNode, type PostgresRoleSchemaNodeInput, PostgresRuntimeTargetInstance, PostgresSchema, PostgresSchemaNodeKind, PostgresTableSchemaNode, type PostgresTableSchemaNodeInput, PostgresTableSource, PostgresUnboundSchema, RawSqlCall, RenameIndexCall, RenamePostgresRlsPolicyCall, type RenderedRlsPolicyLiteral, type RlsEnabledCheckBuilder, type RlsPolicyExistsCheckBuilder, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_TIMESTAMP_CODEC_ID, SQL_VARCHAR_CODEC_ID, type SerializedRlsPolicy, SetDefaultCall, SetNotNullCall, type TableExistsCheckBuilder, type TablePrimaryKeyCheckBuilder, Time, Timestamp, Timestamptz, Timetz, TypeScriptRenderablePostgresMigration, VarBit, Varchar, addColumnAction, alterTable, buildBuiltinIdentityValue, buildColumnDefaultSql, buildColumnTypeSql, buildControlTableBootstrapQueries, buildExpectedFormatType, buildPostgresCodecDescriptorRegistry, buildPostgresPlanDiff, buildSchemaLookupMap, buildSignMarkerBootstrapQueries, checkExpression, coalesceSubtreeIssues, col, columnDefaultAst, columnExistsAst, columnNullabilityAst, columnTypeAst, computeContentHash, constraintExistsAst, contractToPostgresDatabaseSchemaNode, createExtension, createPostgresMigrationPlanner, createSchema, createTable, dataTransform, definePostgresCodecs, dropDefaultAction, errorPostgresMigrationStackMissing, escapeLiteral, extensionExistsAst, fn, foreignKey, hasForeignKey, hasIndex, hasUniqueConstraint, indexExistsAst, int4, int8, isPgEnumParams, isPostgresCodecDescriptor, isPostgresSchema, jsonb, lit, noNullValuesAst, normalizeSchemaNativeType, parsePostgresDefault, pgBitColumn, pgBoolColumn, pgCharColumn, pgDateColumn, pgEnumDescriptor, pgFloat4Column, pgFloat8Column, pgFloatColumn, pgInetColumn, pgInt2Column, pgInt4Column, pgInt8Column, pgIntColumn, pgIntervalColumn, pgJsonColumn, pgJsonbColumn, pgNumericColumn, pgTable, pgTextColumn, pgTimeColumn, pgTimestampColumn, pgTimestamptzColumn, pgTimetzColumn, pgUuidColumn, pgVarbitColumn, pgVarcharColumn, placeholder, planIssues, policyInputFromSerialized, postgresAggregateDescriptors, postgresCodec, postgresCodecDescriptorRegistry, postgresCodecRegistry, postgresCreateNamespace, postgresError, postgresRenderDefault, postgresResolveDefault, primaryKey, qualifyName, qualifyTableName, quoteIdentifier, quoteQualifiedName, rawSql, renderCallsToTypeScript, renderDefaultLiteral, renderOps, resolveDdlSchemaForNamespaceStorage, resolveIdentityValue, rlsEnabledAst, rlsPolicyExistsAst, tableExistsAst, tableIsEmptyAst, tablePrimaryKeyAst, text, textArray, timestamptz, toRegclass, unique, validateEnumValueLength };
|
package/dist/target.mjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { a as postgresCodec, i as isPostgresCodecDescriptor, n as buildPostgresCodecDescriptorRegistry, r as definePostgresCodecs, t as PostgresCodecDescriptor } from "./codec-descriptor-CB6x0xEu-C-Zn2IEz.mjs";
|
|
2
1
|
import { A as SQL_INT_CODEC_ID, C as PG_TIMETZ_CODEC_ID, D as PG_VARCHAR_CODEC_ID, E as PG_VARBIT_CODEC_ID, M as SQL_TIMESTAMP_CODEC_ID, N as SQL_VARCHAR_CODEC_ID, O as SQL_CHAR_CODEC_ID, S as PG_TIMESTAMP_CODEC_ID, T as PG_UUID_CODEC_ID, _ as PG_JSON_CODEC_ID, a as PG_DATE_CODEC_ID, b as PG_TEXT_CODEC_ID, c as PG_FLOAT8_CODEC_ID, d as PG_INT2_CODEC_ID, f as PG_INT4_CODEC_ID, g as PG_JSONB_CODEC_ID, h as PG_INT_CODEC_ID, i as PG_CHAR_CODEC_ID, j as SQL_TEXT_CODEC_ID, k as SQL_FLOAT_CODEC_ID, l as PG_FLOAT_CODEC_ID, m as PG_INTERVAL_CODEC_ID, n as PG_BOOL_CODEC_ID, o as PG_ENUM_CODEC_ID, p as PG_INT8_CODEC_ID, r as PG_BYTEA_CODEC_ID, s as PG_FLOAT4_CODEC_ID, t as PG_BIT_CODEC_ID, u as PG_INET_CODEC_ID, v as PG_NUMERIC_CODEC_ID, w as PG_TIME_CODEC_ID, x as PG_TIMESTAMPTZ_CODEC_ID, y as PG_TEXT_ARRAY_CODEC_ID } from "./codec-ids-tX7Svtz--BuOfRaVU.mjs";
|
|
2
|
+
import { t as postgresAggregateDescriptors } from "./aggregates-ftUgi-eC.mjs";
|
|
3
|
+
import { a as postgresCodec, i as isPostgresCodecDescriptor, n as buildPostgresCodecDescriptorRegistry, r as definePostgresCodecs, t as PostgresCodecDescriptor } from "./codec-descriptor-CB6x0xEu-C-Zn2IEz.mjs";
|
|
3
4
|
import { n as postgresError, t as errorPostgresMigrationStackMissing } from "./errors-kYxOQjdD-D4T3rbVp.mjs";
|
|
4
5
|
import { t as PostgresNativeEnum } from "./postgres-native-enum-CdP3b_-R-Cgz9KEKx.mjs";
|
|
5
|
-
import { C as pgTimestamptzColumn, D as pgVarcharColumn, E as pgVarbitColumn, S as pgTimestampColumn, T as pgUuidColumn, _ as pgJsonColumn, a as pgCharColumn, b as pgTextColumn, c as pgFloat4Column, d as pgInetColumn, f as pgInt2Column, g as pgIntervalColumn, h as pgIntColumn, i as pgBoolColumn, l as pgFloat8Column, m as pgInt8Column, n as isPgEnumParams, o as pgDateColumn, p as pgInt4Column, r as pgBitColumn, s as pgEnumDescriptor, u as pgFloatColumn, v as pgJsonbColumn, w as pgTimetzColumn, x as pgTimeColumn, y as pgNumericColumn } from "./codecs-CBl0nD44-
|
|
6
|
-
import { n as postgresCodecRegistry, t as postgresCodecDescriptorRegistry } from "./codecs-
|
|
6
|
+
import { C as pgTimestamptzColumn, D as pgVarcharColumn, E as pgVarbitColumn, S as pgTimestampColumn, T as pgUuidColumn, _ as pgJsonColumn, a as pgCharColumn, b as pgTextColumn, c as pgFloat4Column, d as pgInetColumn, f as pgInt2Column, g as pgIntervalColumn, h as pgIntColumn, i as pgBoolColumn, l as pgFloat8Column, m as pgInt8Column, n as isPgEnumParams, o as pgDateColumn, p as pgInt4Column, r as pgBitColumn, s as pgEnumDescriptor, u as pgFloatColumn, v as pgJsonbColumn, w as pgTimetzColumn, x as pgTimeColumn, y as pgNumericColumn } from "./codecs-CBl0nD44-CjInu_aV.mjs";
|
|
7
|
+
import { n as postgresCodecRegistry, t as postgresCodecDescriptorRegistry } from "./codecs-rujsdlZR.mjs";
|
|
7
8
|
import { a as validateEnumValueLength, i as quoteQualifiedName, n as qualifyName, r as quoteIdentifier, t as escapeLiteral } from "./sql-utils-BnBlQxyh-DaX9Nb7Z.mjs";
|
|
8
9
|
import { c as PostgresSchema, d as isPostgresSchema, h as postgresCreateNamespace, i as PostgresRlsPolicy, l as PostgresTableSource, m as policyInputFromSerialized, n as PostgresRlsEnablement, o as PostgresRole, u as PostgresUnboundSchema } from "./postgres-schema-KSzLDONj-CsXGoY8b.mjs";
|
|
9
10
|
import { a as PostgresAlterTable, c as PostgresCreateSchema, d as PostgresDdlNode, f as PostgresDisableRowLevelSecurity, h as PostgresDropType, i as PostgresAlterPolicyRename, l as PostgresCreateTable, m as PostgresDropPolicy, n as DropDefaultAction, o as PostgresCreateIndex, p as PostgresDropIndex, r as PostgresAlterIndexRename, s as PostgresCreatePolicy, t as AddColumnAction, u as PostgresCreateType } from "./nodes-DAvDJLvJ-BBdvFXNa.mjs";
|
|
@@ -15,20 +16,20 @@ import { n as PostgresSchemaNodeKind, r as PostgresTableSchemaNode, t as Postgre
|
|
|
15
16
|
import { i as PostgresRoleSchemaNode, n as PostgresNamespaceSchemaNode, r as PostgresPolicySchemaNode, t as PostgresDatabaseSchemaNode } from "./postgres-role-schema-node-B8Z5i5D--PObwlU2Z.mjs";
|
|
16
17
|
import { t as resolveDdlSchemaForNamespaceStorage } from "./resolve-ddl-schema-CxqlLW47-0GiHRziS.mjs";
|
|
17
18
|
import { n as qualifyTableName, t as buildExpectedFormatType } from "./planner-sql-checks-DRc_78n8-C9nHOrvU.mjs";
|
|
18
|
-
import { n as buildColumnTypeSql, r as renderDefaultLiteral, t as buildColumnDefaultSql } from "./planner-ddl-builders-CbfICQfm-
|
|
19
|
-
import { A as RenamePostgresRlsPolicyCall, C as DropNativeEnumTypeCall, D as EnableRowLevelSecurityCall, E as DropTableCall, M as SetNotNullCall, O as RawSqlCall, P as createExtension, S as DropIndexCall, T as DropPostgresRlsPolicyCall, _ as DisableRowLevelSecurityCall, b as DropConstraintCall, c as AddUniqueCall, d as CreateIndexCall, f as CreateNativeEnumTypeCall, g as DataTransformCall, h as CreateTableCall, i as AddNativeEnumValueCall, j as SetDefaultCall, k as RenameIndexCall, l as AlterColumnTypeCall, m as CreateSchemaCall, n as AddColumnCall, o as AddNotNullColumnWithTempDefaultCall, p as CreatePostgresRlsPolicyCall, r as AddForeignKeyCall, s as AddPrimaryKeyCall, t as AddCheckConstraintCall, u as CreateExtensionCall, v as DropCheckConstraintCall, w as DropNotNullCall, x as DropDefaultCall, y as DropColumnCall } from "./op-factory-call-DifL68KT-
|
|
19
|
+
import { n as buildColumnTypeSql, r as renderDefaultLiteral, t as buildColumnDefaultSql } from "./planner-ddl-builders-CbfICQfm-CGjwaNy7.mjs";
|
|
20
|
+
import { A as RenamePostgresRlsPolicyCall, C as DropNativeEnumTypeCall, D as EnableRowLevelSecurityCall, E as DropTableCall, M as SetNotNullCall, O as RawSqlCall, P as createExtension, S as DropIndexCall, T as DropPostgresRlsPolicyCall, _ as DisableRowLevelSecurityCall, b as DropConstraintCall, c as AddUniqueCall, d as CreateIndexCall, f as CreateNativeEnumTypeCall, g as DataTransformCall, h as CreateTableCall, i as AddNativeEnumValueCall, j as SetDefaultCall, k as RenameIndexCall, l as AlterColumnTypeCall, m as CreateSchemaCall, n as AddColumnCall, o as AddNotNullColumnWithTempDefaultCall, p as CreatePostgresRlsPolicyCall, r as AddForeignKeyCall, s as AddPrimaryKeyCall, t as AddCheckConstraintCall, u as CreateExtensionCall, v as DropCheckConstraintCall, w as DropNotNullCall, x as DropDefaultCall, y as DropColumnCall } from "./op-factory-call-DifL68KT-CNFEDNsf.mjs";
|
|
20
21
|
import { n as resolveIdentityValue, t as buildBuiltinIdentityValue } from "./planner-identity-values-BmHn5C6U-BYBbUAyR.mjs";
|
|
21
22
|
import { i as hasUniqueConstraint, n as hasForeignKey, r as hasIndex, t as buildSchemaLookupMap } from "./planner-schema-lookup-kMIVP2y--CdO4VlnF.mjs";
|
|
22
|
-
import { a as planIssues, t as coalesceSubtreeIssues } from "./control-policy-Cl3RRSPg-
|
|
23
|
-
import { n as contractToPostgresDatabaseSchemaNode, t as buildPostgresPlanDiff } from "./diff-database-schema-BfRs2vrG-
|
|
23
|
+
import { a as planIssues, t as coalesceSubtreeIssues } from "./control-policy-Cl3RRSPg-BUi6pcI-.mjs";
|
|
24
|
+
import { n as contractToPostgresDatabaseSchemaNode, t as buildPostgresPlanDiff } from "./diff-database-schema-BfRs2vrG-DInOv5LW.mjs";
|
|
24
25
|
import { n as PostgresContractView, t as PostgresContractSerializer } from "./postgres-contract-view-FdLX7dV9-Cat1VKV9.mjs";
|
|
25
26
|
import { t as dataTransform } from "./data-transform-ChZzy2dP-CxVCat_8.mjs";
|
|
26
|
-
import { t as PostgresMigration } from "./postgres-migration-CJshdIZn-
|
|
27
|
+
import { t as PostgresMigration } from "./postgres-migration-CJshdIZn-CT6Cxd4x.mjs";
|
|
27
28
|
import { t as renderOps } from "./render-ops-DxzTxSsv-Bz85uUHk.mjs";
|
|
28
29
|
import { t as renderCallsToTypeScript } from "./render-typescript-Cw3lFO28-Cx0lXWmv.mjs";
|
|
29
|
-
import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-Cicg2sXg-
|
|
30
|
-
import { t as createPostgresMigrationPlanner } from "./planner-Bmje9ii8-
|
|
31
|
-
import { t as postgresRenderDefault } from "./control-
|
|
30
|
+
import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-Cicg2sXg-CZI7mdz9.mjs";
|
|
31
|
+
import { t as createPostgresMigrationPlanner } from "./planner-Bmje9ii8-DdjXZxyD.mjs";
|
|
32
|
+
import { t as postgresRenderDefault } from "./control-BzDnaGim.mjs";
|
|
32
33
|
import { a as foreignKey, c as primaryKey, i as fn, l as rawSql, n as checkExpression, o as lit, r as col, s as placeholder, t as MigrationCLI, u as unique } from "./migration-PTHAY9Cv.mjs";
|
|
33
34
|
import { t as normalizeSchemaNativeType } from "./native-type-normalizer-yvd3tqv-.mjs";
|
|
34
|
-
export { AddCheckConstraintCall, AddColumnAction, AddColumnCall, AddForeignKeyCall, AddNativeEnumValueCall, AddNotNullColumnWithTempDefaultCall, AddPrimaryKeyCall, AddUniqueCall, AlterColumnTypeCall, CreateExtensionCall, CreateIndexCall, CreateNativeEnumTypeCall, CreatePostgresRlsPolicyCall, CreateSchemaCall, CreateTableCall, DataTransformCall, DisableRowLevelSecurityCall, DropCheckConstraintCall, DropColumnCall, DropConstraintCall, DropDefaultAction, DropDefaultCall, DropIndexCall, DropNativeEnumTypeCall, DropNotNullCall, DropPostgresRlsPolicyCall, DropTableCall, EnableRowLevelSecurityCall, PostgresMigration as Migration, MigrationCLI, PG_BIT_CODEC_ID, PG_BOOL_CODEC_ID, PG_BYTEA_CODEC_ID, PG_CHAR_CODEC_ID, PG_DATE_CODEC_ID, PG_ENUM_CODEC_ID, PG_FLOAT4_CODEC_ID, PG_FLOAT8_CODEC_ID, PG_FLOAT_CODEC_ID, PG_INET_CODEC_ID, PG_INT2_CODEC_ID, PG_INT4_CODEC_ID, PG_INT8_CODEC_ID, PG_INTERVAL_CODEC_ID, PG_INT_CODEC_ID, PG_JSONB_CODEC_ID, PG_JSON_CODEC_ID, PG_NUMERIC_CODEC_ID, PG_TEXT_ARRAY_CODEC_ID, PG_TEXT_CODEC_ID, PG_TIMESTAMPTZ_CODEC_ID, PG_TIMESTAMP_CODEC_ID, PG_TIMETZ_CODEC_ID, PG_TIME_CODEC_ID, PG_UUID_CODEC_ID, PG_VARBIT_CODEC_ID, PG_VARCHAR_CODEC_ID, POLICY_OPERATION_PREDICATES, PostgresAlterIndexRename, PostgresAlterPolicyRename, PostgresAlterTable, PostgresCodecDescriptor, PostgresContractSerializer, PostgresContractView, PostgresCreateIndex, PostgresCreatePolicy, PostgresCreateSchema, PostgresCreateTable, PostgresCreateType, PostgresDatabaseSchemaNode, PostgresDdlNode, PostgresDisableRowLevelSecurity, PostgresDropIndex, PostgresDropPolicy, PostgresDropType, PostgresNamespaceSchemaNode, PostgresNativeEnum, PostgresNativeEnumSchemaNode, PostgresPolicySchemaNode, PostgresRlsEnablement, PostgresRlsPolicy, PostgresRole, PostgresRoleSchemaNode, PostgresSchema, PostgresSchemaNodeKind, PostgresTableSchemaNode, PostgresTableSource, PostgresUnboundSchema, RawSqlCall, RenameIndexCall, RenamePostgresRlsPolicyCall, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_TIMESTAMP_CODEC_ID, SQL_VARCHAR_CODEC_ID, SetDefaultCall, SetNotNullCall, TypeScriptRenderablePostgresMigration, addColumnAction, alterTable, buildBuiltinIdentityValue, buildColumnDefaultSql, buildColumnTypeSql, buildControlTableBootstrapQueries, buildExpectedFormatType, buildPostgresCodecDescriptorRegistry, buildPostgresPlanDiff, buildSchemaLookupMap, buildSignMarkerBootstrapQueries, checkExpression, coalesceSubtreeIssues, col, columnDefaultAst, columnExistsAst, columnNullabilityAst, columnTypeAst, computeContentHash, constraintExistsAst, contractToPostgresDatabaseSchemaNode, createExtension, createPostgresMigrationPlanner, createSchema, createTable, dataTransform, definePostgresCodecs, dropDefaultAction, errorPostgresMigrationStackMissing, escapeLiteral, extensionExistsAst, fn, foreignKey, hasForeignKey, hasIndex, hasUniqueConstraint, indexExistsAst, int4, int8, isPgEnumParams, isPostgresCodecDescriptor, isPostgresSchema, jsonb, lit, noNullValuesAst, normalizeSchemaNativeType, parsePostgresDefault, pgBitColumn, pgBoolColumn, pgCharColumn, pgDateColumn, pgEnumDescriptor, pgFloat4Column, pgFloat8Column, pgFloatColumn, pgInetColumn, pgInt2Column, pgInt4Column, pgInt8Column, pgIntColumn, pgIntervalColumn, pgJsonColumn, pgJsonbColumn, pgNumericColumn, pgTable, pgTextColumn, pgTimeColumn, pgTimestampColumn, pgTimestamptzColumn, pgTimetzColumn, pgUuidColumn, pgVarbitColumn, pgVarcharColumn, placeholder, planIssues, policyInputFromSerialized, postgresCodec, postgresCodecDescriptorRegistry, postgresCodecRegistry, postgresCreateNamespace, postgresError, postgresRenderDefault, postgresResolveDefault, primaryKey, qualifyName, qualifyTableName, quoteIdentifier, quoteQualifiedName, rawSql, renderCallsToTypeScript, renderDefaultLiteral, renderOps, resolveDdlSchemaForNamespaceStorage, resolveIdentityValue, rlsEnabledAst, rlsPolicyExistsAst, tableExistsAst, tableIsEmptyAst, tablePrimaryKeyAst, text, textArray, timestamptz, toRegclass, unique, validateEnumValueLength };
|
|
35
|
+
export { AddCheckConstraintCall, AddColumnAction, AddColumnCall, AddForeignKeyCall, AddNativeEnumValueCall, AddNotNullColumnWithTempDefaultCall, AddPrimaryKeyCall, AddUniqueCall, AlterColumnTypeCall, CreateExtensionCall, CreateIndexCall, CreateNativeEnumTypeCall, CreatePostgresRlsPolicyCall, CreateSchemaCall, CreateTableCall, DataTransformCall, DisableRowLevelSecurityCall, DropCheckConstraintCall, DropColumnCall, DropConstraintCall, DropDefaultAction, DropDefaultCall, DropIndexCall, DropNativeEnumTypeCall, DropNotNullCall, DropPostgresRlsPolicyCall, DropTableCall, EnableRowLevelSecurityCall, PostgresMigration as Migration, MigrationCLI, PG_BIT_CODEC_ID, PG_BOOL_CODEC_ID, PG_BYTEA_CODEC_ID, PG_CHAR_CODEC_ID, PG_DATE_CODEC_ID, PG_ENUM_CODEC_ID, PG_FLOAT4_CODEC_ID, PG_FLOAT8_CODEC_ID, PG_FLOAT_CODEC_ID, PG_INET_CODEC_ID, PG_INT2_CODEC_ID, PG_INT4_CODEC_ID, PG_INT8_CODEC_ID, PG_INTERVAL_CODEC_ID, PG_INT_CODEC_ID, PG_JSONB_CODEC_ID, PG_JSON_CODEC_ID, PG_NUMERIC_CODEC_ID, PG_TEXT_ARRAY_CODEC_ID, PG_TEXT_CODEC_ID, PG_TIMESTAMPTZ_CODEC_ID, PG_TIMESTAMP_CODEC_ID, PG_TIMETZ_CODEC_ID, PG_TIME_CODEC_ID, PG_UUID_CODEC_ID, PG_VARBIT_CODEC_ID, PG_VARCHAR_CODEC_ID, POLICY_OPERATION_PREDICATES, PostgresAlterIndexRename, PostgresAlterPolicyRename, PostgresAlterTable, PostgresCodecDescriptor, PostgresContractSerializer, PostgresContractView, PostgresCreateIndex, PostgresCreatePolicy, PostgresCreateSchema, PostgresCreateTable, PostgresCreateType, PostgresDatabaseSchemaNode, PostgresDdlNode, PostgresDisableRowLevelSecurity, PostgresDropIndex, PostgresDropPolicy, PostgresDropType, PostgresNamespaceSchemaNode, PostgresNativeEnum, PostgresNativeEnumSchemaNode, PostgresPolicySchemaNode, PostgresRlsEnablement, PostgresRlsPolicy, PostgresRole, PostgresRoleSchemaNode, PostgresSchema, PostgresSchemaNodeKind, PostgresTableSchemaNode, PostgresTableSource, PostgresUnboundSchema, RawSqlCall, RenameIndexCall, RenamePostgresRlsPolicyCall, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_TIMESTAMP_CODEC_ID, SQL_VARCHAR_CODEC_ID, SetDefaultCall, SetNotNullCall, TypeScriptRenderablePostgresMigration, addColumnAction, alterTable, buildBuiltinIdentityValue, buildColumnDefaultSql, buildColumnTypeSql, buildControlTableBootstrapQueries, buildExpectedFormatType, buildPostgresCodecDescriptorRegistry, buildPostgresPlanDiff, buildSchemaLookupMap, buildSignMarkerBootstrapQueries, checkExpression, coalesceSubtreeIssues, col, columnDefaultAst, columnExistsAst, columnNullabilityAst, columnTypeAst, computeContentHash, constraintExistsAst, contractToPostgresDatabaseSchemaNode, createExtension, createPostgresMigrationPlanner, createSchema, createTable, dataTransform, definePostgresCodecs, dropDefaultAction, errorPostgresMigrationStackMissing, escapeLiteral, extensionExistsAst, fn, foreignKey, hasForeignKey, hasIndex, hasUniqueConstraint, indexExistsAst, int4, int8, isPgEnumParams, isPostgresCodecDescriptor, isPostgresSchema, jsonb, lit, noNullValuesAst, normalizeSchemaNativeType, parsePostgresDefault, pgBitColumn, pgBoolColumn, pgCharColumn, pgDateColumn, pgEnumDescriptor, pgFloat4Column, pgFloat8Column, pgFloatColumn, pgInetColumn, pgInt2Column, pgInt4Column, pgInt8Column, pgIntColumn, pgIntervalColumn, pgJsonColumn, pgJsonbColumn, pgNumericColumn, pgTable, pgTextColumn, pgTimeColumn, pgTimestampColumn, pgTimestamptzColumn, pgTimetzColumn, pgUuidColumn, pgVarbitColumn, pgVarcharColumn, placeholder, planIssues, policyInputFromSerialized, postgresAggregateDescriptors, postgresCodec, postgresCodecDescriptorRegistry, postgresCodecRegistry, postgresCreateNamespace, postgresError, postgresRenderDefault, postgresResolveDefault, primaryKey, qualifyName, qualifyTableName, quoteIdentifier, quoteQualifiedName, rawSql, renderCallsToTypeScript, renderDefaultLiteral, renderOps, resolveDdlSchemaForNamespaceStorage, resolveIdentityValue, rlsEnabledAst, rlsPolicyExistsAst, tableExistsAst, tableIsEmptyAst, tablePrimaryKeyAst, text, textArray, timestamptz, toRegclass, unique, validateEnumValueLength };
|
package/dist/target__codecs.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as pgTimestamptzColumn, D as pgVarcharColumn, E as pgVarbitColumn, S as pgTimestampColumn, T as pgUuidColumn, _ as pgJsonColumn, a as pgCharColumn, b as pgTextColumn, c as pgFloat4Column, d as pgInetColumn, f as pgInt2Column, g as pgIntervalColumn, h as pgIntColumn, i as pgBoolColumn, l as pgFloat8Column, m as pgInt8Column, n as isPgEnumParams, o as pgDateColumn, p as pgInt4Column, r as pgBitColumn, s as pgEnumDescriptor, u as pgFloatColumn, v as pgJsonbColumn, w as pgTimetzColumn, x as pgTimeColumn, y as pgNumericColumn } from "./codecs-CBl0nD44-
|
|
2
|
-
import { n as postgresCodecRegistry, t as postgresCodecDescriptorRegistry } from "./codecs-
|
|
1
|
+
import { C as pgTimestamptzColumn, D as pgVarcharColumn, E as pgVarbitColumn, S as pgTimestampColumn, T as pgUuidColumn, _ as pgJsonColumn, a as pgCharColumn, b as pgTextColumn, c as pgFloat4Column, d as pgInetColumn, f as pgInt2Column, g as pgIntervalColumn, h as pgIntColumn, i as pgBoolColumn, l as pgFloat8Column, m as pgInt8Column, n as isPgEnumParams, o as pgDateColumn, p as pgInt4Column, r as pgBitColumn, s as pgEnumDescriptor, u as pgFloatColumn, v as pgJsonbColumn, w as pgTimetzColumn, x as pgTimeColumn, y as pgNumericColumn } from "./codecs-CBl0nD44-CjInu_aV.mjs";
|
|
2
|
+
import { n as postgresCodecRegistry, t as postgresCodecDescriptorRegistry } from "./codecs-rujsdlZR.mjs";
|
|
3
3
|
export { isPgEnumParams, pgBitColumn, pgBoolColumn, pgCharColumn, pgDateColumn, pgEnumDescriptor, pgFloat4Column, pgFloat8Column, pgFloatColumn, pgInetColumn, pgInt2Column, pgInt4Column, pgInt8Column, pgIntColumn, pgIntervalColumn, pgJsonColumn, pgJsonbColumn, pgNumericColumn, pgTextColumn, pgTimeColumn, pgTimestampColumn, pgTimestamptzColumn, pgTimetzColumn, pgUuidColumn, pgVarbitColumn, pgVarcharColumn, postgresCodecDescriptorRegistry, postgresCodecRegistry };
|
package/dist/target__control.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as postgresTargetDescriptor, t as postgresRenderDefault } from "./control-
|
|
1
|
+
import { n as postgresTargetDescriptor, t as postgresRenderDefault } from "./control-BzDnaGim.mjs";
|
|
2
2
|
export { postgresTargetDescriptor as default, postgresRenderDefault };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as buildPostgresPlanDiff } from "./diff-database-schema-BfRs2vrG-
|
|
1
|
+
import { t as buildPostgresPlanDiff } from "./diff-database-schema-BfRs2vrG-DInOv5LW.mjs";
|
|
2
2
|
export { buildPostgresPlanDiff };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as planIssues, t as coalesceSubtreeIssues } from "./control-policy-Cl3RRSPg-
|
|
1
|
+
import { a as planIssues, t as coalesceSubtreeIssues } from "./control-policy-Cl3RRSPg-BUi6pcI-.mjs";
|
|
2
2
|
export { coalesceSubtreeIssues, planIssues };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as createExtension } from "./op-factory-call-DifL68KT-
|
|
1
|
+
import { P as createExtension } from "./op-factory-call-DifL68KT-CNFEDNsf.mjs";
|
|
2
2
|
import { t as dataTransform } from "./data-transform-ChZzy2dP-CxVCat_8.mjs";
|
|
3
|
-
import { t as PostgresMigration } from "./postgres-migration-CJshdIZn-
|
|
3
|
+
import { t as PostgresMigration } from "./postgres-migration-CJshdIZn-CT6Cxd4x.mjs";
|
|
4
4
|
import { a as foreignKey, c as primaryKey, i as fn, l as rawSql, n as checkExpression, o as lit, r as col, s as placeholder, t as MigrationCLI, u as unique } from "./migration-PTHAY9Cv.mjs";
|
|
5
5
|
export { PostgresMigration as Migration, MigrationCLI, checkExpression, col, createExtension, dataTransform, fn, foreignKey, lit, placeholder, primaryKey, rawSql, unique };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as RenamePostgresRlsPolicyCall, C as DropNativeEnumTypeCall, D as EnableRowLevelSecurityCall, E as DropTableCall, M as SetNotNullCall, O as RawSqlCall, S as DropIndexCall, T as DropPostgresRlsPolicyCall, _ as DisableRowLevelSecurityCall, b as DropConstraintCall, c as AddUniqueCall, d as CreateIndexCall, f as CreateNativeEnumTypeCall, g as DataTransformCall, h as CreateTableCall, i as AddNativeEnumValueCall, j as SetDefaultCall, k as RenameIndexCall, l as AlterColumnTypeCall, m as CreateSchemaCall, n as AddColumnCall, o as AddNotNullColumnWithTempDefaultCall, p as CreatePostgresRlsPolicyCall, r as AddForeignKeyCall, s as AddPrimaryKeyCall, t as AddCheckConstraintCall, u as CreateExtensionCall, v as DropCheckConstraintCall, w as DropNotNullCall, x as DropDefaultCall, y as DropColumnCall } from "./op-factory-call-DifL68KT-
|
|
1
|
+
import { A as RenamePostgresRlsPolicyCall, C as DropNativeEnumTypeCall, D as EnableRowLevelSecurityCall, E as DropTableCall, M as SetNotNullCall, O as RawSqlCall, S as DropIndexCall, T as DropPostgresRlsPolicyCall, _ as DisableRowLevelSecurityCall, b as DropConstraintCall, c as AddUniqueCall, d as CreateIndexCall, f as CreateNativeEnumTypeCall, g as DataTransformCall, h as CreateTableCall, i as AddNativeEnumValueCall, j as SetDefaultCall, k as RenameIndexCall, l as AlterColumnTypeCall, m as CreateSchemaCall, n as AddColumnCall, o as AddNotNullColumnWithTempDefaultCall, p as CreatePostgresRlsPolicyCall, r as AddForeignKeyCall, s as AddPrimaryKeyCall, t as AddCheckConstraintCall, u as CreateExtensionCall, v as DropCheckConstraintCall, w as DropNotNullCall, x as DropDefaultCall, y as DropColumnCall } from "./op-factory-call-DifL68KT-CNFEDNsf.mjs";
|
|
2
2
|
export { AddCheckConstraintCall, AddColumnCall, AddForeignKeyCall, AddNativeEnumValueCall, AddNotNullColumnWithTempDefaultCall, AddPrimaryKeyCall, AddUniqueCall, AlterColumnTypeCall, CreateExtensionCall, CreateIndexCall, CreateNativeEnumTypeCall, CreatePostgresRlsPolicyCall, CreateSchemaCall, CreateTableCall, DataTransformCall, DisableRowLevelSecurityCall, DropCheckConstraintCall, DropColumnCall, DropConstraintCall, DropDefaultCall, DropIndexCall, DropNativeEnumTypeCall, DropNotNullCall, DropPostgresRlsPolicyCall, DropTableCall, EnableRowLevelSecurityCall, RawSqlCall, RenameIndexCall, RenamePostgresRlsPolicyCall, SetDefaultCall, SetNotNullCall };
|
package/dist/target__pack.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as postgresTargetDescriptorMeta } from "./descriptor-meta-DnHabAS3-
|
|
1
|
+
import { t as postgresTargetDescriptorMeta } from "./descriptor-meta-DnHabAS3-BiTguA3K.mjs";
|
|
2
2
|
export { postgresTargetDescriptorMeta as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as buildColumnTypeSql, r as renderDefaultLiteral, t as buildColumnDefaultSql } from "./planner-ddl-builders-CbfICQfm-
|
|
1
|
+
import { n as buildColumnTypeSql, r as renderDefaultLiteral, t as buildColumnDefaultSql } from "./planner-ddl-builders-CbfICQfm-CGjwaNy7.mjs";
|
|
2
2
|
export { buildColumnDefaultSql, buildColumnTypeSql, renderDefaultLiteral };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-Cicg2sXg-
|
|
1
|
+
import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-Cicg2sXg-CZI7mdz9.mjs";
|
|
2
2
|
export { TypeScriptRenderablePostgresMigration };
|
package/dist/target__planner.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as contractToPostgresDatabaseSchemaNode } from "./diff-database-schema-BfRs2vrG-
|
|
2
|
-
import { t as createPostgresMigrationPlanner } from "./planner-Bmje9ii8-
|
|
1
|
+
import { n as contractToPostgresDatabaseSchemaNode } from "./diff-database-schema-BfRs2vrG-DInOv5LW.mjs";
|
|
2
|
+
import { t as createPostgresMigrationPlanner } from "./planner-Bmje9ii8-DdjXZxyD.mjs";
|
|
3
3
|
export { contractToPostgresDatabaseSchemaNode, createPostgresMigrationPlanner };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/orm-target-postgres",
|
|
3
|
-
"version": "0.17.0-dev.
|
|
3
|
+
"version": "0.17.0-dev.10",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@prisma/orm-family-sql": "0.17.0-dev.
|
|
13
|
-
"@prisma/orm-framework": "0.17.0-dev.
|
|
14
|
-
"@prisma/orm-toolchain": "0.17.0-dev.
|
|
12
|
+
"@prisma/orm-family-sql": "0.17.0-dev.10",
|
|
13
|
+
"@prisma/orm-framework": "0.17.0-dev.10",
|
|
14
|
+
"@prisma/orm-toolchain": "0.17.0-dev.10",
|
|
15
15
|
"@standard-schema/spec": "^1.1.0",
|
|
16
16
|
"@types/pg": "8.20.0",
|
|
17
17
|
"arktype": "^2.2.2",
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
"pg-cursor": "^2.21.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@internal/adapter-postgres": "0.17.0-dev.
|
|
24
|
-
"@internal/driver-postgres": "0.17.0-dev.
|
|
25
|
-
"@internal/target-postgres": "0.17.0-dev.
|
|
26
|
-
"@repo/tsconfig": "0.17.0-dev.
|
|
27
|
-
"@repo/tsdown": "0.17.0-dev.
|
|
23
|
+
"@internal/adapter-postgres": "0.17.0-dev.10",
|
|
24
|
+
"@internal/driver-postgres": "0.17.0-dev.10",
|
|
25
|
+
"@internal/target-postgres": "0.17.0-dev.10",
|
|
26
|
+
"@repo/tsconfig": "0.17.0-dev.10",
|
|
27
|
+
"@repo/tsdown": "0.17.0-dev.10",
|
|
28
28
|
"tsdown": "0.22.14",
|
|
29
29
|
"typescript": "5.9.3",
|
|
30
30
|
"vitest": "4.1.10"
|
|
@@ -44,11 +44,13 @@
|
|
|
44
44
|
"./adapter/control": "./dist/adapter__control.mjs",
|
|
45
45
|
"./adapter/operation-types": "./dist/adapter__operation-types.mjs",
|
|
46
46
|
"./adapter/runtime": "./dist/adapter__runtime.mjs",
|
|
47
|
+
"./adapter/sql-renderer": "./dist/adapter__sql-renderer.mjs",
|
|
47
48
|
"./adapter/types": "./dist/adapter__types.mjs",
|
|
48
49
|
"./driver": "./dist/driver.mjs",
|
|
49
50
|
"./driver/control": "./dist/driver__control.mjs",
|
|
50
51
|
"./driver/runtime": "./dist/driver__runtime.mjs",
|
|
51
52
|
"./target": "./dist/target.mjs",
|
|
53
|
+
"./target/aggregates": "./dist/target__aggregates.mjs",
|
|
52
54
|
"./target/codec-descriptor": "./dist/target__codec-descriptor.mjs",
|
|
53
55
|
"./target/codec-ids": "./dist/target__codec-ids.mjs",
|
|
54
56
|
"./target/codec-types": "./dist/target__codec-types.mjs",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adapter-DhqcO3YO-jzwDVcCv.mjs","names":[],"sources":["../../../../3-targets/6-adapters/postgres/dist/adapter-DhqcO3YO.mjs"],"sourcesContent":["import { a as createPostgresCodecRegistryWithBuiltins, n as renderLoweredSql, o as adapterError, t as PostgresControlAdapter } from \"./control-adapter-B9t0g7Pf.mjs\";\nimport { APP_SPACE_ID } from \"@internal/framework-components/control\";\nimport { isDdlNode } from \"@internal/sql-relational-core/ast\";\n//#region src/core/adapter.ts\nconst defaultCapabilities = Object.freeze({\n\tpostgres: {\n\t\torderBy: true,\n\t\tlimit: true,\n\t\tlateral: true,\n\t\tjsonAgg: true,\n\t\treturning: true,\n\t\tdistinctOn: true\n\t},\n\tsql: {\n\t\tenums: true,\n\t\treturning: true,\n\t\tdefaultInInsert: true,\n\t\tlateral: true,\n\t\tscalarList: true\n\t}\n});\nvar PostgresAdapterImpl = class {\n\tfamilyId = \"sql\";\n\ttargetId = \"postgres\";\n\tprofile;\n\tcodecRegistry;\n\tconstructor(codecRegistry, profileId) {\n\t\tthis.codecRegistry = codecRegistry;\n\t\tconst controlAdapter = new PostgresControlAdapter(codecRegistry);\n\t\tthis.profile = Object.freeze({\n\t\t\tid: profileId ?? \"postgres/default@1\",\n\t\t\ttarget: \"postgres\",\n\t\t\tcapabilities: defaultCapabilities,\n\t\t\treadMarker: (queryable) => controlAdapter.readMarkerDiscriminated({\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"postgres\",\n\t\t\t\tquery: async (sql, params) => {\n\t\t\t\t\treturn { rows: [...(await queryable.query(sql, params)).rows] };\n\t\t\t\t},\n\t\t\t\tclose: async () => {}\n\t\t\t}, APP_SPACE_ID)\n\t\t});\n\t}\n\tlower(ast, context) {\n\t\tif (isDdlNode(ast)) throw adapterError(\"RUNTIME.DDL_UNSUPPORTED\", \"lower() does not lower DDL on the runtime adapter — DDL lowering is a control-plane concern handled by the control adapter.\", { meta: { surface: \"runtime-adapter\" } });\n\t\treturn renderLoweredSql(ast, context.contract, this.codecRegistry);\n\t}\n};\n/** Codec-id lookup for bare-literal interpolations used by `fns.raw` on a postgres client. Contributed as the descriptor's static `rawCodecInferer` slot. */\nconst postgresRawCodecInferer = { inferCodec(value) {\n\tswitch (typeof value) {\n\t\tcase \"number\": return Number.isSafeInteger(value) && value % 1 === 0 ? \"pg/int4\" : \"pg/float8\";\n\t\tcase \"bigint\": return \"pg/int8\";\n\t\tcase \"string\": return \"pg/text\";\n\t\tcase \"boolean\": return \"pg/bool\";\n\t\tcase \"object\": if (value instanceof Uint8Array) return \"pg/bytea\";\n\t}\n\tthrow adapterError(\"RUNTIME.RAW_SQL_UNSUPPORTED_INTERPOLATION\", \"unsupported JS value type for raw-SQL interpolation: wrap this value in `param(...)` with an explicit codec\", { meta: { valueType: typeof value } });\n} };\nfunction createPostgresAdapter(options) {\n\tconst codecRegistry = createPostgresCodecRegistryWithBuiltins(options?.codecDescriptors);\n\treturn Object.freeze(new PostgresAdapterImpl(codecRegistry, options?.profileId));\n}\nfunction createPostgresAdapterWithCodecRegistry(codecRegistry) {\n\treturn Object.freeze(new PostgresAdapterImpl(codecRegistry));\n}\n//#endregion\nexport { createPostgresAdapterWithCodecRegistry as n, postgresRawCodecInferer as r, createPostgresAdapter as t };\n\n//# sourceMappingURL=adapter-DhqcO3YO.mjs.map"],"mappings":";;;;AAIA,MAAM,sBAAsB,OAAO,OAAO;CACzC,UAAU;EACT,SAAS;EACT,OAAO;EACP,SAAS;EACT,SAAS;EACT,WAAW;EACX,YAAY;CACb;CACA,KAAK;EACJ,OAAO;EACP,WAAW;EACX,iBAAiB;EACjB,SAAS;EACT,YAAY;CACb;AACD,CAAC;AACD,IAAI,sBAAsB,MAAM;CAC/B,WAAW;CACX,WAAW;CACX;CACA;CACA,YAAY,eAAe,WAAW;EACrC,KAAK,gBAAgB;EACrB,MAAM,iBAAiB,IAAI,uBAAuB,aAAa;EAC/D,KAAK,UAAU,OAAO,OAAO;GAC5B,IAAI,aAAa;GACjB,QAAQ;GACR,cAAc;GACd,aAAa,cAAc,eAAe,wBAAwB;IACjE,UAAU;IACV,UAAU;IACV,OAAO,OAAO,KAAK,WAAW;KAC7B,OAAO,EAAE,MAAM,CAAC,IAAI,MAAM,UAAU,MAAM,KAAK,MAAM,EAAA,CAAG,IAAI,EAAE;IAC/D;IACA,OAAO,YAAY,CAAC;GACrB,GAAG,YAAY;EAChB,CAAC;CACF;CACA,MAAM,KAAK,SAAS;EACnB,IAAI,UAAU,GAAG,GAAG,MAAM,aAAa,2BAA2B,+HAA+H,EAAE,MAAM,EAAE,SAAS,kBAAkB,EAAE,CAAC;EACzO,OAAO,iBAAiB,KAAK,QAAQ,UAAU,KAAK,aAAa;CAClE;AACD;;AAEA,MAAM,0BAA0B,EAAE,WAAW,OAAO;CACnD,QAAQ,OAAO,OAAf;EACC,KAAK,UAAU,OAAO,OAAO,cAAc,KAAK,KAAK,QAAQ,MAAM,IAAI,YAAY;EACnF,KAAK,UAAU,OAAO;EACtB,KAAK,UAAU,OAAO;EACtB,KAAK,WAAW,OAAO;EACvB,KAAK,UAAU,IAAI,iBAAiB,YAAY,OAAO;CACxD;CAC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