Home / Function/ pgSuite.allTypes() — drizzle-orm Function Reference

pgSuite.allTypes() — drizzle-orm Function Reference

Architecture documentation for the pgSuite.allTypes() function in pg.test.ts from the drizzle-orm codebase.

Entity Profile

Dependency Diagram

graph TD
  e54a08c5_db64_0846_873f_48cd7032bc6d["pgSuite.allTypes()"]
  0408ab8f_6d6f_cdae_29f3_25c8efadbfae["pg.test.ts"]
  e54a08c5_db64_0846_873f_48cd7032bc6d -->|defined in| 0408ab8f_6d6f_cdae_29f3_25c8efadbfae
  style e54a08c5_db64_0846_873f_48cd7032bc6d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-kit/tests/push/pg.test.ts lines 44–225

	async allTypes() {
		const client = new PGlite();

		const customSchema = pgSchema('schemass');

		const transactionStatusEnum = customSchema.enum('TransactionStatusEnum', ['PENDING', 'FAILED', 'SUCCESS']);

		const enumname = pgEnum('enumname', ['three', 'two', 'one']);

		const schema1 = {
			test: pgEnum('test', ['ds']),
			testHello: pgEnum('test_hello', ['ds']),
			enumname: pgEnum('enumname', ['three', 'two', 'one']),

			customSchema: customSchema,
			transactionStatusEnum: customSchema.enum('TransactionStatusEnum', ['PENDING', 'FAILED', 'SUCCESS']),

			allSmallSerials: pgTable('schema_test', {
				columnAll: uuid('column_all').defaultRandom(),
				column: transactionStatusEnum('column').notNull(),
			}),

			allSmallInts: customSchema.table(
				'schema_test2',
				{
					columnAll: smallint('column_all').default(124).notNull(),
					column: smallint('columns').array(),
					column1: smallint('column1').array().array(),
					column2: smallint('column2').array().array(),
					column3: smallint('column3').array(),
				},
				(t) => ({
					cd: uniqueIndex('testdfds').on(t.column),
				}),
			),

			allEnums: customSchema.table(
				'all_enums',
				{
					columnAll: enumname('column_all').default('three').notNull(),
					column: enumname('columns'),
				},
				(t) => ({
					d: index('ds').on(t.column),
				}),
			),

			allTimestamps: customSchema.table('all_timestamps', {
				columnDateNow: timestamp('column_date_now', {
					precision: 1,
					withTimezone: true,
					mode: 'string',
				}).defaultNow(),
				columnAll: timestamp('column_all', { mode: 'string' }).default('2023-03-01 12:47:29.792'),
				column: timestamp('column', { mode: 'string' }).default(sql`'2023-02-28 16:18:31.18'`),
				column2: timestamp('column2', { mode: 'string', precision: 3 }).default(sql`'2023-02-28 16:18:31.18'`),
			}),

			allUuids: customSchema.table('all_uuids', {
				columnAll: uuid('column_all').defaultRandom().notNull(),
				column: uuid('column'),
			}),

			allDates: customSchema.table('all_dates', {
				column_date_now: date('column_date_now').defaultNow(),
				column_all: date('column_all', { mode: 'date' }).default(new Date()).notNull(),
				column: date('column'),
			}),

			allReals: customSchema.table('all_reals', {
				columnAll: real('column_all').default(32).notNull(),
				column: real('column'),
				columnPrimary: real('column_primary').primaryKey().notNull(),
			}),

			allBigints: pgTable('all_bigints', {
				columnAll: bigint('column_all', { mode: 'number' }).default(124).notNull(),
				column: bigint('column', { mode: 'number' }),
			}),

			allBigserials: customSchema.table('all_bigserials', {

Domain

Subdomains

Frequently Asked Questions

What does pgSuite.allTypes() do?
pgSuite.allTypes() is a function in the drizzle-orm codebase, defined in drizzle-kit/tests/push/pg.test.ts.
Where is pgSuite.allTypes() defined?
pgSuite.allTypes() is defined in drizzle-kit/tests/push/pg.test.ts at line 44.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free