MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / calls

Function calls

__tests__/java-class-visibility.test.ts:83–89  ·  view source on GitHub ↗

The qualified names `calls` edges from ` ::go` reach.

(pkg: string, cls: string)

Source from the content-addressed store, hash-verified

81
82/** The qualified names `calls` edges from `<cls>::go` reach. */
83function calls(pkg: string, cls: string): string[] {
84 const db = (cg as unknown as { db: { getDb(): { prepare(sql: string): { all(...a: unknown[]): Array<{ q: string }> } } } }).db;
85 return db.getDb().prepare(`
86 SELECT t.qualified_name q FROM edges e
87 JOIN nodes s ON s.id = e.source JOIN nodes t ON t.id = e.target
88 WHERE e.kind = 'calls' AND s.qualified_name = ?`).all(`${pkg}::${cls}::go`).map((r) => r.q).sort();
89}
90
91describe('a Java call reaches the class its file can see', () => {
92 it('#2976: a static call and a chained new under a wildcard import', () => {

Callers 1

Calls 4

mapMethod · 0.80
getDbMethod · 0.80
allMethod · 0.65
prepareMethod · 0.65

Tested by

no test coverage detected