MCPcopy Create free account
hub / github.com/ByConity/ByConity / processTextAsSingleQuery

Method processTextAsSingleQuery

programs/client/Client.cpp:1616–1646  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1614 }
1615
1616 void processTextAsSingleQuery(const String & text_)
1617 {
1618 full_query = text_;
1619
1620 /// Some parts of a query (result output and formatting) are executed
1621 /// client-side. Thus we need to parse the query.
1622 const char * begin = full_query.data();
1623 parsed_query = parseQuery(begin, begin + full_query.size(), false);
1624
1625 if (!parsed_query)
1626 return;
1627
1628 // An INSERT query may have the data that follow query text. Remove the
1629 /// Send part of query without data, because data will be sent separately.
1630 auto * insert = parsed_query->as<ASTInsertQuery>();
1631 if (insert && insert->data)
1632 {
1633 query_to_send = full_query.substr(0, insert->data - full_query.data());
1634 }
1635 else
1636 {
1637 query_to_send = full_query;
1638 }
1639
1640 processParsedSingleQuery();
1641
1642 if (have_error)
1643 {
1644 reportQueryError();
1645 }
1646 }
1647
1648 // Parameters are in global variables:
1649 // 'parsed_query' -- the query AST,

Callers

nothing calls this directly

Calls 3

parseQueryFunction · 0.85
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected