orchid-orm 1.78.0 → 1.78.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/index.d.ts +35 -6
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -3
- package/dist/index.mjs.map +1 -1
- package/dist/migrations/index.js +3 -3
- package/dist/migrations/index.js.map +1 -1
- package/dist/migrations/index.mjs +3 -3
- package/dist/migrations/index.mjs.map +1 -1
- package/package.json +5 -5
|
@@ -24,7 +24,7 @@ const compareSqlExpressions = async (expressions, adapter) => {
|
|
|
24
24
|
`DROP VIEW ${viewName}`
|
|
25
25
|
].join("; ");
|
|
26
26
|
const query = () => adapter.query(combinedQueries, values);
|
|
27
|
-
const result = await (adapter.isInTransaction() ? adapter.savepoint(viewName, query) : query()).then((res) => res[1], async (err) => {
|
|
27
|
+
const result = await (adapter.isInTransaction() ? adapter.savepoint(viewName, void 0, query) : query()).then((res) => res[1], async (err) => {
|
|
28
28
|
if (typeof err === "object" && getDriverErrorCode(err) !== "42704") throw err;
|
|
29
29
|
});
|
|
30
30
|
if (!result) {
|
|
@@ -52,12 +52,12 @@ const compareViewsExpressions = async (adapter, compare) => {
|
|
|
52
52
|
try {
|
|
53
53
|
const sql = queries.flatMap((q) => q.batch).join(";");
|
|
54
54
|
const query = () => adapter.query(sql, []);
|
|
55
|
-
results = await (adapter.isInTransaction() ? adapter.savepoint("orchidOrmGeneratorViews", query) : query());
|
|
55
|
+
results = await (adapter.isInTransaction() ? adapter.savepoint("orchidOrmGeneratorViews", void 0, query) : query());
|
|
56
56
|
} catch {
|
|
57
57
|
results = (await Promise.all(queries.map(async ({ batch: queries }, i) => {
|
|
58
58
|
const sql = queries.join(";");
|
|
59
59
|
const query = () => adapter.query(sql, []);
|
|
60
|
-
return await (adapter.isInTransaction() ? adapter.savepoint(`orchidOrmGeneratorViews${i}`, query) : query()).catch((err) => {
|
|
60
|
+
return await (adapter.isInTransaction() ? adapter.savepoint(`orchidOrmGeneratorViews${i}`, void 0, query) : query()).catch((err) => {
|
|
61
61
|
if (typeof err === "object") {
|
|
62
62
|
const code = getDriverErrorCode(err);
|
|
63
63
|
if (code === "42703" || code === "42704" || code === "42P01") return [];
|