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
Currently, Next-Admin is made to work only with Prisma. This is limiting for users that uses other ORMs such as Drizzle, and more largely query libraries like knex, or even more low level libs like pg.
Now that we are able to use the lib without depending on the Prisma DMMF, we should be able to abstract the CRUD queries that are made on the server and extract the Prisma logic in its own adapter.
Create a generator for Drizzle
Create a helper function for other kind of generators to generate schemas in the right file
Create a type generator that would either use Prisma or Drizzle types
Create an adapter logic
Create Prisma and Drizzle adapters
Basic Example
const adapter = new PrismaAdapter(prismaInstance)
const { run } = createHandler({
apiBasePath: "/api/admin",
options,
adapter,
});
export { run as DELETE, run as GET, run as POST };
The text was updated successfully, but these errors were encountered:
Summary
Currently, Next-Admin is made to work only with
Prisma
. This is limiting for users that uses other ORMs such asDrizzle
, and more largely query libraries likeknex
, or even more low level libs likepg
.Now that we are able to use the lib without depending on the Prisma DMMF, we should be able to abstract the CRUD queries that are made on the server and extract the Prisma logic in its own adapter.
Basic Example
The text was updated successfully, but these errors were encountered: