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

Merge tag '0.25' into develop

Fixes for gcc-4.8 under cygwin 64bit
eval commodity function for sending commands to the database and getting the return value back
Added alias method to wrapped values so that you can select constant values
This commit is contained in:
rbock 2014-08-21 11:03:51 +02:00
commit 9f35e33151
4 changed files with 16 additions and 2 deletions

View File

@ -23,6 +23,10 @@
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
cmake_minimum_required(VERSION 2.6) cmake_minimum_required(VERSION 2.6)
# Cygwin does not define WIN32 and warn if not use with this flag
set(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required
project (sqlpp11) project (sqlpp11)
enable_testing() enable_testing()

View File

@ -11,6 +11,10 @@ Upcoming talks at
* MeetingC++ (Berlin, Germany): http://meetingcpp.com/index.php/mcpp2014.html * MeetingC++ (Berlin, Germany): http://meetingcpp.com/index.php/mcpp2014.html
* 2014-12-05:http://meetingcpp.com/index.php/tv14/items/4.html * 2014-12-05:http://meetingcpp.com/index.php/tv14/items/4.html
You can contact me
* by posting issues at https://github.com/rbock/sqlpp11/issues
* or via email at rbock at eudoxos dot de
Motivation: Motivation:
----------- -----------
SQL and C++ are both strongly typed languages. Still, most C/C++ interfaces to SQL are based on constructing queries as strings and on interpreting arrays or maps of strings as results. SQL and C++ are both strongly typed languages. Still, most C/C++ interfaces to SQL are based on constructing queries as strings and on interpreting arrays or maps of strings as results.
@ -25,7 +29,7 @@ This results in several benefits, e.g.
* the library user operates comfortably on structs and functions, * the library user operates comfortably on structs and functions,
* the compiler reports many kinds of errors long before the code enters unit testing or production, * the compiler reports many kinds of errors long before the code enters unit testing or production,
* the library hides the gory details of string construction for queries and interpreting string based results returned by select calls. * the library hides the gory details of string construction for queries and interpreting results returned by select calls.
The library supports both static and dynamic queries. The former offers greater benefit in terms of type and consistency checking. The latter makes it easier to construct queries on the flight. The library supports both static and dynamic queries. The former offers greater benefit in terms of type and consistency checking. The latter makes it easier to construct queries on the flight.

View File

@ -105,7 +105,7 @@ namespace sqlpp
insert_list_data_t(Assignments... assignments): insert_list_data_t(Assignments... assignments):
_assignments(assignments...), _assignments(assignments...),
_columns({assignments._lhs}...), _columns({assignments._lhs}...),
_values({assignments._rhs}...) _values(assignments._rhs...)
{} {}
insert_list_data_t(const insert_list_data_t&) = default; insert_list_data_t(const insert_list_data_t&) = default;

View File

@ -41,6 +41,12 @@ struct MockDbT: public sqlpp::connection
{ {
std::ostringstream _os; std::ostringstream _os;
_serializer_context_t() = default;
_serializer_context_t(const _serializer_context_t& rhs)
{
_os << rhs._os.str();
}
std::string str() const std::string str() const
{ {
return _os.str(); return _os.str();