aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/api/postgres.classes.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/bun.js/api/postgres.classes.ts')
-rw-r--r--src/bun.js/api/postgres.classes.ts40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/bun.js/api/postgres.classes.ts b/src/bun.js/api/postgres.classes.ts
new file mode 100644
index 000000000..309c9a0db
--- /dev/null
+++ b/src/bun.js/api/postgres.classes.ts
@@ -0,0 +1,40 @@
+import { define } from "../scripts/class-definitions" assert { type: "bun:pg" };
+
+export default [
+ define({
+ name: "PostgresSQLDatabase",
+ construct: false,
+ finalize: true,
+ hasPendingActivity: true,
+ noConstructor: true,
+ klass: {},
+ proto: {
+ close: {
+ fn: "close",
+ length: 0,
+ },
+ query: {
+ fn: "query",
+ length: 4,
+ },
+ // prepare: {
+ // fn: "prepare",
+ // length: 2,
+ // },
+ // run: {
+ // fn: "run",
+ // length: 2,
+ // },
+ ref: {
+ fn: "ref",
+ length: 0,
+ },
+ unref: {
+ fn: "unref",
+ length: 0,
+ },
+ },
+ values: ["onClose", "onNotice", "onOpen", "onTimeout", "onDrain"],
+ JSType: "0b11101110",
+ }),
+];