`ctx.context.db` not available?

Why is ctx.context.db coming back as non existent? I'm using the drizzle adapter but I would like to use the kysley stuff inside the plugin so it doesn't end up only supporting drizzle. However
            gatherAttributes: createAuthEndpoint(
                "/abac/gatherAttributes",
                {
                    method: "POST",
                    body: z.object({
                        subjectId: z.string(),
                        resourceId: z.string().optional(),
                        resourceType: z.string().optional(),
                        actionName: z.string(),
                        context: z.record(z.any()), // This is equivalent to Record<string, any>
                    }),
                },
                async (ctx) => {
                    const attributeMap = new Map<string, AttributeValue>();

                    const subjectAttrs = await ctx.context.db
                        .selectFrom("")
                }
            ),
this is saying
Property 'db' does not exist on type '{ options: BetterAuthOptions; appName: string; baseURL: string; trustedOrigins: string[]; newSession: { session: { id: string; createdAt: Date; updatedAt: Date; ... 4 more ...; userAgent?: string | ... 1 more ... | undefined; } & Record<...>; user: { ...; } & Record<...>; } | null; ... 15 more ...; runMigrations: ()...'.ts(2339)
Solution
Appears it was removed in this PR https://github.com/better-auth/better-auth/pull/536 @bekacru Not sure if this was intended, if need be I'll make a PR to change the docs so db doesn't appear there anymore.
Was this page helpful?