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).
| 322 | // on an object_reference; for a schema-qualified name (schema.table) take the |
| 323 | // last identifier (the table), not the first (the schema). |
| 324 | static 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. |
| 338 | static TSNode resolve_zig_test_name(TSNode node) { |
no test coverage detected