Repository
Current version released
3 years ago
Running the example
Install deno and run:
export DB_URL=postgresql://user@localhost:5432/yourdb
deno run --allow-env --allow-net=localhost:5432 https://deno.land/x/fab/example.ts
Usage
import { Fab } from "https://deno.land/x/fab/mod.ts";
import { Pool } from "https://deno.land/x/postgres/mod.ts";
const db = new Pool(url, 20);
const fab = new Fab({ db });
const user = await fab
.selectFrom("users")
.select("*")
.where("id", "=", 1)
.executeTakeFirst();
console.log(user);
Coming soon
- Delete
- Better typing - fields/result etc.
- Migrations
- Schema defined in code
- Inferred types from schema