has one progress
This commit is contained in:
@@ -16,7 +16,8 @@ namespace matador::sql::internal {
|
||||
|
||||
class query_result_pk_resolver final {
|
||||
public:
|
||||
explicit query_result_pk_resolver(query_result_reader &reader) : reader_(reader) {}
|
||||
explicit query_result_pk_resolver(query_result_reader &reader)
|
||||
: reader_(reader) {}
|
||||
|
||||
template<class Type>
|
||||
utils::identifier discover(Type &obj) {
|
||||
@@ -38,16 +39,22 @@ public:
|
||||
utils::data_type_traits<ValueType>::read_value(reader_, id, column_index_++, value, attr.size());
|
||||
pk_ = value;
|
||||
}
|
||||
void on_revision(const char * /*id*/, uint64_t &/*rev*/) { ++column_index_; }
|
||||
void on_revision(const char * /*id*/, uint64_t &/*rev*/) {
|
||||
++column_index_;
|
||||
}
|
||||
|
||||
template < class Type >
|
||||
void on_attribute(const char * /*id*/, Type &/*x*/, const utils::field_attributes &/*attr*/) { ++column_index_; }
|
||||
void on_attribute(const char *id, const utils::value &x, const utils::field_attributes &attr);
|
||||
|
||||
template < class Pointer >
|
||||
void on_belongs_to(const char * /*id*/, Pointer &/*x*/, const utils::foreign_attributes &attr) { on_foreign_key<typename Pointer::value_type>(attr.fetch() ); }
|
||||
void on_belongs_to(const char * /*id*/, Pointer &/*x*/, const utils::foreign_attributes &attr) {
|
||||
on_foreign_key<typename Pointer::value_type>(attr.fetch() );
|
||||
}
|
||||
template < class Pointer >
|
||||
void on_has_one(const char * /*id*/, Pointer &/*x*/, const utils::foreign_attributes &attr) { on_foreign_key<typename Pointer::value_type>(attr.fetch() ); }
|
||||
void on_has_one(const char * /*id*/, Pointer &/*x*/, const char * /*join_column*/, const utils::foreign_attributes &attr) {
|
||||
on_foreign_key<typename Pointer::value_type>(attr.fetch() );
|
||||
}
|
||||
|
||||
template<class ContainerType>
|
||||
static void on_has_many(const char * /*id*/, ContainerType &, const char *, const utils::foreign_attributes &/*attr*/) {}
|
||||
|
||||
Reference in New Issue
Block a user