updateRule.create() — drizzle-orm Function Reference
Architecture documentation for the updateRule.create() function in enforce-update-with-where.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD 336f07de_9564_2758_69b1_8d49b0d69aad["updateRule.create()"] 293f011b_cdb8_71ff_a37a_bbe21603eeb7["enforce-update-with-where.ts"] 336f07de_9564_2758_69b1_8d49b0d69aad -->|defined in| 293f011b_cdb8_71ff_a37a_bbe21603eeb7 a580025e_b3a5_ddc6_91a8_9e031d9d7cf0["isDrizzleObj()"] 336f07de_9564_2758_69b1_8d49b0d69aad -->|calls| a580025e_b3a5_ddc6_91a8_9e031d9d7cf0 7089b0f7_fb5d_1f9c_807f_239903f9a3f3["resolveMemberExpressionPath()"] 336f07de_9564_2758_69b1_8d49b0d69aad -->|calls| 7089b0f7_fb5d_1f9c_807f_239903f9a3f3 style 336f07de_9564_2758_69b1_8d49b0d69aad fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
eslint-plugin-drizzle/src/enforce-update-with-where.ts lines 33–59
create(context, options) {
return {
MemberExpression: (node) => {
if (node.property.type === 'Identifier') {
if (
lastNodeName !== 'where'
&& node.property.name === 'set'
&& node.object.type === 'CallExpression'
&& node.object.callee.type === 'MemberExpression'
&& node.object.callee.property.type === 'Identifier'
&& node.object.callee.property.name === 'update'
&& isDrizzleObj(node.object.callee, options)
) {
context.report({
node,
messageId: 'enforceUpdateWithWhere',
data: {
drizzleObjName: resolveMemberExpressionPath(node.object.callee),
},
});
}
lastNodeName = node.property.name;
}
return;
},
};
},
Domain
Subdomains
Source
Frequently Asked Questions
What does updateRule.create() do?
updateRule.create() is a function in the drizzle-orm codebase, defined in eslint-plugin-drizzle/src/enforce-update-with-where.ts.
Where is updateRule.create() defined?
updateRule.create() is defined in eslint-plugin-drizzle/src/enforce-update-with-where.ts at line 33.
What does updateRule.create() call?
updateRule.create() calls 2 function(s): isDrizzleObj, resolveMemberExpressionPath.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free