aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bun.js/api/postgres.classes.ts60
1 files changed, 60 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..1423e0da1
--- /dev/null
+++ b/src/bun.js/api/postgres.classes.ts
@@ -0,0 +1,60 @@
+import { define } from "../scripts/class-definitions";
+
+export default [
+ define({
+ name: "PostgresSQLConnection",
+ construct: true,
+ finalize: true,
+ hasPendingActivity: true,
+ configurable: false,
+ klass: {
+ // escapeString: {
+ // fn: "escapeString",
+ // },
+ // escapeIdentifier: {
+ // fn: "escapeIdentifier",
+ // },
+ },
+ JSType: "0b11101110",
+ proto: {
+ close: {
+ fn: "doClose",
+ },
+ flush: {
+ fn: "doFlush",
+ },
+ connected: {
+ getter: "getConnected",
+ },
+ ref: {
+ fn: "doRef",
+ },
+ unref: {
+ fn: "doUnref",
+ },
+ query: {
+ fn: "createQuery",
+ },
+ },
+ }),
+ define({
+ name: "PostgresSQLQuery",
+ construct: true,
+ finalize: true,
+ configurable: false,
+ JSType: "0b11101110",
+ klass: {},
+ proto: {
+ run: {
+ fn: "doRun",
+ length: 2,
+ },
+ cancel: {
+ fn: "doCancel",
+ length: 0,
+ },
+ },
+ values: ["instance"],
+ estimatedSize: true,
+ }),
+];