MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / appendSQLStringLiteral

Function appendSQLStringLiteral

src/Client/BuzzHouse/AST/SQLProtoStr.cpp:21–31  ·  view source on GitHub ↗

Append a single-quoted SQL string literal to ret, doubling any embedded single quotes.

Source from the content-addressed store, hash-verified

19
20/// Append a single-quoted SQL string literal to ret, doubling any embedded single quotes.
21static void appendSQLStringLiteral(String & ret, const String & s)
22{
23 ret += '\'';
24 for (const char c : s)
25 {
26 if (c == '\'')
27 ret += '\'';
28 ret += c;
29 }
30 ret += '\'';
31}
32
33CONV_FN(Expr, expr);
34CONV_FN(Select, select);

Callers 3

ClusterToStringFunction · 0.85
CONV_FNFunction · 0.85
BottomTypeNameToStringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected