ClickHouse/src/Parsers/toOneLineQuery.h
Azat Khuzhin c29768325c Print query in one line on fatal errors
executeQuery() logging query without new lines in SQL, and it is useful,
since you can grep and see the whole query (usually).

So let's use the same in fatal error handler to make CI reports more
informative.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-06-03 18:55:53 +03:00

17 lines
386 B
C++

#pragma once
#include <base/types.h>
namespace DB
{
/// Removes new lines from query.
///
/// But with some care:
/// - don't join lines inside non-whitespace tokens (e.g. multiline string literals)
/// - don't join line after comment (because it can be single-line comment).
/// All other whitespaces replaced to a single whitespace.
String toOneLineQuery(const String & query);
}