column, placeholder and column_value generator progress
This commit is contained in:
@@ -5,29 +5,37 @@
|
||||
namespace matador::query::internal {
|
||||
|
||||
column_value_pair::column_value_pair(std::string name, utils::database_type value)
|
||||
: name_(std::move(name))
|
||||
: column_(std::move(name))
|
||||
, value_(std::move(value)) {
|
||||
}
|
||||
|
||||
column_value_pair::column_value_pair(const sql::column &col, utils::database_type value)
|
||||
: name_(col.name)
|
||||
: column_(col)
|
||||
, value_(std::move(value)) {
|
||||
}
|
||||
|
||||
column_value_pair::column_value_pair(const char *name, utils::database_type value)
|
||||
: name_(name)
|
||||
: column_(name)
|
||||
, value_(std::move(value)) {
|
||||
}
|
||||
|
||||
column_value_pair::column_value_pair( const char* name, utils::placeholder p )
|
||||
: name_(name)
|
||||
: column_(name)
|
||||
, value_(p) {}
|
||||
|
||||
const std::string &column_value_pair::name() const {
|
||||
return name_;
|
||||
const sql::column &column_value_pair::col() const {
|
||||
return column_;
|
||||
}
|
||||
|
||||
const std::variant<utils::placeholder, utils::database_type>& column_value_pair::value() const {
|
||||
return value_;
|
||||
}
|
||||
|
||||
bool operator==( const column_value_pair& lhs, const column_value_pair& rhs ) {
|
||||
return lhs.column_.equals(rhs.column_) && lhs.value_ == rhs.value_;
|
||||
}
|
||||
|
||||
bool operator!=( const column_value_pair& lhs, const column_value_pair& rhs ) {
|
||||
return !( lhs == rhs );
|
||||
}
|
||||
}
|
||||
@@ -304,7 +304,7 @@ query_set_part::query_set_part(const std::vector<column_value_pair>& key_value_p
|
||||
: query_part(sql::dialect_token::Set)
|
||||
, key_value_pairs_(key_value_pairs) {}
|
||||
|
||||
const std::vector<column_value_pair> &query_set_part::key_values() const
|
||||
const std::vector<column_value_pair> &query_set_part::column_values() const
|
||||
{
|
||||
return key_value_pairs_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user