MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / isDrizzleObj

Function isDrizzleObj

oxlint-plugin-drizzle.js:21–35  ·  view source on GitHub ↗
(node, drizzleObjectName)

Source from the content-addressed store, hash-verified

19}
20
21function isDrizzleObj(node, drizzleObjectName) {
22 // Check the object the method is called on (e.g. db in db.delete, ctx.db in ctx.db.delete)
23 const objectPath = resolveMemberPath(node.object);
24 if (objectPath && isDrizzleObjName(objectPath, drizzleObjectName)) {
25 return true;
26 }
27 // Also check the callee for patterns like getDb().delete(...)
28 if (node.object.type === 'CallExpression') {
29 const calleePath = resolveMemberPath(node.object.callee);
30 if (calleePath && isDrizzleObjName(calleePath, drizzleObjectName)) {
31 return true;
32 }
33 }
34 return false;
35}
36
37function hasWhereInChain(node) {
38 let current = node.parent;

Callers 1

MemberExpressionFunction · 0.85

Calls 2

resolveMemberPathFunction · 0.85
isDrizzleObjNameFunction · 0.85

Tested by

no test coverage detected