File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 required : true
1010 # NEON_HTTP_CONNECTION_STRING:
1111 # required: true
12+ NETLIFY_DB_URL :
13+ required : true
1214 TIDB_CONNECTION_STRING :
1315 required : true
1416 XATA_API_KEY :
3537 - singlestore-custom
3638 - neon-http
3739 - neon-serverless
40+ - netlify-db
3841 - drizzle-orm
3942 - drizzle-kit
4043 - drizzle-zod
@@ -152,6 +155,7 @@ jobs:
152155 # NEON_HTTP_CONNECTION_STRING: postgres://postgres:postgres@db.localtest.me:5432/postgres
153156 NEON_HTTP_CONNECTION_STRING : ${{ secrets.NEON_CONNECTION_STRING }}
154157 NEON_SERVERLESS_CONNECTION_STRING : postgres://postgres:postgres@localhost:5445/postgres
158+ NETLIFY_DB_URL : ${{ secrets.NETLIFY_DB_URL }}
155159 TIDB_CONNECTION_STRING : ${{ secrets.TIDB_CONNECTION_STRING }}
156160 XATA_API_KEY : ${{ secrets.XATA_API_KEY }}
157161 XATA_BRANCH : ${{ secrets.XATA_BRANCH }}
@@ -210,6 +214,10 @@ jobs:
210214 docker compose -f docker-neon.yml down
211215 ;;
212216
217+ netlify-db)
218+ pnpm vitest run tests/pg/netlify-db.test.ts
219+ ;;
220+
213221 drizzle-orm|drizzle-kit|drizzle-zod|drizzle-seed|drizzle-typebox|drizzle-valibot|drizzle-arktype)
214222 (cd .. && pnpm test --filter ${{ matrix.shard }})
215223 ;;
@@ -226,7 +234,8 @@ jobs:
226234 --exclude tests/singlestore/singlestore-custom.test.ts \
227235 --exclude tests/pg/neon-http.test.ts \
228236 --exclude tests/pg/neon-http-batch.test.ts \
229- --exclude tests/pg/neon-serverless.test.ts
237+ --exclude tests/pg/neon-serverless.test.ts \
238+ --exclude tests/pg/netlify-db.test.ts
230239 ;;
231240
232241 esac
Original file line number Diff line number Diff line change 99 required : true
1010 # NEON_HTTP_CONNECTION_STRING:
1111 # required: true
12+ NETLIFY_DB_URL :
13+ required : true
1214 TIDB_CONNECTION_STRING :
1315 required : true
1416 XATA_API_KEY :
3335 - singlestore-custom
3436 - neon-http
3537 - neon-serverless
38+ - netlify-db
3639 - drizzle-orm
3740 - drizzle-kit
3841 - drizzle-zod
@@ -150,6 +153,7 @@ jobs:
150153 # NEON_HTTP_CONNECTION_STRING: postgres://postgres:postgres@db.localtest.me:5432/postgres
151154 NEON_HTTP_CONNECTION_STRING : ${{ secrets.NEON_CONNECTION_STRING }}
152155 NEON_SERVERLESS_CONNECTION_STRING : postgres://postgres:postgres@localhost:5445/postgres
156+ NETLIFY_DB_URL : ${{ secrets.NETLIFY_DB_URL }}
153157 TIDB_CONNECTION_STRING : ${{ secrets.TIDB_CONNECTION_STRING }}
154158 XATA_API_KEY : ${{ secrets.XATA_API_KEY }}
155159 XATA_BRANCH : ${{ secrets.XATA_BRANCH }}
@@ -198,6 +202,10 @@ jobs:
198202 docker compose -f docker-neon.yml down
199203 ;;
200204
205+ netlify-db)
206+ pnpm vitest run tests/pg/netlify-db.test.ts
207+ ;;
208+
201209 drizzle-orm|drizzle-kit|drizzle-zod|drizzle-seed|drizzle-typebox|drizzle-valibot|drizzle-arktype)
202210 (cd .. && pnpm test --filter ${{ matrix.shard }})
203211 ;;
@@ -214,7 +222,8 @@ jobs:
214222 --exclude tests/singlestore/singlestore-custom.test.ts \
215223 --exclude tests/pg/neon-http.test.ts \
216224 --exclude tests/pg/neon-http-batch.test.ts \
217- --exclude tests/pg/neon-serverless.test.ts
225+ --exclude tests/pg/neon-serverless.test.ts \
226+ --exclude tests/pg/netlify-db.test.ts
218227 ;;
219228
220229 esac
Original file line number Diff line number Diff line change 3535 PLANETSCALE_CONNECTION_STRING : ${{ secrets.PLANETSCALE_CONNECTION_STRING }}
3636 NEON_CONNECTION_STRING : ${{ secrets.NEON_CONNECTION_STRING }}
3737 # NEON_HTTP_CONNECTION_STRING: ${{ secrets.NEON_CONNECTION_STRING }}
38+ NETLIFY_DB_URL : ${{ secrets.NETLIFY_DB_URL }}
3839 TIDB_CONNECTION_STRING : ${{ secrets.TIDB_CONNECTION_STRING }}
3940 XATA_API_KEY : ${{ secrets.XATA_API_KEY }}
4041 XATA_BRANCH : ${{ secrets.XATA_BRANCH }}
4950 PLANETSCALE_CONNECTION_STRING : ${{ secrets.PLANETSCALE_CONNECTION_STRING }}
5051 NEON_CONNECTION_STRING : ${{ secrets.NEON_CONNECTION_STRING }}
5152 # NEON_HTTP_CONNECTION_STRING: ${{ secrets.NEON_CONNECTION_STRING }}
53+ NETLIFY_DB_URL : ${{ secrets.NETLIFY_DB_URL }}
5254 TIDB_CONNECTION_STRING : ${{ secrets.TIDB_CONNECTION_STRING }}
5355 XATA_API_KEY : ${{ secrets.XATA_API_KEY }}
5456 XATA_BRANCH : ${{ secrets.XATA_BRANCH }}
Original file line number Diff line number Diff line change 1+ ## New Netlify DB Driver
2+
3+ > Note: The Netlify DB driver is developed and maintained by the Netlify team.
4+
5+ ** Installation:**
6+ ``` bash
7+ npm i @netlify/db
8+ ```
9+
10+ ** Usage example:**
11+ ``` typescript
12+ import { drizzle } from ' drizzle-orm/netlify-db' ;
13+
14+ // reads NETLIFY_DB_URL and NETLIFY_DB_DRIVER env vars
15+ const db = drizzle ();
16+
17+ const result = await db .execute (' select 1' );
18+ ```
19+
20+ ``` typescript
21+ import { drizzle } from ' drizzle-orm/netlify-db' ;
22+
23+ const db = drizzle (process .env .DATABASE_URL );
24+
25+ const result = await db .execute (' select 1' );
26+ ```
27+
28+ ``` typescript
29+ import { drizzle } from ' drizzle-orm/netlify-db' ;
30+
31+ // Explicit client — consumer controls the driver
32+ const db = drizzle ({ client: netlifyDbClient });
33+
34+ const result = await db .execute (' select 1' );
35+ ```
Original file line number Diff line number Diff line change 11{
22 "name" : " drizzle-orm" ,
3- "version" : " 0.45.2 " ,
3+ "version" : " 0.45.3 " ,
44 "description" : " Drizzle ORM package for SQL databases" ,
55 "type" : " module" ,
66 "scripts" : {
5959 "@types/better-sqlite3" : " *" ,
6060 "@types/pg" : " *" ,
6161 "@types/sql.js" : " *" ,
62+ "@upstash/redis" : " >=1.34.7" ,
6263 "@vercel/postgres" : " >=0.8.0" ,
6364 "@xata.io/client" : " *" ,
6465 "better-sqlite3" : " >=7" ,
6566 "bun-types" : " *" ,
6667 "expo-sqlite" : " >=14.0.0" ,
68+ "gel" : " >=2" ,
6769 "knex" : " *" ,
6870 "kysely" : " *" ,
6971 "mysql2" : " >=2" ,
72+ "@netlify/db" : " >=0.4.0" ,
7073 "pg" : " >=8" ,
7174 "postgres" : " >=3" ,
7275 "sql.js" : " >=1" ,
73- "sqlite3" : " >=5" ,
74- "gel" : " >=2" ,
75- "@upstash/redis" : " >=1.34.7"
76+ "sqlite3" : " >=5"
7677 },
7778 "peerDependenciesMeta" : {
7879 "mysql2" : {
114115 "@neondatabase/serverless" : {
115116 "optional" : true
116117 },
118+ "@netlify/db" : {
119+ "optional" : true
120+ },
117121 "bun-types" : {
118122 "optional" : true
119123 },
171175 "@libsql/client-wasm" : " ^0.10.0" ,
172176 "@miniflare/d1" : " ^2.14.4" ,
173177 "@neondatabase/serverless" : " ^0.10.0" ,
178+ "@netlify/db" : " ^0.4.0" ,
174179 "@op-engineering/op-sqlite" : " ^2.0.16" ,
175180 "@opentelemetry/api" : " ^1.4.1" ,
176181 "@originjs/vite-plugin-commonjs" : " ^1.0.3" ,
You can’t perform that action at this time.
0 commit comments