30 lines
559 B
C++
30 lines
559 B
C++
#ifndef QUERY_TABLE_HPP
|
|
#define QUERY_TABLE_HPP
|
|
|
|
#include <typeindex>
|
|
#include <string>
|
|
|
|
namespace matador::sql {
|
|
|
|
struct table
|
|
{
|
|
// std::type_index index;
|
|
std::string name;
|
|
std::string alias;
|
|
|
|
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)) {}
|
|
|
|
table& as(const std::string &a) {
|
|
alias = a;
|
|
return *this;
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
#endif //QUERY_TABLE_HPP
|