collection has-many-to-many resolve progress
This commit is contained in:
@@ -187,10 +187,7 @@ utils::result<object::object_ptr<Type>, utils::error> statement::fetch_one() {
|
||||
});
|
||||
auto first = records.begin();
|
||||
if (first == records.end()) {
|
||||
return utils::failure(utils::error{
|
||||
error_code::FETCH_FAILED,
|
||||
"Failed to find entity."
|
||||
});
|
||||
return utils::failure(utils::error{error_code::FETCH_FAILED,"Failed to find entity."});
|
||||
}
|
||||
|
||||
return utils::ok(first.optr());
|
||||
@@ -198,6 +195,7 @@ utils::result<object::object_ptr<Type>, utils::error> statement::fetch_one() {
|
||||
|
||||
template<class Type>
|
||||
utils::result<std::shared_ptr<Type>, utils::error> statement::fetch_one_raw() {
|
||||
std::cout << statement_proxy_->sql() << std::endl;
|
||||
auto result = statement_proxy_->fetch(*bindings_);
|
||||
if (!result.is_ok()) {
|
||||
return utils::failure(result.err());
|
||||
|
||||
Reference in New Issue
Block a user