Skip to content

barthuijgen/kysely-deno-postgres

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kysely Deno Postgres driver

usage

import { Pool } from "https://deno.land/x/postgres@v0.17.0/mod.ts";
import { Kysely, Generated } from "https://esm.sh/kysely@0.23.4";
import { PostgresDialect } from "https://deno.land/x/kysely_postgres/mod.ts";

// Create a database pool with one connection.
const pool = new Pool(
  {
    database: "postgres",
    hostname: "localhost",
    user: "postgres",
    port: 54322,
    password: Deno.env.get("DB_PASSWORD"),
  },
  1
);

// You'd create one of these when you start your app.
const db = new Kysely<Database>({
  dialect: new PostgresDialect({ pool }),
});

Reference

Based on node driver for postgres https://github.com/koskimas/kysely/tree/master/src/dialect/postgres

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published