added all value constructor to class table
This commit is contained in:
parent
27f6c81da2
commit
43d2f81b95
|
|
@ -14,13 +14,22 @@ struct table
|
|||
table(const char *name, std::string as = "") // NOLINT(*-explicit-constructor)
|
||||
: name(name), alias(std::move(as)) {}
|
||||
table(std::string name, std::string as = "") // NOLINT(*-explicit-constructor)
|
||||
: name(std::move(name)), alias(std::move(as)) {}
|
||||
: name(std::move(name))
|
||||
, alias(std::move(as)) {}
|
||||
table(std::string name, std::string as, const std::vector<column> &columns)
|
||||
: name(std::move(name))
|
||||
, alias(std::move(as))
|
||||
, columns(columns) {}
|
||||
|
||||
table& as(const std::string &a) {
|
||||
alias = a;
|
||||
return *this;
|
||||
}
|
||||
|
||||
[[nodiscard]] table as(const std::string &a) const {
|
||||
return { name, a, columns };
|
||||
}
|
||||
|
||||
std::string name;
|
||||
std::string alias;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue