0
0
mirror of https://github.com/rbock/sqlpp11.git synced 2024-11-16 21:04:15 +08:00

Revert "Add operator() to allow query with callback"

This reverts commit f3b9442c9f.
This commit is contained in:
Frank Park 2017-04-11 14:55:09 -04:00
parent f3b9442c9f
commit 510f1f83c4

View File

@ -57,18 +57,6 @@ namespace sqlpp
} }
} }
pool_connection(const pool_connection&) = delete;
pool_connection(pool_connection&& other) : _impl(std::move(other._impl)), origin(other.origin)
{
}
pool_connection& operator=(const pool_connection&) = delete;
pool_connection& operator=(pool_connection&& other)
{
_impl = std::move(other._impl);
origin = other.origin;
return *this;
}
template<typename... Args> template<typename... Args>
auto operator()(Args&&... args) -> decltype(_impl->args(std::forward<Args>(args)...)) auto operator()(Args&&... args) -> decltype(_impl->args(std::forward<Args>(args)...))
{ {
@ -93,10 +81,16 @@ namespace sqlpp
return _impl->prepare(t); return _impl->prepare(t);
} }
template<typename Query, typename Lambda> pool_connection(const pool_connection&) = delete;
void operator()(Query query, Lambda callback) pool_connection(pool_connection&& other) : _impl(std::move(other._impl)), origin(other.origin)
{ {
query_task<Connection_pool, Query, Lambda>(*origin, query, callback)(); }
pool_connection& operator=(const pool_connection&) = delete;
pool_connection& operator=(pool_connection&& other)
{
_impl = std::move(other._impl);
origin = other.origin;
return *this;
} }
}; };
} }