Skip to content

fix win compile error if enable CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS #226

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions clickhouse/columns/string.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,20 @@ ColumnFixedString::ColumnFixedString(size_t n)
{
}

ColumnFixedString::ColumnFixedString(size_t n, const std::vector<std::string_view>& data)
: ColumnFixedString(n)
{
for (const auto& v : data)
Append(v);
}

ColumnFixedString::ColumnFixedString(size_t n, const std::vector<std::string>& data)
: ColumnFixedString(n)
{
for (const auto& v : data)
Append(v);
}

void ColumnFixedString::Append(std::string_view str) {
if (str.size() > string_size_) {
throw ValidationError("Expected string of length not greater than "
Expand Down
10 changes: 3 additions & 7 deletions clickhouse/columns/string.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,10 @@ class ColumnFixedString : public Column {

explicit ColumnFixedString(size_t n);

template <typename Values>
ColumnFixedString(size_t n, const Values & values)
: ColumnFixedString(n)
{
for (const auto & v : values)
Append(v);
}
explicit ColumnFixedString(size_t n, const std::vector<std::string_view>& data);

explicit ColumnFixedString(size_t n, const std::vector<std::string>& data);

/// Appends one element to the column.
void Append(std::string_view str);

Expand Down
2 changes: 0 additions & 2 deletions clickhouse/query.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

namespace clickhouse {

const std::string Query::default_query_id = {};

Query::Query()
{ }

Expand Down
2 changes: 1 addition & 1 deletion clickhouse/query.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class Query : public QueryEvents {
return *this;
}

static const std::string default_query_id;
static constexpr char default_query_id[] = "";

private:
void OnData(const Block& block) override {
Expand Down