pgPushIntrospect() — drizzle-orm Function Reference
Architecture documentation for the pgPushIntrospect() function in pgIntrospect.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD 6109e4f5_b41c_e1f5_46f4_31f100453ba2["pgPushIntrospect()"] 9b24aa9e_af00_88e2_5a0a_d67a2b0b670c["pgIntrospect.ts"] 6109e4f5_b41c_e1f5_46f4_31f100453ba2 -->|defined in| 9b24aa9e_af00_88e2_5a0a_d67a2b0b670c 4c61650e_7f36_043b_24cd_0e5119e86678["pushSchema()"] 4c61650e_7f36_043b_24cd_0e5119e86678 -->|calls| 6109e4f5_b41c_e1f5_46f4_31f100453ba2 style 6109e4f5_b41c_e1f5_46f4_31f100453ba2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
drizzle-kit/src/cli/commands/pgIntrospect.ts lines 10–55
export const pgPushIntrospect = async (
db: DB,
filters: string[],
schemaFilters: string[],
entities: Entities,
tsSchema?: PgSchemaInternal,
) => {
const matchers = filters.map((it) => {
return new Minimatch(it);
});
const filter = (tableName: string) => {
if (matchers.length === 0) return true;
let flags: boolean[] = [];
for (let matcher of matchers) {
if (matcher.negate) {
if (!matcher.match(tableName)) {
flags.push(false);
}
}
if (matcher.match(tableName)) {
flags.push(true);
}
}
if (flags.length > 0) {
return flags.every(Boolean);
}
return false;
};
const progress = new ProgressView(
'Pulling schema from database...',
'Pulling schema from database...',
);
const res = await renderWithTask(
progress,
fromDatabase(db, filter, schemaFilters, entities, undefined, tsSchema),
);
const schema = { id: originUUID, prevId: '', ...res } as PgSchema;
const { internal, ...schemaWithoutInternals } = schema;
return { schema: schemaWithoutInternals };
};
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does pgPushIntrospect() do?
pgPushIntrospect() is a function in the drizzle-orm codebase, defined in drizzle-kit/src/cli/commands/pgIntrospect.ts.
Where is pgPushIntrospect() defined?
pgPushIntrospect() is defined in drizzle-kit/src/cli/commands/pgIntrospect.ts at line 10.
What calls pgPushIntrospect()?
pgPushIntrospect() is called by 1 function(s): pushSchema.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free