prostgles-server 4.2.10 → 4.2.12
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/package.json
CHANGED
|
@@ -28,26 +28,4 @@ export const serverOnlyQueries = async (db: DBHandlerServer) => {
|
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
});
|
|
31
|
-
|
|
32
|
-
// // /** Self reference recursion bug */
|
|
33
|
-
// await db.rec.findOne!({ id: 1 }, { select: { "*": 1, rec_ref: "*" } })
|
|
34
|
-
|
|
35
|
-
// /* Transaction example */
|
|
36
|
-
// await db.tx!(async t => {
|
|
37
|
-
// await t.items.insert!({ name: "tx_" });
|
|
38
|
-
// const expect1 = await t.items.count!({ name: "tx_" });
|
|
39
|
-
// const expect0 = await db.items.count!({ name: "tx_" });
|
|
40
|
-
// if(expect0 !== 0 || expect1 !== 1) throw "db.tx failed";
|
|
41
|
-
|
|
42
|
-
// //throw "err"; // Any errors will revert all data-changing commands using the transaction object ( t )
|
|
43
|
-
// });
|
|
44
|
-
// const expect1 = await db.items.count!({ name: "tx_" });
|
|
45
|
-
// if(expect1 !== 1) throw "db.tx failed";
|
|
46
|
-
|
|
47
|
-
// /** TableConfig onMount works */
|
|
48
|
-
// await db.api_table.findOne!({ id: 1 });
|
|
49
|
-
// const newRow = await db.api_table.insert!({ }, { returning: "*" });
|
|
50
|
-
// if(newRow.col1 !== null) {
|
|
51
|
-
// throw "api_table onMount failed: col1 missing. Got: " + JSON.stringify(newRow);
|
|
52
|
-
// }
|
|
53
31
|
}
|