@prisma-next/sql-orm-client 0.10.0-dev.15 → 0.10.0-dev.17
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/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +20 -20
- package/src/query-plan-mutations.ts +1 -1
package/dist/index.mjs
CHANGED
|
@@ -746,7 +746,7 @@ function compileUpsertReturning(contract, tableName, createValues, updateValues,
|
|
|
746
746
|
const createAssignments = toParamAssignments(contract, tableName, createValues);
|
|
747
747
|
const updateAssignments = Object.keys(updateValues).length > 0 ? toParamAssignments(contract, tableName, updateValues) : void 0;
|
|
748
748
|
const onConflict = updateAssignments ? InsertOnConflict.on(conflictColumns.map((column) => ColumnRef.of(tableName, column))).doUpdateSet(updateAssignments.assignments) : InsertOnConflict.on(conflictColumns.map((column) => ColumnRef.of(tableName, column))).doNothing();
|
|
749
|
-
const ast = InsertAst.into(TableSource.named(tableName)).
|
|
749
|
+
const ast = InsertAst.into(TableSource.named(tableName)).withRows([createAssignments.assignments]).withOnConflict(onConflict).withReturning(buildReturningColumns(contract, tableName, returningColumns));
|
|
750
750
|
const { params } = deriveParamsFromAst(ast);
|
|
751
751
|
return buildOrmQueryPlan(contract, ast, params);
|
|
752
752
|
}
|