db0 icon indicating copy to clipboard operation
db0 copied to clipboard

Connector support tracker

Open pi0 opened this issue 2 years ago • 14 comments

Supporting SQL(lite) connectors for db0 is almost straightforward forward and by having platform/vendor connectors, we take the pain away from end-users for (almost) zero config experience. Using this issue to keep track of possible connectors in the roadmap:

  • [x] Cloudflare D1 (docs)
  • [x] LibSQL (docs)
  • [x] PostgresSQL (docs)
  • [x] Better SQLite3 (docs)
  • [x] Bun sqlite (docs)
  • [x] Planetscale (docs)
  • [x] Mysql (docs)
  • [x] Vercel PosgresSQL (docs, based on neon)
  • [ ] Deno @db/sqlite (docs)
  • [ ] Neon (docs)
  • [ ] Turso (docs, based on libSQL)
  • [ ] Capacitor (docs)
  • [ ] Cordova (docs)
  • [ ] SurrealDB (docs)
  • [ ] dolt (docs)

pi0 avatar Jul 21 '23 13:07 pi0

suposing you didnt add some of these connectors to docs on purpose? Or shoudl they be added with planned message?

moshetanzer avatar Feb 26 '24 21:02 moshetanzer

I'd also would love to add multiple connectors to Postgres, ~ to lucia-auth.com

vinayakkulkarni avatar Feb 27 '24 00:02 vinayakkulkarni

@moshetanzer only native(app) ones wasn't sure to list for now if anything else missing feel free to make PR.

@vinayakkulkarni Surely we can support postgres to but I'm curious any specific reason you would prefer it over pg? my first impression is that pg has much more downloads and even cloudflare TCP variant.

pi0 avatar Feb 27 '24 00:02 pi0

maybe ODBC?

alex-eri avatar Mar 21 '24 06:03 alex-eri

Would LOVE to see Vercel Postgres and Neon :)

MickL avatar Mar 24 '24 14:03 MickL

MSSQL support would be awesome

MertcanYuzer avatar Mar 26 '24 14:03 MertcanYuzer

@moshetanzer only native(app) ones wasn't sure to list for now if anything else missing feel free to make PR.

@vinayakkulkarni Surely we can support postgres to but I'm curious any specific reason you would prefer it over pg? my first impression is that pg has much more downloads and even cloudflare TCP variant.

I tried postgres, pg & the neon one but seems only postgres pkg is the one that works for.

Error: Cannot resolve "cloudflare:sockets" from "/home/runner/work/vinayakkulkarni.dev/vinayakkulkarni.dev/node_modules/postgres/cf/polyfills.js" and externals are not allowed!
  1. Tried deploying on deno deploy, got the above error, see the workflow –https://github.com/vinayakkulkarni/vinayakkulkarni.dev/actions/runs/8592876841/job/23543545906
  2. Tried deploying on CF worker as well but that failed too, lemme find the workflow which failed to deploy on CF
  3. Only using postgres pkg & Vercel NITRO_PRESET=vercel worked for me

vinayakkulkarni avatar Apr 08 '24 00:04 vinayakkulkarni

Related issue(s):

  • https://github.com/unjs/nitro/issues/178
  • https://github.com/unjs/nitro/issues/1679
  • https://github.com/unjs/nitro/issues/73
  • https://github.com/unjs/db0/issues/62

vinayakkulkarni avatar Apr 08 '24 02:04 vinayakkulkarni

I'm curious to understand something: for an HTTP only connector (in particular I'm talking about SurrealDB), is it enough to create an ofetch and map the various RPC endpoints?

If this is the case I would like to help with that one, considering the knowledge I've gathered while writing nuxt-surrealdb module

sandros94 avatar Jul 05 '24 15:07 sandros94

for capacitor looks good

reslear avatar Jul 05 '24 16:07 reslear

image am trying the latest with libsql and get this

Kampouse avatar Jul 13 '24 17:07 Kampouse

We could revive my old PR to db0 for Turso and Drizzle.

https://github.com/unjs/db0/issues/64

@pi0 you might remember my PR, it might be outdated atm @sandros94 Any idea's?

justserdar avatar Jan 20 '25 17:01 justserdar

We could revive my old PR to db0 for Turso and Drizzle.

#64

@pi0 you might remember my PR, it might be outdated atm @sandros94 Any idea's?

generally speaking, yes. Although I would remove the Nuxt, Nitro and Drizzle reference as those can be subject to change elsewhere

sandros94 avatar Jan 20 '25 18:01 sandros94

Could Deno @db/sqlite also be supported?

https://jsr.io/@db/sqlite

Not sure if this is relevant, but Drizzle ORM currently have PR to add @db/sqlite connector https://github.com/drizzle-team/drizzle-orm/pull/3868

LazyGeniusMan avatar Jan 27 '25 05:01 LazyGeniusMan