tidb-serverless.test.ts — drizzle-orm Source File
Architecture documentation for tidb-serverless.test.ts, a typescript file in the drizzle-orm codebase. 7 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR a85471b4_4622_95c2_3407_f1b229a6887c["tidb-serverless.test.ts"] bcd266b2_f6a8_0abb_2a24_40a68c6f8cc5["mysql-common.ts"] a85471b4_4622_95c2_3407_f1b229a6887c --> bcd266b2_f6a8_0abb_2a24_40a68c6f8cc5 e9ea1e58_4116_09ab_4725_c9e3a74adeb7["tests"] a85471b4_4622_95c2_3407_f1b229a6887c --> e9ea1e58_4116_09ab_4725_c9e3a74adeb7 c440e00a_e318_94ac_100c_9843a182c7a4["config"] a85471b4_4622_95c2_3407_f1b229a6887c --> c440e00a_e318_94ac_100c_9843a182c7a4 b02a037b_0c99_6322_ae9e_c7e11ee45713["serverless"] a85471b4_4622_95c2_3407_f1b229a6887c --> b02a037b_0c99_6322_ae9e_c7e11ee45713 d1917440_17cd_2cb9_1dc8_53f50eaf9f58["tidb-serverless"] a85471b4_4622_95c2_3407_f1b229a6887c --> d1917440_17cd_2cb9_1dc8_53f50eaf9f58 8d35eaf2_a542_cfd4_fa1a_fafca0f02686["vitest"] a85471b4_4622_95c2_3407_f1b229a6887c --> 8d35eaf2_a542_cfd4_fa1a_fafca0f02686 b1b80dbd_53d7_4352_1b6e_ec8e339ed197["common.ts"] a85471b4_4622_95c2_3407_f1b229a6887c --> b1b80dbd_53d7_4352_1b6e_ec8e339ed197 style a85471b4_4622_95c2_3407_f1b229a6887c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import 'dotenv/config';
import { connect } from '@tidbcloud/serverless';
import type { TiDBServerlessDatabase } from 'drizzle-orm/tidb-serverless';
import { drizzle } from 'drizzle-orm/tidb-serverless';
import { beforeAll, beforeEach } from 'vitest';
import { skipTests } from '~/common.ts';
import { tests } from './mysql-common.ts';
const ENABLE_LOGGING = false;
let db: TiDBServerlessDatabase;
beforeAll(async () => {
const connectionString = process.env['TIDB_CONNECTION_STRING'];
if (!connectionString) {
throw new Error('TIDB_CONNECTION_STRING is not set');
}
const client = connect({ url: connectionString });
db = drizzle(client!, { logger: ENABLE_LOGGING });
});
beforeEach((ctx) => {
ctx.mysql = {
db,
};
});
skipTests([
'mySchema :: select with group by as field',
'mySchema :: delete with returning all fields',
'mySchema :: update with returning partial',
'mySchema :: delete returning sql',
'mySchema :: insert returning sql',
'test $onUpdateFn and $onUpdate works updating',
'set operations (mixed all) as function with subquery',
'set operations (union) from query builder with subquery',
'join on aliased sql from with clause',
'join on aliased sql from select',
'select from raw sql with joins',
'select from raw sql',
'having',
'select count()',
'with ... select',
'insert via db.execute w/ query builder',
'insert via db.execute + select via db.execute',
'select with group by as sql',
'select with group by as field',
'insert many with returning',
'delete with returning partial',
'delete with returning all fields',
'update with returning partial',
'update with returning all fields',
'update returning sql',
'delete returning sql',
'insert returning sql',
// not supported
'set operations (except all) as function',
'set operations (except all) from query builder',
'set operations (intersect all) as function',
'set operations (intersect all) from query builder',
'set operations (union all) as function',
'tc config for datetime',
'select iterator w/ prepared statement',
'select iterator',
'transaction',
'transaction with options (set isolationLevel)',
'Insert all defaults in multiple rows',
'Insert all defaults in 1 row',
'$default with empty array',
'utc config for datetime',
]);
tests();
Domain
Dependencies
- common.ts
- config
- mysql-common.ts
- serverless
- tests
- tidb-serverless
- vitest
Source
Frequently Asked Questions
What does tidb-serverless.test.ts do?
tidb-serverless.test.ts is a source file in the drizzle-orm codebase, written in typescript. It belongs to the DrizzleORM domain.
What does tidb-serverless.test.ts depend on?
tidb-serverless.test.ts imports 7 module(s): common.ts, config, mysql-common.ts, serverless, tests, tidb-serverless, vitest.
Where is tidb-serverless.test.ts in the architecture?
tidb-serverless.test.ts is located at integration-tests/tests/mysql/tidb-serverless.test.ts (domain: DrizzleORM, directory: integration-tests/tests/mysql).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free