Node.js Drizzle PostgreSQL bigint 类型

Drizzle Node.js About 382 words

bigint()

bigint({mode: "bigint"}),传入mode属性,指定bigintnumber

import { bigint, pgTable, timestamp } from "drizzle-orm/pg-core";

const pageViewRecord = pgTable("record_page_view", {
    id: bigint({mode: "bigint"}).primaryKey(),
    createTs: timestamp({withTimezone: true}),
    updateTs: timestamp({withTimezone: true}),
});

官方文档

https://orm.drizzle.team/docs/column-types/pg#bigint

Views: 11 · Posted: 2025-10-11

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb/LiteNote

扫描下方二维码关注公众号和小程序↓↓↓

扫描下方二维码关注公众号和小程序↓↓↓
Today In History
Browsing Refresh