import { CamelCasePlugin, Kysely, PostgresDialect } from "kysely";
import { Kyselify } from "drizzle-orm/kysely";
import { createPool } from "#connectors/create-pool";
import {
posts,
} from "#schema";
export interface KyselyDatabase {
posts: Kyselify<typeof posts>;
}
export const db = new Kysely<KyselyDatabase>({
dialect: new PostgresDialect({
pool: createPool({
max: 1,
}),
}),
plugins: [new CamelCasePlugin()],
});
import { CamelCasePlugin, Kysely, PostgresDialect } from "kysely";
import { Kyselify } from "drizzle-orm/kysely";
import { createPool } from "#connectors/create-pool";
import {
posts,
} from "#schema";
export interface KyselyDatabase {
posts: Kyselify<typeof posts>;
}
export const db = new Kysely<KyselyDatabase>({
dialect: new PostgresDialect({
pool: createPool({
max: 1,
}),
}),
plugins: [new CamelCasePlugin()],
});