update.test.ts — drizzle-orm Source File
Architecture documentation for update.test.ts, a typescript file in the drizzle-orm codebase. 2 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 879aed6e_90ff_5435_e0c6_ac2eb984dbb3["update.test.ts"] 293f011b_cdb8_71ff_a37a_bbe21603eeb7["enforce-update-with-where.ts"] 879aed6e_90ff_5435_e0c6_ac2eb984dbb3 --> 293f011b_cdb8_71ff_a37a_bbe21603eeb7 a6502592_fbe6_a8ea_611a_467a0595ee8f["rule-tester"] 879aed6e_90ff_5435_e0c6_ac2eb984dbb3 --> a6502592_fbe6_a8ea_611a_467a0595ee8f style 879aed6e_90ff_5435_e0c6_ac2eb984dbb3 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
// @ts-ignore
import { RuleTester } from '@typescript-eslint/rule-tester';
import myRule from '../src/enforce-update-with-where';
const parserResolver = require.resolve('@typescript-eslint/parser');
const ruleTester = new RuleTester({
parser: parserResolver,
});
ruleTester.run('enforce update with where (default options)', myRule, {
valid: [
'const a = db.update({}).set().where({});',
'const a = db.update();',
'update()',
`db
.update()
.set()
.where()`,
`dataSource
.update()
.set()
.where()`,
`this
.dataSource
.update()
.set()
.where()`,
],
invalid: [
{
code: 'db.update({}).set()',
errors: [{ messageId: 'enforceUpdateWithWhere' }],
},
{
code: 'this.database.db.update({}).set()',
errors: [{ messageId: 'enforceUpdateWithWhere' }],
},
{
code: 'const a = await db.update({}).set()',
errors: [{ messageId: 'enforceUpdateWithWhere' }],
},
{
code: 'const a = db.update({}).set',
errors: [{ messageId: 'enforceUpdateWithWhere' }],
},
{
code: `const a = database
.update({})
.set()`,
errors: [{ messageId: 'enforceUpdateWithWhere' }],
},
{
code: `const a = getDatabase().update({}).set()`,
errors: [{ messageId: 'enforceUpdateWithWhere', data: { drizzleObjName: 'getDatabase(...)' } }],
},
{
code: `const a = getDatabase(arg1, arg2).update({}).set()`,
errors: [{ messageId: 'enforceUpdateWithWhere', data: { drizzleObjName: 'getDatabase(...)' } }],
// ... (218 more lines)
Domain
Dependencies
- enforce-update-with-where.ts
- rule-tester
Source
Frequently Asked Questions
What does update.test.ts do?
update.test.ts is a source file in the drizzle-orm codebase, written in typescript. It belongs to the DrizzleORM domain.
What does update.test.ts depend on?
update.test.ts imports 2 module(s): enforce-update-with-where.ts, rule-tester.
Where is update.test.ts in the architecture?
update.test.ts is located at eslint-plugin-drizzle/tests/update.test.ts (domain: DrizzleORM, directory: eslint-plugin-drizzle/tests).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free