Skip to content

monolayer-pg / schema / bigint

Function: bigint()

bigint(): PgBigInt

Column that stores whole numbers.

Returns

PgBigInt

Remarks

Range: -9223372036854775808 to +9223372036854775807.

Kysely database schema type definition

ts
{
  readonly __select__: string | null;
  readonly __insert__: bigint | number | string | null | undefined;
  readonly __update__: bigint | number | string | null;
};

Example

ts
import { bigint, schema, table } from "@monolayer/pg/schema";

const dbSchema = schema({
  tables: {
    example: table({
      columns: {
        id: bigint(),
      },
    }),
  },
});

// Kysely database schema type
type DB = typeof dbSchema.infer;

See

PostgreSQL Docs: bigint