import { a as withTransactionIdentity } from "../transaction-Uv-u8h_k.js";
import { PGlite } from "@electric-sql/pglite";
import { drizzle } from "drizzle-orm/pglite";
//#region src/postgres/pglite.ts
function createPgliteClient(opts = {}) {
	const client = opts.dataDir !== void 0 ? new PGlite(opts.dataDir) : new PGlite();
	return withTransactionIdentity(drizzle(client, { schema: opts.schema }));
}
//#endregion
export { createPgliteClient };
