mirror of
https://github.com/rbock/sqlpp11.git
synced 2024-11-15 20:31:16 +08:00
Merge branch 'release/0.57'
This commit is contained in:
commit
32abab9da4
@ -93,10 +93,6 @@ Branch / Compiler | clang-3.4, gcc-4.9, Xcode-7 | MSVC 2015/2017 | Test Cov
|
||||
master | [![Build Status](https://travis-ci.org/rbock/sqlpp11.svg?branch=master)](https://travis-ci.org/rbock/sqlpp11?branch=master) | [![Build status](https://ci.appveyor.com/api/projects/status/eid7mwqgavo0h61h/branch/master?svg=true)](https://ci.appveyor.com/project/rbock/sqlpp11/branch/master) | [![Coverage Status](https://coveralls.io/repos/rbock/sqlpp11/badge.svg?branch=master)](https://coveralls.io/r/rbock/sqlpp11?branch=master)
|
||||
develop | [![Build Status](https://travis-ci.org/rbock/sqlpp11.svg?branch=develop)](https://travis-ci.org/rbock/sqlpp11?branch=develop) | [![Build status](https://ci.appveyor.com/api/projects/status/eid7mwqgavo0h61h/branch/develop?svg=true)](https://ci.appveyor.com/project/rbock/sqlpp11/branch/develop) | [![Coverage Status](https://coveralls.io/repos/rbock/sqlpp11/badge.svg?branch=develop)](https://coveralls.io/r/rbock/sqlpp11?branch=develop)
|
||||
|
||||
MSVC 2017 is currently broken, see
|
||||
- https://github.com/rbock/sqlpp11/issues/181
|
||||
- https://developercommunity.visualstudio.com/content/problem/95983/c-vs152-153-regression-in-variadic-template-argume.html
|
||||
|
||||
Additional information available:
|
||||
---------------------------------
|
||||
Past talks about sqlpp11 and some coding concepts used within the library:
|
||||
|
@ -66,7 +66,12 @@ namespace sqlpp
|
||||
}
|
||||
|
||||
transaction_t(const transaction_t&) = delete;
|
||||
transaction_t(transaction_t&&) = default;
|
||||
transaction_t(transaction_t&& other)
|
||||
: _db(other._db), _report_unfinished_transaction(other._report_unfinished_transaction), _finished(other._finished)
|
||||
{
|
||||
other._finished = true;
|
||||
}
|
||||
|
||||
transaction_t& operator=(const transaction_t&) = delete;
|
||||
transaction_t& operator=(transaction_t&&) = delete;
|
||||
|
||||
|
@ -52,6 +52,27 @@ namespace sqlpp
|
||||
bool _is_null;
|
||||
};
|
||||
|
||||
template <typename Context, typename ValueType>
|
||||
struct serializer_t<Context, value_or_null_t<ValueType>>
|
||||
{
|
||||
using _serialize_check = consistent_t;
|
||||
using Operand = value_or_null_t<ValueType>;
|
||||
|
||||
static Context& _(const Operand& t, Context& context)
|
||||
{
|
||||
if (t._is_null)
|
||||
{
|
||||
context << "NULL";
|
||||
}
|
||||
else
|
||||
{
|
||||
serialize(wrap_operand_t<typename ValueType::_cpp_value_type>{t._value}, context);
|
||||
}
|
||||
|
||||
return context;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
auto value_or_null(T t) -> value_or_null_t<value_type_of<wrap_operand_t<T>>>
|
||||
{
|
||||
|
@ -33,6 +33,7 @@ function(test_constraint name pattern)
|
||||
set_property(TEST ${test} PROPERTY PASS_REGULAR_EXPRESSION ${pattern})
|
||||
endfunction()
|
||||
|
||||
# Compiling these is required to fail (testing some static_assert)
|
||||
test_constraint(count_of_count "count\\(\\) cannot be used on an aggregate function")
|
||||
test_constraint(max_of_max "max\\(\\) cannot be used on an aggregate function")
|
||||
test_constraint(no_conversion_operator_if_null_not_trivial "cannot convert|no viable conversion")
|
||||
|
@ -23,6 +23,11 @@
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* NOTE:
|
||||
* This code must not compile (it is used to test a static_assert)
|
||||
*/
|
||||
|
||||
#include "Sample.h"
|
||||
#include "MockDb.h"
|
||||
#include <sqlpp11/functions.h>
|
||||
|
@ -23,6 +23,11 @@
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* NOTE:
|
||||
* This code must not compile (it is used to test a static_assert)
|
||||
*/
|
||||
|
||||
#include "Sample.h"
|
||||
#include "MockDb.h"
|
||||
#include <sqlpp11/functions.h>
|
||||
|
@ -23,6 +23,11 @@
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* NOTE:
|
||||
* This code must not compile (it is used to test a static_assert)
|
||||
*/
|
||||
|
||||
#include "Sample.h"
|
||||
#include "MockDb.h"
|
||||
#include <sqlpp11/insert.h>
|
||||
|
@ -23,6 +23,11 @@
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* NOTE:
|
||||
* This code must not compile (it is used to test a static_assert)
|
||||
*/
|
||||
|
||||
#include "Sample.h"
|
||||
#include "MockDb.h"
|
||||
#include <sqlpp11/update.h>
|
||||
|
@ -23,6 +23,11 @@
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* NOTE:
|
||||
* This code must not compile (it is used to test the absence of a conversion operator)
|
||||
*/
|
||||
|
||||
#include "Sample.h"
|
||||
#include "MockDb.h"
|
||||
#include <sqlpp11/sqlpp11.h>
|
||||
|
@ -23,6 +23,11 @@
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* NOTE:
|
||||
* This code must not compile (it is used to test a static_assert)
|
||||
*/
|
||||
|
||||
#include "Sample.h"
|
||||
#include "MockDb.h"
|
||||
#include <sqlpp11/insert.h>
|
||||
|
Loading…
Reference in New Issue
Block a user