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

Function my_xpath_parse

sql/item_xmlfunc.cc:2562–2574  ·  view source on GitHub ↗

Scan an XPath expression SYNOPSYS Scan xpath expression. The expression is returned in xpath->expr. RETURN 1 - success 0 - failure */

Source from the content-addressed store, hash-verified

2560 0 - failure
2561*/
2562static int
2563my_xpath_parse(MY_XPATH *xpath, const char *str, const char *strend)
2564{
2565 my_xpath_lex_init(&xpath->query, str, strend);
2566 my_xpath_lex_init(&xpath->prevtok, str, strend);
2567 my_xpath_lex_scan(xpath, &xpath->lasttok, str, strend);
2568
2569 xpath->rootelement= new Item_nodeset_func_rootelement(xpath->pxml);
2570
2571 return
2572 my_xpath_parse_Expr(xpath) &&
2573 my_xpath_parse_term(xpath, MY_XPATH_LEX_EOF);
2574}
2575
2576
2577void Item_xml_str_func::parse_xpath(Item* xpath_expr)

Callers 1

parse_xpathMethod · 0.85

Calls 3

my_xpath_lex_initFunction · 0.85
my_xpath_lex_scanFunction · 0.85
my_xpath_parse_termFunction · 0.85

Tested by

no test coverage detected