Skip to content

Commit 2332c3f

Browse files
committed
Allow either *char or Query as BeginInsert arg
To allow the user to configure other bits of the query, like settings.
1 parent b8544bb commit 2332c3f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

clickhouse/client.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,8 +1218,8 @@ void Client::Insert(const std::string& table_name, const std::string& query_id,
12181218
impl_->Insert(table_name, query_id, block);
12191219
}
12201220

1221-
Block Client::BeginInsert(const std::string& query) {
1222-
return impl_->BeginInsert(Query(query));
1221+
Block Client::BeginInsert(const Query& query) {
1222+
return impl_->BeginInsert(query);
12231223
}
12241224

12251225
Block Client::BeginInsert(const std::string& query, const std::string& query_id) {

clickhouse/client.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ class Client {
274274
void Insert(const std::string& table_name, const std::string& query_id, const Block& block);
275275

276276
/// Start an \p INSERT statement, insert batches of data, then finish the insert.
277-
Block BeginInsert(const std::string& query);
277+
Block BeginInsert(const Query& query);
278278
Block BeginInsert(const std::string& query, const std::string& query_id);
279279

280280
/// Insert data using a \p block returned by \p BeginInsert.

0 commit comments

Comments
 (0)