aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-10-09 01:11:29 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-10-13 18:08:23 -0700
commit0a6ef179f89b71492458134aae4af9cd32b1e70d (patch)
tree68efa4b6cdd48ef7a346e3362db3872169c55297 /src/bun.js
parent71ddfcf7c1980e2f99b96e844f91e1e7ca02248f (diff)
downloadbun-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.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,
+ }),
+];