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

Function writeQueryAroundTheError

src/Parsers/parseQuery.cpp:128–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126
127
128void writeQueryAroundTheError(
129 WriteBuffer & out,
130 const char * begin,
131 const char * end,
132 bool hilite,
133 const Token * positions_to_hilite,
134 size_t num_positions_to_hilite)
135{
136 if (hilite)
137 {
138 out << ":\n\n";
139 writeQueryWithHighlightedErrorPositions(out, begin, end, positions_to_hilite, num_positions_to_hilite);
140 out << "\n\n";
141 }
142 else
143 {
144 if (num_positions_to_hilite)
145 out << ": " << std::string(positions_to_hilite[0].begin, std::min(SHOW_CHARS_ON_SYNTAX_ERROR, end - positions_to_hilite[0].begin)) << ". ";
146 }
147}
148
149
150void writeCommonErrorMessage(

Callers 3

getSyntaxErrorMessageFunction · 0.85
getLexicalErrorMessageFunction · 0.85

Calls 2

minFunction · 0.50

Tested by

no test coverage detected