kysely-prisma-postgres
v0.1.0
Published
Prisma Postgres (PPG) dialect for Kysely
Downloads
44
Maintainers
Readme

Join the discussion ⠀⠀⠀⠀⠀⠀⠀
kysely-prisma-postgres offers a Kysely dialect for Prisma Postgres (PPG), enabling type-safe SQL queries over HTTP.
Installation
npm install kysely-prisma-postgres @prisma/ppg kyselypnpm add kysely-prisma-postgres @prisma/ppg kyselyyarn add kysely-prisma-postgres @prisma/ppg kyselyUsage
import { ppg } from "@prisma/ppg";
import { Kysely } from "kysely";
import { PPGDialect } from "kysely-prisma-postgres";
interface Database {
person: {
id: string;
name: string;
};
}
const db = new Kysely<Database>({
dialect: new PPGDialect({
ppg: ppg(process.env.PRISMA_POSTGRES_CONNECTION_STRING!),
}),
});
const people = await db.selectFrom("person").selectAll().execute();