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

Function resolve_sql_func_name

internal/cbm/extract_defs.c:324–335  ·  view source on GitHub ↗

SQL: resolve create_function / create_table / create_view name. The name sits on an object_reference; for a schema-qualified name (schema.table) take the last identifier (the table), not the first (the schema).

Source from the content-addressed store, hash-verified

322// on an object_reference; for a schema-qualified name (schema.table) take the
323// last identifier (the table), not the first (the schema).
324static TSNode resolve_sql_func_name(TSNode node) {
325 TSNode obj_ref = cbm_find_child_by_kind(node, "object_reference");
326 if (!ts_node_is_null(obj_ref)) {
327 bool found = false;
328 TSNode empty = {0};
329 TSNode id = sql_last_identifier(obj_ref, empty, &found);
330 if (found) {
331 return id;
332 }
333 }
334 return cbm_find_child_by_kind(node, "identifier");
335}
336
337// Zig: resolve test_declaration name from string→string_content.
338static TSNode resolve_zig_test_name(TSNode node) {

Callers 3

Calls 2

cbm_find_child_by_kindFunction · 0.85
sql_last_identifierFunction · 0.85

Tested by

no test coverage detected