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

Fixed a bunch of bugs found while adjusting the mysql connector

This commit is contained in:
rbock 2014-02-16 13:16:09 +01:00
parent 8b37626b89
commit 1d5ee2068d
6 changed files with 9 additions and 5 deletions

View File

@ -57,7 +57,7 @@ namespace sqlpp
};
};
using _table_set = ::sqlpp::detail::type_set<>; // FIXME: Can selects leak tables here?
using _table_set = typename Select::_table_set;
any_t(Select select):
_select(select)

View File

@ -175,7 +175,7 @@ namespace sqlpp
template<typename Db>
auto _prepare(Db& db) const
-> prepared_remove_t<Database, remove_t>
-> prepared_remove_t<Db, remove_t>
{
//static_assert(detail::check_remove_t<Policies...>::value, "Cannot run this remove expression");
return {{}, db.prepare_remove(*this)};
@ -195,7 +195,7 @@ namespace sqlpp
static Context& _(const T& t, Context& context)
{
context << "DELETE FROM";
context << "DELETE FROM ";
interpret(t._table, context);
interpret(t._using, context);
interpret(t._where, context);

View File

@ -27,8 +27,8 @@
#ifndef SQLPP_SOME_H
#define SQLPP_SOME_H
#include <sstream>
#include <sqlpp11/boolean.h>
#include <sqlpp11/detail/type_set.h>
namespace sqlpp
{
@ -56,6 +56,7 @@ namespace sqlpp
const T& operator()() const { return some; }
};
};
using _table_set = typename Select::_table_set;
some_t(Select select):
_select(select)

View File

@ -178,7 +178,7 @@ namespace sqlpp
template<typename Db>
auto _prepare(Db& db) const
-> prepared_update_t<Database, update_t>
-> prepared_update_t<Db, update_t>
{
return {{}, db.prepare_update(*this)};
}

View File

@ -29,6 +29,8 @@
#include <sqlpp11/type_traits.h>
#include <sqlpp11/detail/logic.h>
#include <sqlpp11/vendor/assignment.h>
#include <sqlpp11/vendor/interpretable_list.h>
#include <sqlpp11/vendor/interpret_tuple.h>
#include <sqlpp11/vendor/insert_value.h>
#include <sqlpp11/vendor/simple_column.h>

View File

@ -39,6 +39,7 @@ namespace sqlpp
struct is_null_t: public boolean::template operators<is_null_t<NotInverted, Operand>>
{
static constexpr bool _inverted = not NotInverted;
using _table_set = typename Operand::_table_set;
struct _value_type: public boolean
{