Skip to content

Commit 6a4f703

Browse files
authored
[Elysia] Use Bun's SQL API (#9572)
* Use Bun's SQL API for Elysia * Upgrade bun to 1.2
1 parent b59d741 commit 6a4f703

File tree

5 files changed

+7
-10
lines changed

5 files changed

+7
-10
lines changed

frameworks/TypeScript/elysia/elysia-compiled.dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM oven/bun:1.1
1+
FROM oven/bun:1.2
22

33
EXPOSE 8080
44

frameworks/TypeScript/elysia/elysia-postgres.dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM oven/bun:1.1
1+
FROM oven/bun:1.2
22

33
EXPOSE 8080
44

frameworks/TypeScript/elysia/elysia-smol-postgres.dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM oven/bun:1.1
1+
FROM oven/bun:1.2
22

33
EXPOSE 8080
44

frameworks/TypeScript/elysia/elysia.dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM oven/bun:1.1
1+
FROM oven/bun:1.2
22

33
EXPOSE 8080
44

frameworks/TypeScript/elysia/src/postgres.ts

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
import postgres from "postgres";
1+
import { SQL } from "bun";
22
import { rand } from "./db-handlers";
33
import type { Fortune, World } from "./types";
44

5-
const sql = postgres({
6-
host: "tfb-database",
7-
user: "benchmarkdbuser",
8-
password: "benchmarkdbpass",
9-
database: "hello_world",
5+
const sql = new SQL({
6+
url: "postgres://benchmarkdbuser:benchmarkdbpass@tfb-database:5432/hello_world",
107
max: 1,
118
});
129

0 commit comments

Comments
 (0)