-
Notifications
You must be signed in to change notification settings - Fork 401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactoring to easily support other databases #228
Comments
Since it’s outside of wildebeest’s core directive as a Cloudflare-native app, I think the only way to know whether this would be approved is to make a small PR. Then the tentative changes can be discussed in the context of a proof-of-concept that clearly demonstrates the trade-offs. |
The code has been refactored to allow other databases, based on D1's API interface. I'm adding neon.tech (postgresql) as another supported database. |
Thanks @xtuc this is amazing 🙌 |
First, thanks for open sourcing this. This is a great addition to the open-source world.
D1 and SQLite are great. But there are so many other choices for dbs.
What do you think about abstracting the db part just a bit to allow people who fork this project to swap it transparently?
The adapter would have a
ts
spec.The db functions are already typed, so it wouldn't be hard to do the refactoring.
And in order to create an adapter, a user has to implement all the query functions in the adapter file.
I believe this will immensely help adoption of this project and create a vibrant ecosystem around it. Especially if db providers provide an adapter (supabase, mongo, prisma, edgedb ...).
Another use case is people who want to integrate this project into their existing system and database. I think you get the point :)
The text was updated successfully, but these errors were encountered: