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

Function hasWhereInChain

oxlint-plugin-drizzle.js:37–57  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

35}
36
37function hasWhereInChain(node) {
38 let current = node.parent;
39 while (current) {
40 if (
41 current.type === 'MemberExpression' &&
42 current.property.type === 'Identifier' &&
43 current.property.name === 'where'
44 ) {
45 return true;
46 }
47 if (
48 current.type !== 'CallExpression' &&
49 current.type !== 'MemberExpression' &&
50 current.type !== 'AwaitExpression'
51 ) {
52 break;
53 }
54 current = current.parent;
55 }
56 return false;
57}
58
59function resolveMemberExpressionPath(node) {
60 let objectExpression = node.object;

Callers 1

MemberExpressionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected