preparations for object_generator (generating objects with attributes and constraints)
This commit is contained in:
@@ -101,11 +101,11 @@ bool field::is_null() const
|
||||
}
|
||||
|
||||
bool field::is_primary_key() const {
|
||||
return type_ == utils::constraints::PRIMARY_KEY;
|
||||
return type_ == utils::constraints::PrimaryKey;
|
||||
}
|
||||
|
||||
bool field::is_foreign_key() const {
|
||||
return type_ == utils::constraints::FOREIGN_KEY;
|
||||
return type_ == utils::constraints::ForeignKey;
|
||||
}
|
||||
|
||||
bool field::is_attribute() const {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
namespace matador::sql::internal {
|
||||
void query_result_pk_resolver::on_attribute(const char *id, const utils::value &x, const utils::field_attributes &attr) {
|
||||
if (is_constraint_set(attr.options(), utils::constraints::PRIMARY_KEY)) {
|
||||
if (is_constraint_set(attr.options(), utils::constraints::PrimaryKey)) {
|
||||
if (x.is_integer()) {
|
||||
uint64_t val;
|
||||
utils::data_type_traits<uint64_t>::read_value(reader_, id, column_index_++, val);
|
||||
|
||||
Reference in New Issue
Block a user