-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
fix(adapters): allow async SQLite clients #9355
Conversation
libsql is like sqlite, and supported by drizzle, but it's a Promise-based API unlike standard SQLite which is synchronous.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Ignored Deployments
|
@Schniz is attempting to deploy a commit to the authjs Team on Vercel. A member of the Team first needs to authorize it. |
Updated dependencies detected. Learn more about Socket for GitHub ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Thanks for the change! Any chance that index.ts gets edited in order to accept the libsql-client and not only drizzle's BaseSQLiteDatabase? |
That should be a different adapter but it shouldn't be very hard to implement |
☕️ Reasoning
Drizzle supports the
@libsql/client
package, which is likebetter-sqlite3
but Promise based. Right now, the Drizzle adapteronly works with sync code, so it's not possible to use
@libsql/client
with it. This PR adds support for async code to theDrizzle adapter, so that
@libsql/client
can be used with it (and therefore Turso can be used with it transitively).🧢 Checklist
🎫 Affected issues
Please scout and link issues that might be solved by this PR.
Fixes #9276, Fixes #8335, Closes #8363 (this PR adds tests too)
📌 Resources