collection_resolver progress
This commit is contained in:
@@ -64,7 +64,6 @@ public:
|
||||
|
||||
friend std::ostream& operator<<(std::ostream &out, const field &col);
|
||||
|
||||
private:
|
||||
template<class Operator>
|
||||
void process(Operator &op) {
|
||||
op.on_attribute(name_.c_str(), value_, { value_.size(), type_ } );
|
||||
|
||||
@@ -128,8 +128,8 @@ public:
|
||||
template<class CollectionType>
|
||||
void on_has_many(const char * /*id*/, CollectionType &cont, const char *join_column, const utils::foreign_attributes &attr, std::enable_if_t<object::is_object_ptr<typename CollectionType::value_type>::value> * = nullptr) {
|
||||
using value_type = typename CollectionType::value_type::value_type;
|
||||
auto resolver = resolver_->collection_resolver<typename CollectionType::value_type>(result_type_, join_column);
|
||||
auto object_resolver = resolver_->object_resolver<value_type>();
|
||||
auto resolver = resolver_->collection_resolver<typename CollectionType::value_type>(result_type_, join_column);
|
||||
|
||||
std::vector<typename CollectionType::value_type> objects;
|
||||
if (attr.fetch() == utils::fetch_type::Lazy) {
|
||||
|
||||
@@ -44,6 +44,8 @@ public:
|
||||
|
||||
[[nodiscard]] const field& at(const std::string &name) const;
|
||||
[[nodiscard]] const field& at(size_t index) const;
|
||||
[[nodiscard]] field& at(const std::string &name);
|
||||
[[nodiscard]] field& at(size_t index);
|
||||
template<class Type>
|
||||
std::optional<Type> at(const std::string &name) const {
|
||||
return at(name).as<Type>();
|
||||
|
||||
Reference in New Issue
Block a user