Skip to content
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

feat(adapters): Drizzle adapter #8258

Merged
merged 206 commits into from
Aug 8, 2023
Merged

feat(adapters): Drizzle adapter #8258

merged 206 commits into from
Aug 8, 2023

Conversation

balazsorban44
Copy link
Member

@balazsorban44 balazsorban44 commented Aug 8, 2023

Finishing up @anthonyshew's PR #7165

Introducing a drizzle-orm adapter!

With drizzle's increasing popularity, it's no surprise that there's a discussion for an adapter. This PR adds it.

Notes

Closes #7165

@vercel
Copy link

vercel bot commented Aug 8, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
auth-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 8, 2023 5:11pm
next-auth-docs 🔄 Building (Inspect) Visit Preview 💬 Add feedback Aug 8, 2023 5:11pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
auth-docs-nextra ⬜️ Ignored (Inspect) Visit Preview Aug 8, 2023 5:11pm

@github-actions github-actions bot added the adapters Changes related to the core code concerning database adapters label Aug 8, 2023
@socket-security
Copy link

New dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
drizzle-kit 0.19.12 eval, filesystem, environment +1 3.32 MB dankochetov

Copy link
Member

@ndom91 ndom91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't tested it locally, but in general lgtm.

Some general feedback though, do we really need separate method implementations for each underlying db type (MySQL, postgres, etc.)?

Also these inline docs for TS hinting are getting a bit long 😅

@balazsorban44 balazsorban44 merged this pull request into main Aug 8, 2023
8 of 9 checks passed
@balazsorban44 balazsorban44 deleted the anthonyshew/main branch August 8, 2023 17:28
balazsorban44 added a commit that referenced this pull request Aug 8, 2023
Co-authored-by: Anthony Shew <anthonyshew@gmail.com>
@stunaz
Copy link

stunaz commented Sep 18, 2023

@balazsorban44 why all functions from SQLiteDrizzleAdapter are not async/await like the pg/mysql ?
I a ran to a bug without that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adapters Changes related to the core code concerning database adapters
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove instanceof checks to allow for multiple drizzle-orm instances to be used