Skip to content

Commit 236c3d0

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 02902dd commit 236c3d0

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

clickhouse/client.cpp

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

1223-
Block Client::BeginInsert(const std::string& query) {
1224-
return impl_->BeginInsert(Query(query));
1223+
Block Client::BeginInsert(const Query& query) {
1224+
return impl_->BeginInsert(query);
12251225
}
12261226

12271227
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)