mirror of
https://github.com/rbock/sqlpp11.git
synced 2024-12-25 07:20:50 +08:00
[-] static assert fix regarding connection type. Since now pooled_connections are allowed to process postgres-dynamic-queries
This commit is contained in:
parent
12a30f9112
commit
6906a8d2d2
@ -52,14 +52,14 @@ namespace sqlpp
|
||||
template <typename Database>
|
||||
constexpr auto dynamic_insert(const Database&) -> decltype(blank_insert_t<Database>())
|
||||
{
|
||||
static_assert(std::is_base_of<connection, Database>::value, "Invalid database parameter");
|
||||
static_assert(std::is_base_of<connection_base, Database>::value, "Invalid database parameter");
|
||||
return {blank_insert_t<Database>()};
|
||||
}
|
||||
|
||||
template <typename Database, typename Table>
|
||||
constexpr auto dynamic_insert_into(const Database&, Table table) -> decltype(blank_insert_t<Database>().into(table))
|
||||
{
|
||||
static_assert(std::is_base_of<connection, Database>::value, "Invalid database parameter");
|
||||
static_assert(std::is_base_of<connection_base, Database>::value, "Invalid database parameter");
|
||||
return {blank_insert_t<Database>().into(table)};
|
||||
}
|
||||
} // namespace postgresql
|
||||
|
@ -50,7 +50,7 @@ namespace sqlpp
|
||||
template <typename Database>
|
||||
auto dynamic_remove(const Database& /*unused*/) -> decltype(blank_remove_t<Database>())
|
||||
{
|
||||
static_assert(std::is_base_of<connection, Database>::value, "Invalid database parameter");
|
||||
static_assert(std::is_base_of<connection_base, Database>::value, "Invalid database parameter");
|
||||
return {blank_remove_t<Database>()};
|
||||
}
|
||||
|
||||
@ -58,7 +58,7 @@ namespace sqlpp
|
||||
auto dynamic_remove_from(const Database& /*unused*/, Table table)
|
||||
-> decltype(blank_remove_t<Database>().from(table))
|
||||
{
|
||||
static_assert(std::is_base_of<connection, Database>::value, "Invalid database parameter");
|
||||
static_assert(std::is_base_of<connection_base, Database>::value, "Invalid database parameter");
|
||||
return {blank_remove_t<Database>().from(table)};
|
||||
}
|
||||
} // namespace postgresql
|
||||
|
@ -163,7 +163,7 @@ namespace sqlpp
|
||||
"at least one returnable expression (e.g. a column) is required in returning");
|
||||
static_assert(decltype(_check_args(columns...))::value,
|
||||
"at least one argument is not a returnable expression in returning()");
|
||||
static_assert(std::is_base_of<connection, Database>::value, "Invalid database parameter");
|
||||
static_assert(std::is_base_of<connection_base, Database>::value, "Invalid database parameter");
|
||||
return {static_cast<const derived_statement_t<Policies>&>(*this),
|
||||
typename dynamic_returning_column_list<_database_t>::_data_t{columns...}};
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ namespace sqlpp
|
||||
constexpr auto dynamic_update(const Database&, Table table)
|
||||
-> decltype(blank_update_t<Database>().single_table(table))
|
||||
{
|
||||
static_assert(std::is_base_of<connection, Database>::value, "Invalid database parameter");
|
||||
static_assert(std::is_base_of<connection_base, Database>::value, "Invalid database parameter");
|
||||
return {blank_update_t<Database>().single_table(table)};
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user