MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / my_xpath_function

Function my_xpath_function

sql/item_xmlfunc.cc:1268–1286  ·  view source on GitHub ↗

Lookup a function by name SYNOPSYS Lookup a function by its name. RETURN Pointer to a MY_XPATH_FUNC variable on success. 0 - on failure. */

Source from the content-addressed store, hash-verified

1266
1267*/
1268MY_XPATH_FUNC *
1269my_xpath_function(const char *beg, const char *end)
1270{
1271 MY_XPATH_FUNC *k, *function_names;
1272 uint length= end-beg;
1273 switch (length)
1274 {
1275 case 1: return 0;
1276 case 3: function_names= my_func_names3; break;
1277 case 4: function_names= my_func_names4; break;
1278 case 5: function_names= my_func_names5; break;
1279 case 6: function_names= my_func_names6; break;
1280 default: function_names= my_func_names;
1281 }
1282 for (k= function_names; k->name; k++)
1283 if (k->create && length == k->length && !strncasecmp(beg, k->name, length))
1284 return k;
1285 return NULL;
1286}
1287
1288
1289/* Initialize a lex analizer token */

Callers 1

my_xpath_lex_scanFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected