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

Merge pull request #26 from niXman/develop

BOOST_PP_TUPLE_POP_FRONT() added & files reorganized
This commit is contained in:
Roland Bock 2015-01-31 16:21:45 +01:00
commit aaeacfb2b0
26 changed files with 208 additions and 88 deletions

View File

@ -11,7 +11,7 @@ build(insert)
build(update) build(update)
build(remove) build(remove)
build(select) build(select)
find_package(Boost 1.56) find_package(Boost 1.50)
if(Boost_FOUND) if(Boost_FOUND)
MESSAGE(${Boost_INCLUDE_DIRS}) MESSAGE(${Boost_INCLUDE_DIRS})
include_directories(${Boost_INCLUDE_DIRS}) include_directories(${Boost_INCLUDE_DIRS})

View File

@ -26,11 +26,17 @@
#if 0 // syntax example #if 0 // syntax example
SQLPP_DECLARE_TABLE( SQLPP_DECLARE_TABLE(
(table, DROP_IF_EXISTS, CREATE_IF_NOT_EXISTS, ENGINE("InnoDB"), CHARACTER_SET("utf-8"), COMMENT("table comments")) (table, \
SQLPP_DROP_IF_EXISTS \
,SQLPP_CREATE_IF_NOT_EXISTS \
,SQLPP_ENGINE("InnoDB") \
,SQLPP_CHARACTER_SET("utf-8") \
,SQLPP_COMMENT("table comments") \
)
, ,
(id, int, NOT_NULL, PRIMARY_KEY, AUTO_INCREMENT) (id, int, SQLPP_NOT_NULL, SQLPP_PRIMARY_KEY, SQLPP_AUTO_INCREMENT)
(name, varchar(64), NOT_NULL, INDEX("name_index"), DEFAULT("any name")) (name, varchar(64), SQLPP_NOT_NULL, SQLPP_INDEX("name_index"), SQLPP_DEFAULT("any name"))
(age, int, NOT_NULL, INDEX("age_index"), UNIQUE, COMMENT("some comments")) (age, int, SQLPP_NOT_NULL, SQLPP_INDEX("age_index"), SQLPP_UNIQUE, SQLPP_COMMENT("some comments"))
) )
#endif #endif

View File

@ -36,29 +36,30 @@
#endif // defined(__clang__) #endif // defined(__clang__)
// tools // tools
#include <sqlpp11/ppgen/wrap_seq.h> #include <sqlpp11/ppgen/tools/wrap_seq.h>
#include <sqlpp11/ppgen/tools/tuple_pop_front.h>
// table props // table props
#include <sqlpp11/ppgen/engine.h> #include <sqlpp11/ppgen/tblops/engine.h>
#include <sqlpp11/ppgen/character_set.h> #include <sqlpp11/ppgen/tblops/character_set.h>
// col props // col props
#include <sqlpp11/ppgen/auto_increment.h> #include <sqlpp11/ppgen/colops/auto_increment.h>
#include <sqlpp11/ppgen/blob.h> #include <sqlpp11/ppgen/colops/blob.h>
#include <sqlpp11/ppgen/bool.h> #include <sqlpp11/ppgen/colops/bool.h>
#include <sqlpp11/ppgen/comment.h> #include <sqlpp11/ppgen/colops/comment.h>
#include <sqlpp11/ppgen/datetime.h> #include <sqlpp11/ppgen/colops/datetime.h>
#include <sqlpp11/ppgen/default.h> #include <sqlpp11/ppgen/colops/default.h>
#include <sqlpp11/ppgen/floating_point.h> #include <sqlpp11/ppgen/colops/floating_point.h>
#include <sqlpp11/ppgen/index.h> #include <sqlpp11/ppgen/colops/index.h>
#include <sqlpp11/ppgen/integer.h> #include <sqlpp11/ppgen/colops/integer.h>
#include <sqlpp11/ppgen/not_null.h> #include <sqlpp11/ppgen/colops/not_null.h>
#include <sqlpp11/ppgen/null.h> #include <sqlpp11/ppgen/colops/null.h>
#include <sqlpp11/ppgen/primary_key.h> #include <sqlpp11/ppgen/colops/primary_key.h>
#include <sqlpp11/ppgen/text.h> #include <sqlpp11/ppgen/colops/text.h>
#include <sqlpp11/ppgen/timestamp.h> #include <sqlpp11/ppgen/colops/timestamp.h>
#include <sqlpp11/ppgen/unique.h> #include <sqlpp11/ppgen/colops/unique.h>
#include <sqlpp11/ppgen/varchar.h> #include <sqlpp11/ppgen/colops/varchar.h>
// boost.preprocessor // boost.preprocessor
#include <boost/preprocessor/cat.hpp> #include <boost/preprocessor/cat.hpp>
@ -71,7 +72,6 @@
#include <boost/preprocessor/stringize.hpp> #include <boost/preprocessor/stringize.hpp>
#include <boost/preprocessor/tuple/elem.hpp> #include <boost/preprocessor/tuple/elem.hpp>
#include <boost/preprocessor/tuple/size.hpp> #include <boost/preprocessor/tuple/size.hpp>
#include <boost/preprocessor/tuple/pop_front.hpp>
#include <boost/preprocessor/tuple/to_seq.hpp> #include <boost/preprocessor/tuple/to_seq.hpp>
/***************************************************************************/ /***************************************************************************/
@ -81,7 +81,7 @@
BOOST_PP_TUPLE_ELEM(0, BOOST_PP_EXPAND table) BOOST_PP_TUPLE_ELEM(0, BOOST_PP_EXPAND table)
#define SQLPP_DECLARE_TABLE_GET_TABLE_PROPS(table) \ #define SQLPP_DECLARE_TABLE_GET_TABLE_PROPS(table) \
BOOST_PP_TUPLE_POP_FRONT(BOOST_PP_EXPAND table) SQLPP_BOOST_PP_TUPLE_POP_FRONT(BOOST_PP_EXPAND table)
#define SQLPP_DECLARE_COLUMN_GET_COLUMN_NAME(col) \ #define SQLPP_DECLARE_COLUMN_GET_COLUMN_NAME(col) \
BOOST_PP_TUPLE_ELEM(0, col) BOOST_PP_TUPLE_ELEM(0, col)
@ -123,7 +123,7 @@
}; /* struct _alias_t */ \ }; /* struct _alias_t */ \
\ \
using _traits = sqlpp::make_traits< \ using _traits = sqlpp::make_traits< \
SQLPP_DECLARE_COLUMN_GEN_TRAITS(BOOST_PP_TUPLE_POP_FRONT(elem)) \ SQLPP_DECLARE_COLUMN_GEN_TRAITS(SQLPP_BOOST_PP_TUPLE_POP_FRONT(elem)) \
>; \ >; \
\ \
}; /* struct SQLPP_DECLARE_COLUMN_GET_COLUMN_NAME(elem) */ }; /* struct SQLPP_DECLARE_COLUMN_GET_COLUMN_NAME(elem) */
@ -141,7 +141,7 @@
BOOST_PP_SEQ_FOR_EACH( \ BOOST_PP_SEQ_FOR_EACH( \
SQLPP_DECLARE_TABLE_GEN_PROPS_AUX \ SQLPP_DECLARE_TABLE_GEN_PROPS_AUX \
,~ \ ,~ \
,BOOST_PP_TUPLE_TO_SEQ(BOOST_PP_TUPLE_POP_FRONT(table)) \ ,BOOST_PP_TUPLE_TO_SEQ(SQLPP_BOOST_PP_TUPLE_POP_FRONT(table)) \
) )
/***************************************************************************/ /***************************************************************************/

View File

@ -24,12 +24,12 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef _sqlpp__ppgen__auto_increment_h #ifndef _sqlpp__ppgen__colops__auto_increment_h
#define _sqlpp__ppgen__auto_increment_h #define _sqlpp__ppgen__colops__auto_increment_h
#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_SQLPP_AUTO_INCREMENT \ #define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_SQLPP_AUTO_INCREMENT \
PROC_SQLPP_AUTO_INCREMENT PROC_SQLPP_AUTO_INCREMENT
#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_SQLPP_AUTO_INCREMENT(...) \ #define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_SQLPP_AUTO_INCREMENT(...) \
sqlpp::tag::must_not_update sqlpp::tag::must_not_update
#endif // _sqlpp__ppgen__auto_increment_h #endif // _sqlpp__ppgen__colops__auto_increment_h

View File

@ -24,8 +24,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef _sqlpp__ppgen__blob_h #ifndef _sqlpp__ppgen__colops__blob_h
#define _sqlpp__ppgen__blob_h #define _sqlpp__ppgen__colops__blob_h
#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_tinyblob \ #define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_tinyblob \
PROC_tinyblob PROC_tinyblob
@ -47,4 +47,4 @@
#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_longblob(...) \ #define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_longblob(...) \
sqlpp::blob sqlpp::blob
#endif // _sqlpp__ppgen__blob_h #endif // _sqlpp__ppgen__colops__blob_h

View File

@ -24,12 +24,12 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef _sqlpp__ppgen__bool_h #ifndef _sqlpp__ppgen__colops__bool_h
#define _sqlpp__ppgen__bool_h #define _sqlpp__ppgen__colops__bool_h
#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_bool \ #define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_bool \
PROC_bool PROC_bool
#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_bool(...) \ #define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_bool(...) \
sqlpp::boolean sqlpp::boolean
#endif // _sqlpp__ppgen__bool_h #endif // _sqlpp__ppgen__colops__bool_h

View File

@ -24,12 +24,12 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef _sqlpp__ppgen__comment_h #ifndef _sqlpp__ppgen__colops__comment_h
#define _sqlpp__ppgen__comment_h #define _sqlpp__ppgen__colops__comment_h
#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_SQLPP_COMMENT(str) \ #define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_SQLPP_COMMENT(str) \
PROC_SQLPP_COMMENT PROC_SQLPP_COMMENT
#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_SQLPP_COMMENT(str) \ #define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_SQLPP_COMMENT(str) \
[COMMENT is not implemented] [COMMENT is not implemented]
#endif // _sqlpp__ppgen__comment_h #endif // _sqlpp__ppgen__colops__comment_h

View File

@ -24,12 +24,12 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef _sqlpp__ppgen__datetime_h #ifndef _sqlpp__ppgen__colops__datetime_h
#define _sqlpp__ppgen__datetime_h #define _sqlpp__ppgen__colops__datetime_h
#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_datetime \ #define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_datetime \
PROC_datetime PROC_datetime
#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_datetime(...) \ #define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_datetime(...) \
[datetime is not implemented] [datetime is not implemented]
#endif // _sqlpp__ppgen__datetime_h #endif // _sqlpp__ppgen__colops__datetime_h

View File

@ -24,12 +24,12 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef _sqlpp__ppgen__default_h #ifndef _sqlpp__ppgen__colops__default_h
#define _sqlpp__ppgen__default_h #define _sqlpp__ppgen__colops__default_h
#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_SQLPP_DEFAULT(value) \ #define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_SQLPP_DEFAULT(value) \
PROC_SQLPP_DEFAULT PROC_SQLPP_DEFAULT
#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_SQLPP_DEFAULT(...) \ #define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_SQLPP_DEFAULT(...) \
[DEFAULT is not implemented] [DEFAULT is not implemented]
#endif // _sqlpp__ppgen__default_h #endif // _sqlpp__ppgen__colops__default_h

View File

@ -24,8 +24,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef _sqlpp__ppgen__floating_point_h #ifndef _sqlpp__ppgen__colops__floating_point_h
#define _sqlpp__ppgen__floating_point_h #define _sqlpp__ppgen__colops__floating_point_h
#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_float \ #define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_float \
PROC_float PROC_float
@ -37,4 +37,4 @@
#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_double(...) \ #define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_double(...) \
sqlpp::floating_point sqlpp::floating_point
#endif // _sqlpp__ppgen__floating_point_h #endif // _sqlpp__ppgen__colops__floating_point_h

View File

@ -24,12 +24,12 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef _sqlpp__ppgen__index_h #ifndef _sqlpp__ppgen__colops__index_h
#define _sqlpp__ppgen__index_h #define _sqlpp__ppgen__colops__index_h
#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_SQLPP_INDEX(name) \ #define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_SQLPP_INDEX(name) \
PROC_SQLPP_INDEX PROC_SQLPP_INDEX
#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_SQLPP_INDEX(name) \ #define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_SQLPP_INDEX(name) \
[INDEX is not implemented] [INDEX is not implemented]
#endif // _sqlpp__ppgen__index_h #endif // _sqlpp__ppgen__colops__index_h

View File

@ -24,8 +24,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef _sqlpp__ppgen__integer_h #ifndef _sqlpp__ppgen__colops__integer_h
#define _sqlpp__ppgen__integer_h #define _sqlpp__ppgen__colops__integer_h
#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_tinyint \ #define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_tinyint \
PROC_tinyint PROC_tinyint
@ -47,4 +47,4 @@
#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_bigint(...) \ #define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_bigint(...) \
sqlpp::bigint sqlpp::bigint
#endif // _sqlpp__ppgen__integer_h #endif // _sqlpp__ppgen__colops__integer_h

View File

@ -24,12 +24,12 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef _sqlpp__ppgen__key_h #ifndef _sqlpp__ppgen__colops__key_h
#define _sqlpp__ppgen__key_h #define _sqlpp__ppgen__colops__key_h
#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_SQLPP_KEY(name) \ #define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_SQLPP_KEY(name) \
PROC_SQLPP_KEY PROC_SQLPP_KEY
#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_SQLPP_KEY(name) \ #define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_SQLPP_KEY(name) \
[KEY is not implemented] [KEY is not implemented]
#endif // _sqlpp__ppgen__key_h #endif // _sqlpp__ppgen__colops__key_h

View File

@ -24,12 +24,12 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef _sqlpp__ppgen__not_null_h #ifndef _sqlpp__ppgen__colops__not_null_h
#define _sqlpp__ppgen__not_null_h #define _sqlpp__ppgen__colops__not_null_h
#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_SQLPP_NOT_NULL \ #define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_SQLPP_NOT_NULL \
PROC_SQLPP_NOT_NULL PROC_SQLPP_NOT_NULL
#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_SQLPP_NOT_NULL(...) \ #define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_SQLPP_NOT_NULL(...) \
sqlpp::tag::require_insert sqlpp::tag::require_insert
#endif // _sqlpp__ppgen__not_null_h #endif // _sqlpp__ppgen__colops__not_null_h

View File

@ -24,12 +24,12 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef _sqlpp__ppgen__null_h #ifndef _sqlpp__ppgen__colops__null_h
#define _sqlpp__ppgen__null_h #define _sqlpp__ppgen__colops__null_h
#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_SQLPP_NULL \ #define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_SQLPP_NULL \
PROC_SQLPP_NULL PROC_SQLPP_NULL
#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_SQLPP_NULL(...) \ #define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_SQLPP_NULL(...) \
sqlpp::tag::can_be_null sqlpp::tag::can_be_null
#endif // _sqlpp__ppgen__null_h #endif // _sqlpp__ppgen__colops__null_h

View File

@ -24,12 +24,12 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef _sqlpp__ppgen__primary_key_h #ifndef _sqlpp__ppgen__colops__primary_key_h
#define _sqlpp__ppgen__primary_key_h #define _sqlpp__ppgen__colops__primary_key_h
#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_SQLPP_PRIMARY_KEY \ #define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_SQLPP_PRIMARY_KEY \
PROC_SQLPP_PRIMARY_KEY PROC_SQLPP_PRIMARY_KEY
#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_SQLPP_PRIMARY_KEY(...) \ #define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_SQLPP_PRIMARY_KEY(...) \
[PRIMARY_KEY is not implemented] [PRIMARY_KEY is not implemented]
#endif // _sqlpp__ppgen__primary_key_h #endif // _sqlpp__ppgen__colops__primary_key_h

View File

@ -24,12 +24,12 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef _sqlpp__ppgen__text_h #ifndef _sqlpp__ppgen__colops__text_h
#define _sqlpp__ppgen__text_h #define _sqlpp__ppgen__colops__text_h
#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_text \ #define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_text \
PROC_text PROC_text
#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_text(...) \ #define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_text(...) \
sqlpp::text sqlpp::text
#endif // _sqlpp__ppgen__text_h #endif // _sqlpp__ppgen__colops__text_h

View File

@ -24,12 +24,12 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef _sqlpp__ppgen__timestamp_h #ifndef _sqlpp__ppgen__colops__timestamp_h
#define _sqlpp__ppgen__timestamp_h #define _sqlpp__ppgen__colops__timestamp_h
#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_timestamp \ #define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_timestamp \
PROC_timestamp PROC_timestamp
#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_timestamp(...) \ #define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_timestamp(...) \
[timestamp is not implemented] [timestamp is not implemented]
#endif // _sqlpp__ppgen__timestamp_h #endif // _sqlpp__ppgen__colops__timestamp_h

View File

@ -24,12 +24,12 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef _sqlpp__ppgen__unique_h #ifndef _sqlpp__ppgen__colops__unique_h
#define _sqlpp__ppgen__unique_h #define _sqlpp__ppgen__colops__unique_h
#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_SQLPP_UNIQUE \ #define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_SQLPP_UNIQUE \
PROC_SQLPP_UNIQUE PROC_SQLPP_UNIQUE
#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_SQLPP_UNIQUE(...) \ #define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_SQLPP_UNIQUE(...) \
[UNIQUE is not implemented] [UNIQUE is not implemented]
#endif // _sqlpp__ppgen__unique_h #endif // _sqlpp__ppgen__colops__unique_h

View File

@ -24,12 +24,12 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef _sqlpp__ppgen__varchar_h #ifndef _sqlpp__ppgen__colops__varchar_h
#define _sqlpp__ppgen__varchar_h #define _sqlpp__ppgen__colops__varchar_h
#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_varchar(str) \ #define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_varchar(str) \
PROC_varchar PROC_varchar
#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_varchar(str) \ #define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_varchar(str) \
sqlpp::varchar sqlpp::varchar
#endif // _sqlpp__ppgen__varchar_h #endif // _sqlpp__ppgen__colops__varchar_h

View File

@ -24,12 +24,12 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef _sqlpp__ppgen__character_set_h #ifndef _sqlpp__ppgen__tblops__character_set_h
#define _sqlpp__ppgen__character_set_h #define _sqlpp__ppgen__tblops__character_set_h
#define SQLPP_DECLARE_TABLE_GET_PROC_LAZY_SQLPP_CHARACTER_SET(str) \ #define SQLPP_DECLARE_TABLE_GET_PROC_LAZY_SQLPP_CHARACTER_SET(str) \
PROC_SQLPP_CHARACTER_SET PROC_SQLPP_CHARACTER_SET
#define SQLPP_DECLARE_TABLE_GEN_PROC_SQLPP_CHARACTER_SET(str) \ #define SQLPP_DECLARE_TABLE_GEN_PROC_SQLPP_CHARACTER_SET(str) \
[CHARACTER_SET is not implemented] [CHARACTER_SET is not implemented]
#endif // _sqlpp__ppgen__character_set_h #endif // _sqlpp__ppgen__tblops__character_set_h

View File

@ -0,0 +1,35 @@
/*
* Copyright (c) 2014-2015, niXman (i dot nixman dog gmail dot com)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _sqlpp__ppgen__tblops__comment_h
#define _sqlpp__ppgen__tblops__comment_h
#define SQLPP_DECLARE_TABLE_GET_TRAITS_LAZY_SQLPP_COMMENT(str) \
PROC_SQLPP_COMMENT
#define SQLPP_DECLARE_TABLE_GEN_TRAITS_PROC_SQLPP_COMMENT(str) \
[COMMENT is not implemented]
#endif // _sqlpp__ppgen__tblops__comment_h

View File

@ -0,0 +1,35 @@
/*
* Copyright (c) 2014-2015, niXman (i dot nixman dog gmail dot com)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _sqlpp__ppgen__tblops__default_h
#define _sqlpp__ppgen__tblops__default_h
#define SQLPP_DECLARE_TABLE_GET_TRAITS_LAZY_SQLPP_DEFAULT(value) \
PROC_SQLPP_DEFAULT
#define SQLPP_DECLARE_TABLE_GEN_TRAITS_PROC_SQLPP_DEFAULT(...) \
[DEFAULT is not implemented]
#endif // _sqlpp__ppgen__tblops__default_h

View File

@ -24,12 +24,12 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef _sqlpp__ppgen__engine_h #ifndef _sqlpp__ppgen__tblops__engine_h
#define _sqlpp__ppgen__engine_h #define _sqlpp__ppgen__tblops__engine_h
#define SQLPP_DECLARE_TABLE_GET_PROC_LAZY_SQLPP_ENGINE(str) \ #define SQLPP_DECLARE_TABLE_GET_PROC_LAZY_SQLPP_ENGINE(str) \
PROC_SQLPP_ENGINE PROC_SQLPP_ENGINE
#define SQLPP_DECLARE_TABLE_GEN_PROC_SQLPP_ENGINE(str) \ #define SQLPP_DECLARE_TABLE_GEN_PROC_SQLPP_ENGINE(str) \
[ENGINE is not implemented] [ENGINE is not implemented]
#endif // _sqlpp__ppgen__engine_h #endif // _sqlpp__ppgen__tblops__engine_h

View File

@ -0,0 +1,44 @@
/* **************************************************************************
* *
* (C) Copyright Edward Diener 2013.
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
* *
************************************************************************** */
/* See http://www.boost.org for most recent version. */
# ifndef SQLPP_BOOST_PREPROCESSOR_TUPLE_POP_FRONT_HPP
# define SQLPP_BOOST_PREPROCESSOR_TUPLE_POP_FRONT_HPP
# include <boost/preprocessor/config/config.hpp>
# if BOOST_PP_VARIADICS
# include <boost/preprocessor/array/pop_front.hpp>
# include <boost/preprocessor/array/to_tuple.hpp>
# include <boost/preprocessor/comparison/greater.hpp>
# include <boost/preprocessor/control/iif.hpp>
# include <boost/preprocessor/tuple/size.hpp>
# include <boost/preprocessor/tuple/to_array.hpp>
/* BOOST_PP_TUPLE_POP_FRONT */
# define SQLPP_BOOST_PP_TUPLE_POP_FRONT(tuple) \
BOOST_PP_IIF \
( \
BOOST_PP_GREATER(BOOST_PP_TUPLE_SIZE(tuple),1), \
SQLPP_BOOST_PP_TUPLE_POP_FRONT_EXEC, \
SQLPP_BOOST_PP_TUPLE_POP_FRONT_RETURN \
) \
(tuple)
# define SQLPP_BOOST_PP_TUPLE_POP_FRONT_EXEC(tuple) \
BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_POP_FRONT(BOOST_PP_TUPLE_TO_ARRAY(tuple)))
# define SQLPP_BOOST_PP_TUPLE_POP_FRONT_RETURN(tuple) tuple
# endif // BOOST_PP_VARIADICS
# endif // SQLPP_BOOST_PREPROCESSOR_TUPLE_POP_FRONT_HPP

View File

@ -24,8 +24,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef _sqlpp__ppgen__wrap_seq_h #ifndef _sqlpp__ppgen__tools__wrap_seq_h
#define _sqlpp__ppgen__wrap_seq_h #define _sqlpp__ppgen__tools__wrap_seq_h
#define SQLPP_WRAP_SEQUENCE_X(...) \ #define SQLPP_WRAP_SEQUENCE_X(...) \
((__VA_ARGS__)) SQLPP_WRAP_SEQUENCE_Y ((__VA_ARGS__)) SQLPP_WRAP_SEQUENCE_Y
@ -35,4 +35,4 @@
#define SQLPP_WRAP_SEQUENCE_X0 #define SQLPP_WRAP_SEQUENCE_X0
#define SQLPP_WRAP_SEQUENCE_Y0 #define SQLPP_WRAP_SEQUENCE_Y0
#endif // _sqlpp__ppgen__wrap_seq_h #endif // _sqlpp__ppgen__tools__wrap_seq_h