© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•2y ago•
3 replies
juanvilladev

What is the import { check } used for from from "drizzle-orm/pg-core"

Anyone know what the check function imported from "drizzle-orm/pg-core" does?

I believe check constraints are still not implemented so I'm not sure?

Here's what it's definition looks like:
import { entityKind } from "../entity.js";
import type { SQL } from "../sql/index.js";
import type { PgTable } from "./table.js";
export declare class CheckBuilder {
    name: string;
    value: SQL;
    static readonly [entityKind]: string;
    protected brand: 'PgConstraintBuilder';
    constructor(name: string, value: SQL);
}
export declare class Check {
    table: PgTable;
    static readonly [entityKind]: string;
    readonly name: string;
    readonly value: SQL;
    constructor(table: PgTable, builder: CheckBuilder);
}
export declare function check(name: string, value: SQL): CheckBuilder;
import { entityKind } from "../entity.js";
import type { SQL } from "../sql/index.js";
import type { PgTable } from "./table.js";
export declare class CheckBuilder {
    name: string;
    value: SQL;
    static readonly [entityKind]: string;
    protected brand: 'PgConstraintBuilder';
    constructor(name: string, value: SQL);
}
export declare class Check {
    table: PgTable;
    static readonly [entityKind]: string;
    readonly name: string;
    readonly value: SQL;
    constructor(table: PgTable, builder: CheckBuilder);
}
export declare function check(name: string, value: SQL): CheckBuilder;
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Can't import as ESM from drizzle-orm/pg-core
Drizzle TeamDTDrizzle Team / help
3y ago
CHECK constraints not working with drizzle-orm/pg-core
Drizzle TeamDTDrizzle Team / help
13mo ago
Applying migrations with drizzle-orm/pg-core
Drizzle TeamDTDrizzle Team / help
3y ago
VSCode - how force auto-imports from 'drizzle-orm/pg-core' instead of 'drizzle-orm/mysql-core'
Drizzle TeamDTDrizzle Team / help
3y ago