Closed pilcrowonpaper closed 11 months ago
As long as the option to use the current option I don't think adding an adapter would be a problem. But at the same time as someone who uses Lucia & dribble in the same project, the current setup is so simple and require less dependencies is always good imo
this would be really useful tbh as it's pretty tedious dealing with the camelCase
and snake_case
"inconsistencies" sometimes
also - don't mind contributing towards the adapters for sqlite and mysql if needed, thank you for your work :)
I think this would be very useful in the case you want to use the new http proxy drivers for either mysql / postgres / sqlite: https://orm.drizzle.team/docs/quick-mysql/http-proxy
The docs is a bit lacking but it is better explained in the release notes: https://github.com/drizzle-team/drizzle-orm/releases/tag/0.29.0
🎉 New MySQL Proxy Driver A new driver has been released, allowing you to create your own implementation for an HTTP driver using a MySQL database. You can find usage examples in the ./examples/mysql-proxy folder
You need to implement two endpoints on your server that will be used for queries and migrations(Migrate endpoint is optional and only if you want to use drizzle migrations). Both the server and driver implementation are up to you, so you are not restricted in any way. You can add custom mappings, logging, and much more
You can find both server and driver implementation examples in the ./examples/mysql-proxy folder
Also I currently use Lucia and Drizzle in a project of mine and it's a bit weird to have both a pool connection and a client connection from Drizzle, the pool connection is used by Lucia but I use the client connection for everything else.
Anyways thanks for considering doing it!
Done with #1269
Only available for v3
Description
I made this issue mostly to gauge interest.
This is for v3, but It would look something like this:
This comes with the benefit of
attributes
passed togetUserAttributes()
option being the Drizzle field (camelCaseField
), not the underlying column (snake_case_column
).I'm still on the fence on this one since it's already quite simple to set up a project with Drizzle. We already support most drivers that Drizzle do You do have to rely on the underlying database columns, and not Drizzle fields though.
Another aspect that's making me questioning this is that we'd need to build 3 adapters, one for SQLite, MySQL, and Postgres. Not sure if that's worth it.