You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe
Since V3 is SQL based and provides presets for what DB, it would be quite great if devs can provide their own adapters (especially when someone may be using Drizzle, Prisma, etc). This also enables a lot more control over how collections can integrate into existing databases.
Describe the solution you'd like
I definitely do not propose providing custom adapter implementation within the module as it would require lot of maintenance. Instead, if there is a file like content.adapter.ts, we load that into #content/adapter.
If we keep exec, we may need to allow collection configuration to specify tableName (or we provide instructions that devs configure their ORM to match __content_${name}, but that defeats the purpose)
Describe alternatives you've considered
Additional context
Willing to raise a PR -- need your thoughts first!
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe
Since V3 is SQL based and provides presets for what DB, it would be quite great if devs can provide their own adapters (especially when someone may be using Drizzle, Prisma, etc). This also enables a lot more control over how collections can integrate into existing databases.
Describe the solution you'd like
I definitely do not propose providing custom adapter implementation within the module as it would require lot of maintenance. Instead, if there is a file like
content.adapter.ts
, we load that into#content/adapter
.A couple of things we'd need to do additionally:
createDatabaseAdapter
.adapter.exec
? We should rather follow this format for adapters:https://github.com/better-auth/better-auth/blob/9e56ea2e325b916cbbca24f0478bf91484bf7668/packages/better-auth/src/adapters/drizzle-adapter/drizzle-adapter.ts#L248https://github.com/better-auth/better-auth/blob/9e56ea2e325b916cbbca24f0478bf91484bf7668/packages/better-auth/src/types/adapter.ts#L26tableName
(or we provide instructions that devs configure their ORM to match__content_${name}
, but that defeats the purpose)Describe alternatives you've considered
Additional context
Willing to raise a PR -- need your thoughts first!
The text was updated successfully, but these errors were encountered: