MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / extract_sql_callee

Function extract_sql_callee

internal/cbm/extract_calls.c:1080–1090  ·  view source on GitHub ↗

SQL: an `invocation` node's callee is nested object_reference > `name` field (the same shape as a create_function's name).

Source from the content-addressed store, hash-verified

1078// SQL: an `invocation` node's callee is nested object_reference > `name` field
1079// (the same shape as a create_function's name).
1080static char *extract_sql_callee(CBMArena *a, TSNode node, const char *source, const char *nk) {
1081 if (strcmp(nk, "invocation") != 0) {
1082 return NULL;
1083 }
1084 TSNode oref = cbm_find_child_by_kind(node, "object_reference");
1085 if (ts_node_is_null(oref)) {
1086 return NULL;
1087 }
1088 TSNode nm = ts_node_child_by_field_name(oref, TS_FIELD("name"));
1089 return ts_node_is_null(nm) ? NULL : cbm_node_text(a, nm, source);
1090}
1091
1092// COBOL: a `CALL 'HELPER'` is a call_statement whose `x` field is a string
1093// literal naming the called program; the callee is that string sans quotes.

Callers 1

Calls 2

cbm_find_child_by_kindFunction · 0.85
cbm_node_textFunction · 0.85

Tested by

no test coverage detected