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

mysqlSuite.allTypes() — drizzle-orm Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  718cab24_9233_ccd9_4351_0d2ddcfaac75["mysqlSuite.allTypes()"]
  e4016db2_352d_b236_2557_d9a74c6066c1["mysql.test.ts"]
  718cab24_9233_ccd9_4351_0d2ddcfaac75 -->|defined in| e4016db2_352d_b236_2557_d9a74c6066c1
  style 718cab24_9233_ccd9_4351_0d2ddcfaac75 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

drizzle-kit/tests/push/mysql.test.ts lines 65–293

	allTypes: async function(context: any): Promise<void> {
		const schema1 = {
			allBigInts: mysqlTable('all_big_ints', {
				simple: bigint('simple', { mode: 'number' }),
				columnNotNull: bigint('column_not_null', { mode: 'number' }).notNull(),
				columnDefault: bigint('column_default', { mode: 'number' }).default(12),
				columnDefaultSql: bigint('column_default_sql', {
					mode: 'number',
				}).default(12),
			}),
			allBools: mysqlTable('all_bools', {
				simple: tinyint('simple'),
				columnNotNull: tinyint('column_not_null').notNull(),
				columnDefault: tinyint('column_default').default(1),
			}),
			allChars: mysqlTable('all_chars', {
				simple: char('simple', { length: 1 }),
				columnNotNull: char('column_not_null', { length: 45 }).notNull(),
				// columnDefault: char("column_default", { length: 1 }).default("h"),
				columnDefaultSql: char('column_default_sql', { length: 1 }).default(
					'h',
				),
			}),
			allDateTimes: mysqlTable('all_date_times', {
				simple: datetime('simple', { mode: 'string', fsp: 1 }),
				columnNotNull: datetime('column_not_null', {
					mode: 'string',
				}).notNull(),
				columnDefault: datetime('column_default', { mode: 'string' }).default(
					'2023-03-01 14:05:29',
				),
			}),
			allDates: mysqlTable('all_dates', {
				simple: date('simple', { mode: 'string' }),
				column_not_null: date('column_not_null', { mode: 'string' }).notNull(),
				column_default: date('column_default', { mode: 'string' }).default(
					'2023-03-01',
				),
			}),
			allDecimals: mysqlTable('all_decimals', {
				simple: decimal('simple', { precision: 1, scale: 0 }),
				columnNotNull: decimal('column_not_null', {
					precision: 45,
					scale: 3,
				}).notNull(),
				columnDefault: decimal('column_default', {
					precision: 10,
					scale: 0,
				}).default('100'),
				columnDefaultSql: decimal('column_default_sql', {
					precision: 10,
					scale: 0,
				}).default('101'),
			}),

			allDoubles: mysqlTable('all_doubles', {
				simple: double('simple'),
				columnNotNull: double('column_not_null').notNull(),
				columnDefault: double('column_default').default(100),
				columnDefaultSql: double('column_default_sql').default(101),
			}),

			allEnums: mysqlTable('all_enums', {
				simple: mysqlEnum('simple', ['hi', 'hello']),
			}),

			allEnums1: mysqlTable('all_enums1', {
				simple: mysqlEnum('simple', ['hi', 'hello']).default('hi'),
			}),

			allFloats: mysqlTable('all_floats', {
				columnNotNull: float('column_not_null').notNull(),
				columnDefault: float('column_default').default(100),
				columnDefaultSql: float('column_default_sql').default(101),
			}),

			allInts: mysqlTable('all_ints', {
				simple: int('simple'),
				columnNotNull: int('column_not_null').notNull(),
				columnDefault: int('column_default').default(100),
				columnDefaultSql: int('column_default_sql').default(101),

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free