introspect.ts — drizzle-orm Source File
Architecture documentation for introspect.ts, a typescript file in the drizzle-orm codebase. 72 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR c2c22050_0d5c_404e_2b18_5934c728a89c["introspect.ts"] 8f03c4cf_4fdf_b056_3b24_d493cab0cc81["global.ts"] c2c22050_0d5c_404e_2b18_5934c728a89c --> 8f03c4cf_4fdf_b056_3b24_d493cab0cc81 071bfc71_ad06_c0c4_cba2_360298dd4b47["assertUnreachable"] c2c22050_0d5c_404e_2b18_5934c728a89c --> 071bfc71_ad06_c0c4_cba2_360298dd4b47 ac795a29_c480_454a_c930_ea8898cad46c["introspect-gel.ts"] c2c22050_0d5c_404e_2b18_5934c728a89c --> ac795a29_c480_454a_c930_ea8898cad46c d6ed66aa_aafe_f478_835c_7c02934633eb["schemaToTypeScript"] c2c22050_0d5c_404e_2b18_5934c728a89c --> d6ed66aa_aafe_f478_835c_7c02934633eb 1198bdc6_ac5c_88c0_dda6_b8caf0f5d9fa["introspect-mysql.ts"] c2c22050_0d5c_404e_2b18_5934c728a89c --> 1198bdc6_ac5c_88c0_dda6_b8caf0f5d9fa 194539cf_d577_ab5e_4ea9_ec2fd5ee230b["schemaToTypeScript"] c2c22050_0d5c_404e_2b18_5934c728a89c --> 194539cf_d577_ab5e_4ea9_ec2fd5ee230b 71516551_23e3_bf30_27c9_000fb046ef71["introspect-pg.ts"] c2c22050_0d5c_404e_2b18_5934c728a89c --> 71516551_23e3_bf30_27c9_000fb046ef71 9033c8cf_1cd9_c420_437a_01e7a84a9869["paramNameFor"] c2c22050_0d5c_404e_2b18_5934c728a89c --> 9033c8cf_1cd9_c420_437a_01e7a84a9869 ae4bc88a_1e24_ce7b_ea80_728e39b829ef["schemaToTypeScript"] c2c22050_0d5c_404e_2b18_5934c728a89c --> ae4bc88a_1e24_ce7b_ea80_728e39b829ef c6b71380_9588_5d06_58bb_e4dc7e505759["introspect-singlestore.ts"] c2c22050_0d5c_404e_2b18_5934c728a89c --> c6b71380_9588_5d06_58bb_e4dc7e505759 81f3f590_bf9d_eaf9_fad5_1c0016bacff9["schemaToTypeScript"] c2c22050_0d5c_404e_2b18_5934c728a89c --> 81f3f590_bf9d_eaf9_fad5_1c0016bacff9 c1c349dd_2e31_d056_728c_c034cebb41c0["introspect-sqlite.ts"] c2c22050_0d5c_404e_2b18_5934c728a89c --> c1c349dd_2e31_d056_728c_c034cebb41c0 5a8c82ee_a5ea_c82a_7f3f_71133b91a28a["schemaToTypeScript"] c2c22050_0d5c_404e_2b18_5934c728a89c --> 5a8c82ee_a5ea_c82a_7f3f_71133b91a28a 33990744_4141_72e3_2ae9_3c695bf71d75["gelSerializer.ts"] c2c22050_0d5c_404e_2b18_5934c728a89c --> 33990744_4141_72e3_2ae9_3c695bf71d75 style c2c22050_0d5c_404e_2b18_5934c728a89c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import chalk from 'chalk';
import { writeFileSync } from 'fs';
import { render, renderWithTask } from 'hanji';
import { Minimatch } from 'minimatch';
import { join } from 'path';
import { plural, singular } from 'pluralize';
import { GelSchema } from 'src/serializer/gelSchema';
import { drySingleStore, SingleStoreSchema, squashSingleStoreScheme } from 'src/serializer/singlestoreSchema';
import { assertUnreachable, originUUID } from '../../global';
import { schemaToTypeScript as gelSchemaToTypeScript } from '../../introspect-gel';
import { schemaToTypeScript as mysqlSchemaToTypeScript } from '../../introspect-mysql';
import { paramNameFor, schemaToTypeScript as postgresSchemaToTypeScript } from '../../introspect-pg';
import { schemaToTypeScript as singlestoreSchemaToTypeScript } from '../../introspect-singlestore';
import { schemaToTypeScript as sqliteSchemaToTypeScript } from '../../introspect-sqlite';
import { fromDatabase as fromGelDatabase } from '../../serializer/gelSerializer';
import { dryMySql, MySqlSchema, squashMysqlScheme } from '../../serializer/mysqlSchema';
import { fromDatabase as fromMysqlDatabase } from '../../serializer/mysqlSerializer';
import { dryPg, type PgSchema, squashPgScheme } from '../../serializer/pgSchema';
import { fromDatabase as fromPostgresDatabase } from '../../serializer/pgSerializer';
import { fromDatabase as fromSingleStoreDatabase } from '../../serializer/singlestoreSerializer';
import { drySQLite, type SQLiteSchema, squashSqliteScheme } from '../../serializer/sqliteSchema';
import { fromDatabase as fromSqliteDatabase } from '../../serializer/sqliteSerializer';
import {
applyLibSQLSnapshotsDiff,
applyMysqlSnapshotsDiff,
applyPgSnapshotsDiff,
applySingleStoreSnapshotsDiff,
applySqliteSnapshotsDiff,
} from '../../snapshotsDiffer';
import { prepareOutFolder } from '../../utils';
import { Entities } from '../validations/cli';
import type { Casing, Prefix } from '../validations/common';
import { GelCredentials } from '../validations/gel';
import { LibSQLCredentials } from '../validations/libsql';
import type { MysqlCredentials } from '../validations/mysql';
import type { PostgresCredentials } from '../validations/postgres';
import { SingleStoreCredentials } from '../validations/singlestore';
import type { SqliteCredentials } from '../validations/sqlite';
import { IntrospectProgress } from '../views';
import {
columnsResolver,
enumsResolver,
indPolicyResolver,
mySqlViewsResolver,
policyResolver,
roleResolver,
schemasResolver,
sequencesResolver,
sqliteViewsResolver,
tablesResolver,
viewsResolver,
writeResult,
} from './migrate';
export const introspectPostgres = async (
casing: Casing,
out: string,
breakpoints: boolean,
credentials: PostgresCredentials,
tablesFilter: string[],
// ... (841 more lines)
Domain
Subdomains
Functions
Dependencies
- Entities
- GelCredentials
- IntrospectProgress
- LibSQLCredentials
- MySqlSchema
- SingleStoreCredentials
- applyLibSQLSnapshotsDiff
- applyMysqlSnapshotsDiff
- applyPgSnapshotsDiff
- applySingleStoreSnapshotsDiff
- applySqliteSnapshotsDiff
- assertUnreachable
- chalk
- cli.ts
- columnsResolver
- common.ts
- enumsResolver
- fromDatabase
- fromDatabase
- fromDatabase
- fromDatabase
- fs
- gel.ts
- gelSchema
- gelSerializer.ts
- global.ts
- hanji
- indPolicyResolver
- introspect-gel.ts
- introspect-mysql.ts
- introspect-pg.ts
- introspect-singlestore.ts
- introspect-sqlite.ts
- libsql.ts
- migrate.ts
- minimatch
- mySqlViewsResolver
- mysql.ts
- mysqlSchema.ts
- mysqlSerializer.ts
- paramNameFor
- path
- pgSchema.ts
- pgSerializer.ts
- pluralize
- policyResolver
- postgres.ts
- prepareOutFolder
- roleResolver
- schemaToTypeScript
- schemaToTypeScript
- schemaToTypeScript
- schemaToTypeScript
- schemaToTypeScript
- schemasResolver
- sequencesResolver
- singlestore.ts
- singlestoreSchema
- singlestoreSerializer.ts
- snapshotsDiffer.ts
- sqlite.ts
- sqliteSchema.ts
- sqliteSerializer.ts
- sqliteViewsResolver
- squashMysqlScheme
- squashPgScheme
- squashSqliteScheme
- tablesResolver
- utils.ts
- views.ts
- viewsResolver
- writeResult
Source
Frequently Asked Questions
What does introspect.ts do?
introspect.ts is a source file in the drizzle-orm codebase, written in typescript. It belongs to the DrizzleKit domain, CLIWorkflow subdomain.
What functions are defined in introspect.ts?
introspect.ts defines 8 function(s): introspectGel, introspectLibSQL, introspectMysql, introspectPostgres, introspectSingleStore, introspectSqlite, relationsToTypeScript, withCasing.
What does introspect.ts depend on?
introspect.ts imports 72 module(s): Entities, GelCredentials, IntrospectProgress, LibSQLCredentials, MySqlSchema, SingleStoreCredentials, applyLibSQLSnapshotsDiff, applyMysqlSnapshotsDiff, and 64 more.
Where is introspect.ts in the architecture?
introspect.ts is located at drizzle-kit/src/cli/commands/introspect.ts (domain: DrizzleKit, subdomain: CLIWorkflow, directory: drizzle-kit/src/cli/commands).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free