implemented lazy loading for object_ptr and belongs_to
This commit is contained in:
@@ -109,7 +109,9 @@ utils::result<std::unique_ptr<sql::query_result_impl>, utils::error> postgres_co
|
||||
prototype.at(i).change_type(type);
|
||||
}
|
||||
|
||||
return utils::ok(std::make_unique<sql::query_result_impl>(std::make_unique<postgres_result_reader>(res), prototype));
|
||||
return utils::ok(std::make_unique<sql::query_result_impl>(std::make_unique<postgres_result_reader>(res),
|
||||
std::move(prototype),
|
||||
context.resolver_factory));
|
||||
}
|
||||
|
||||
std::string postgres_connection::generate_statement_name(const sql::query_context &query) {
|
||||
|
||||
@@ -60,7 +60,7 @@ utils::result<std::unique_ptr<sql::query_result_impl>, utils::error> postgres_st
|
||||
return utils::failure(make_error(sql::error_code::FETCH_FAILED, res, db_, "Failed to fetch statement", query_.sql));
|
||||
}
|
||||
|
||||
return utils::ok(std::make_unique<sql::query_result_impl>(std::make_unique<postgres_result_reader>(res), query_.prototype));
|
||||
return utils::ok(std::make_unique<sql::query_result_impl>(std::make_unique<postgres_result_reader>(res), query_.prototype, query_.resolver_factory));
|
||||
}
|
||||
|
||||
std::unique_ptr<utils::attribute_writer> postgres_statement::create_binder() const {
|
||||
|
||||
Reference in New Issue
Block a user