diff options
author | 2023-10-09 01:11:29 -0700 | |
---|---|---|
committer | 2023-10-13 18:08:23 -0700 | |
commit | 0a6ef179f89b71492458134aae4af9cd32b1e70d (patch) | |
tree | 68efa4b6cdd48ef7a346e3362db3872169c55297 /src/bun.js | |
parent | 71ddfcf7c1980e2f99b96e844f91e1e7ca02248f (diff) | |
download | bun-0a6ef179f89b71492458134aae4af9cd32b1e70d.tar.gz bun-0a6ef179f89b71492458134aae4af9cd32b1e70d.tar.zst bun-0a6ef179f89b71492458134aae4af9cd32b1e70d.zip |
Create postgres.classes.ts
Diffstat (limited to 'src/bun.js')
-rw-r--r-- | src/bun.js/api/postgres.classes.ts | 60 |
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, + }), +]; |