0.15.1 • Published 1 year ago

@postgresql-typed/core v0.15.1

Weekly downloads
-
License
MPL-2.0
Repository
github
Last release
1 year ago
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.15.0

1 year ago

0.15.1

1 year ago

0.14.0

1 year ago

0.13.0

1 year ago

0.11.0

2 years ago

0.10.1

2 years ago

0.12.0

2 years ago

0.11.1

2 years ago

0.10.2

2 years ago

0.11.2

2 years ago

0.11.3

2 years ago

0.11.4

2 years ago

0.11.5

2 years ago

0.10.0

2 years ago

0.9.0

2 years ago

0.8.1

2 years ago

0.7.2

2 years ago

0.8.0

2 years ago

0.7.1

2 years ago

0.9.2

2 years ago

0.7.4

2 years ago

0.9.1

2 years ago

0.8.2

2 years ago

0.7.3

2 years ago

0.5.0

2 years ago

0.7.0

2 years ago

0.6.0

2 years ago

0.5.1

2 years ago

0.3.0

2 years ago

0.2.3

2 years ago

0.4.0

2 years ago

0.2.2

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago