0.14.0 • Published 4 months ago
@postgresql-typed/core v0.14.0
npm install --save @postgresql-typed/core
import { Client, pgt, table } from "@postgresql-typed/core";
import {
defineCharacterVarying,
defineInt2,
defineUUID
} from "@postgresql-typed/core/definers";
import { eq } from "@postgresql-typed/core/operators";
const db = pgt(new Client({
connectionString: "postgres://user:pass@localhost:5432/dbname"
}));
await db.connect();
const users = table("users", {
id: defineUUID("user_id").primaryKey(),
name: defineCharacterVarying("user_name", {
length: 255
}).notNull(),
age: defineInt2("user_age").notNull()
});
await db.select().from(users).where(eq(users.age, 18));
0.14.0
4 months ago
0.13.0
4 months ago
0.11.0
9 months ago
0.10.1
10 months ago
0.12.0
7 months ago
0.11.1
9 months ago
0.10.2
9 months ago
0.11.2
9 months ago
0.11.3
8 months ago
0.11.4
7 months ago
0.11.5
7 months ago
0.10.0
10 months ago
0.9.0
10 months ago
0.8.1
10 months ago
0.7.2
10 months ago
0.8.0
10 months ago
0.7.1
10 months ago
0.9.2
10 months ago
0.7.4
10 months ago
0.9.1
10 months ago
0.8.2
10 months ago
0.7.3
10 months ago
0.5.0
11 months ago
0.7.0
10 months ago
0.6.0
11 months ago
0.5.1
11 months ago
0.3.0
12 months ago
0.2.3
1 year ago
0.4.0
12 months ago
0.2.2
1 year ago
0.2.1
1 year ago
0.2.0
1 year ago
0.1.0
1 year ago