diff --git a/README.md b/README.md index ff3449b3..a8b0eb20 100644 --- a/README.md +++ b/README.md @@ -44,13 +44,7 @@ This results in several benefits, e.g. 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. -sqlpp11 is vendor-neutral. Specific traits of databases (e.g. unsupported or non-standard features) are are handled by connector libraries. Connector libraries can inform the developer of missing features at compile time. They also interpret expressions specifically where needed. For example, the connector could use the operator|| or the concat method for string concatenation without the developer being required to change the statement. - - -Your help is needed: --------------------- -The library is already used in production but it is certainly not complete yet. Feature requests, bug reports, contributions to code or documentation are most welcome. - +sqlpp11 is vendor-neutral. Specific traits of databases (e.g. unsupported or non-standard features) are handled by connector libraries. Connector libraries can inform the developer of missing features at compile time. They also interpret expressions specifically where needed. For example, the connector could use the operator|| or the concat method for string concatenation without the developer being required to change the statement. Examples: --------- @@ -108,6 +102,11 @@ db(update(foo).set(foo.hasFun = not foo.hasFun).where(foo.name != "nobody")); db(remove_from(foo).where(not foo.hasFun)); ``` +Your help is needed: +-------------------- +The library is already used in production but it is certainly not complete yet. Feature requests, bug reports, contributions to code or documentation are most welcome. + + Requirements: ------------- __Compiler:__ diff --git a/examples/insert.cpp b/examples/insert.cpp index ac8ebbb3..525339f7 100644 --- a/examples/insert.cpp +++ b/examples/insert.cpp @@ -27,7 +27,7 @@ #include "MockDb.h" #include -int insert(int, char*[]) +int insert(int, char* []) { MockDb db{}; diff --git a/examples/ppgen.cpp b/examples/ppgen.cpp index adf5b840..7e8ca072 100644 --- a/examples/ppgen.cpp +++ b/examples/ppgen.cpp @@ -63,7 +63,7 @@ SQLPP_DECLARE_TABLE( ) // clang-format on -int ppgen(int, char*[]) +int ppgen(int, char* []) { MockDb db{}; const auto p = tab_person::tab_person{}; diff --git a/examples/remove.cpp b/examples/remove.cpp index c8bc4e9d..73b7b073 100644 --- a/examples/remove.cpp +++ b/examples/remove.cpp @@ -27,7 +27,7 @@ #include "MockDb.h" #include -int remove(int, char*[]) +int remove(int, char* []) { MockDb db{}; diff --git a/examples/select.cpp b/examples/select.cpp index d0e8c771..d6bdfdf6 100644 --- a/examples/select.cpp +++ b/examples/select.cpp @@ -36,7 +36,7 @@ SQLPP_ALIAS_PROVIDER(cheesecake) -int select(int, char*[]) +int select(int, char* []) { static constexpr bool some_condition = true; static constexpr bool some_other_condition = false; diff --git a/examples/update.cpp b/examples/update.cpp index 264f518c..d5562c25 100644 --- a/examples/update.cpp +++ b/examples/update.cpp @@ -27,7 +27,7 @@ #include "MockDb.h" #include -int update(int, char*[]) +int update(int, char* []) { MockDb db{}; diff --git a/include/sqlpp11/ppgen/colops/auto_increment.h b/include/sqlpp11/ppgen/colops/auto_increment.h index 1e7ae2bc..641b7cff 100644 --- a/include/sqlpp11/ppgen/colops/auto_increment.h +++ b/include/sqlpp11/ppgen/colops/auto_increment.h @@ -27,9 +27,7 @@ #ifndef _sqlpp__ppgen__colops__auto_increment_h #define _sqlpp__ppgen__colops__auto_increment_h -#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_SQLPP_AUTO_INCREMENT \ - PROC_SQLPP_AUTO_INCREMENT -#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_SQLPP_AUTO_INCREMENT(...) \ - ::sqlpp::tag::must_not_update +#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_SQLPP_AUTO_INCREMENT PROC_SQLPP_AUTO_INCREMENT +#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_SQLPP_AUTO_INCREMENT(...) ::sqlpp::tag::must_not_update -#endif // _sqlpp__ppgen__colops__auto_increment_h +#endif // _sqlpp__ppgen__colops__auto_increment_h diff --git a/include/sqlpp11/ppgen/colops/blob.h b/include/sqlpp11/ppgen/colops/blob.h index f387cbbe..233740a1 100644 --- a/include/sqlpp11/ppgen/colops/blob.h +++ b/include/sqlpp11/ppgen/colops/blob.h @@ -27,24 +27,16 @@ #ifndef _sqlpp__ppgen__colops__blob_h #define _sqlpp__ppgen__colops__blob_h -#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_tinyblob \ - PROC_tinyblob -#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_tinyblob(...) \ - ::sqlpp::blob +#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_tinyblob PROC_tinyblob +#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_tinyblob(...) ::sqlpp::blob -#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_blob \ - PROC_blob -#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_blob(...) \ - ::sqlpp::blob +#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_blob PROC_blob +#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_blob(...) ::sqlpp::blob -#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_mediumblob \ - PROC_mediumblob -#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_mediumblob(...) \ - ::sqlpp::blob +#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_mediumblob PROC_mediumblob +#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_mediumblob(...) ::sqlpp::blob -#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_longblob \ - PROC_longblob -#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_longblob(...) \ - ::sqlpp::blob +#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_longblob PROC_longblob +#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_longblob(...) ::sqlpp::blob -#endif // _sqlpp__ppgen__colops__blob_h +#endif // _sqlpp__ppgen__colops__blob_h diff --git a/include/sqlpp11/ppgen/colops/bool.h b/include/sqlpp11/ppgen/colops/bool.h index a3db1f92..11acd226 100644 --- a/include/sqlpp11/ppgen/colops/bool.h +++ b/include/sqlpp11/ppgen/colops/bool.h @@ -27,9 +27,7 @@ #ifndef _sqlpp__ppgen__colops__bool_h #define _sqlpp__ppgen__colops__bool_h -#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_bool \ - PROC_bool -#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_bool(...) \ - ::sqlpp::boolean +#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_bool PROC_bool +#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_bool(...) ::sqlpp::boolean -#endif // _sqlpp__ppgen__colops__bool_h +#endif // _sqlpp__ppgen__colops__bool_h diff --git a/include/sqlpp11/ppgen/colops/comment.h b/include/sqlpp11/ppgen/colops/comment.h index d0757d73..a819920c 100644 --- a/include/sqlpp11/ppgen/colops/comment.h +++ b/include/sqlpp11/ppgen/colops/comment.h @@ -27,9 +27,7 @@ #ifndef _sqlpp__ppgen__colops__comment_h #define _sqlpp__ppgen__colops__comment_h -#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_SQLPP_COMMENT \ - PROC_SQLPP_COMMENT -#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_SQLPP_COMMENT(str) \ - [COMMENT is not implemented] +#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_SQLPP_COMMENT PROC_SQLPP_COMMENT +#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_SQLPP_COMMENT(str) [COMMENT is not implemented] -#endif // _sqlpp__ppgen__colops__comment_h +#endif // _sqlpp__ppgen__colops__comment_h diff --git a/include/sqlpp11/ppgen/colops/default.h b/include/sqlpp11/ppgen/colops/default.h index b353651f..ed8121ba 100644 --- a/include/sqlpp11/ppgen/colops/default.h +++ b/include/sqlpp11/ppgen/colops/default.h @@ -27,9 +27,7 @@ #ifndef _sqlpp__ppgen__colops__default_h #define _sqlpp__ppgen__colops__default_h -#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_SQLPP_DEFAULT \ - PROC_SQLPP_DEFAULT -#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_SQLPP_DEFAULT(...) \ - [DEFAULT is not implemented] +#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_SQLPP_DEFAULT PROC_SQLPP_DEFAULT +#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_SQLPP_DEFAULT(...) [DEFAULT is not implemented] -#endif // _sqlpp__ppgen__colops__default_h +#endif // _sqlpp__ppgen__colops__default_h diff --git a/include/sqlpp11/ppgen/colops/floating_point.h b/include/sqlpp11/ppgen/colops/floating_point.h index 6b1dd018..2221d444 100644 --- a/include/sqlpp11/ppgen/colops/floating_point.h +++ b/include/sqlpp11/ppgen/colops/floating_point.h @@ -27,14 +27,10 @@ #ifndef _sqlpp__ppgen__colops__floating_point_h #define _sqlpp__ppgen__colops__floating_point_h -#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_float \ - PROC_float -#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_float(...) \ - ::sqlpp::floating_point +#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_float PROC_float +#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_float(...) ::sqlpp::floating_point -#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_double \ - PROC_double -#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_double(...) \ - ::sqlpp::floating_point +#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_double PROC_double +#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_double(...) ::sqlpp::floating_point -#endif // _sqlpp__ppgen__colops__floating_point_h +#endif // _sqlpp__ppgen__colops__floating_point_h diff --git a/include/sqlpp11/ppgen/colops/foreign_key.h b/include/sqlpp11/ppgen/colops/foreign_key.h index 33147fe8..f5372572 100644 --- a/include/sqlpp11/ppgen/colops/foreign_key.h +++ b/include/sqlpp11/ppgen/colops/foreign_key.h @@ -27,9 +27,8 @@ #ifndef _sqlpp__ppgen__colops__foreign_key_h #define _sqlpp__ppgen__colops__foreign_key_h -#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_SQLPP_FOREIGN_KEY \ - PROC_SQLPP_FOREIGN_KEY +#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_SQLPP_FOREIGN_KEY PROC_SQLPP_FOREIGN_KEY #define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_SQLPP_FOREIGN_KEY(keyname, tblname, colname) \ - [FOREIGN KEY is not implemented] + [FOREIGN KEY is not implemented] -#endif // _sqlpp__ppgen__colops__foreign_key_h +#endif // _sqlpp__ppgen__colops__foreign_key_h diff --git a/include/sqlpp11/ppgen/colops/index.h b/include/sqlpp11/ppgen/colops/index.h index a5344f43..3da56940 100644 --- a/include/sqlpp11/ppgen/colops/index.h +++ b/include/sqlpp11/ppgen/colops/index.h @@ -27,9 +27,7 @@ #ifndef _sqlpp__ppgen__colops__index_h #define _sqlpp__ppgen__colops__index_h -#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_SQLPP_INDEX \ - PROC_SQLPP_INDEX -#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_SQLPP_INDEX(indexname, tblname, /* cols */ ...) \ - [INDEX is not implemented] +#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_SQLPP_INDEX PROC_SQLPP_INDEX +#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_SQLPP_INDEX(indexname, tblname, /* cols */...) [INDEX is not implemented] -#endif // _sqlpp__ppgen__colops__index_h +#endif // _sqlpp__ppgen__colops__index_h diff --git a/include/sqlpp11/ppgen/colops/integer.h b/include/sqlpp11/ppgen/colops/integer.h index e79a9860..017735c6 100644 --- a/include/sqlpp11/ppgen/colops/integer.h +++ b/include/sqlpp11/ppgen/colops/integer.h @@ -27,24 +27,16 @@ #ifndef _sqlpp__ppgen__colops__integer_h #define _sqlpp__ppgen__colops__integer_h -#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_tinyint \ - PROC_tinyint -#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_tinyint(...) \ - ::sqlpp::tinyint +#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_tinyint PROC_tinyint +#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_tinyint(...) ::sqlpp::tinyint -#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_smallint \ - PROC_smallint -#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_smallint(...) \ - ::sqlpp::smallint +#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_smallint PROC_smallint +#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_smallint(...) ::sqlpp::smallint -#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_int \ - PROC_int -#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_int(...) \ - ::sqlpp::integer +#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_int PROC_int +#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_int(...) ::sqlpp::integer -#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_bigint \ - PROC_bigint -#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_bigint(...) \ - ::sqlpp::bigint +#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_bigint PROC_bigint +#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_bigint(...) ::sqlpp::bigint -#endif // _sqlpp__ppgen__colops__integer_h +#endif // _sqlpp__ppgen__colops__integer_h diff --git a/include/sqlpp11/ppgen/colops/not_null.h b/include/sqlpp11/ppgen/colops/not_null.h index 7a3059b0..449ef7e1 100644 --- a/include/sqlpp11/ppgen/colops/not_null.h +++ b/include/sqlpp11/ppgen/colops/not_null.h @@ -27,9 +27,7 @@ #ifndef _sqlpp__ppgen__colops__not_null_h #define _sqlpp__ppgen__colops__not_null_h -#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_SQLPP_NOT_NULL \ - PROC_SQLPP_NOT_NULL -#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_SQLPP_NOT_NULL(...) \ - ::sqlpp::tag::require_insert +#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_SQLPP_NOT_NULL PROC_SQLPP_NOT_NULL +#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_SQLPP_NOT_NULL(...) ::sqlpp::tag::require_insert -#endif // _sqlpp__ppgen__colops__not_null_h +#endif // _sqlpp__ppgen__colops__not_null_h diff --git a/include/sqlpp11/ppgen/colops/null.h b/include/sqlpp11/ppgen/colops/null.h index dcb8aef2..4856d4bd 100644 --- a/include/sqlpp11/ppgen/colops/null.h +++ b/include/sqlpp11/ppgen/colops/null.h @@ -27,9 +27,7 @@ #ifndef _sqlpp__ppgen__colops__null_h #define _sqlpp__ppgen__colops__null_h -#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_SQLPP_NULL \ - PROC_SQLPP_NULL -#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_SQLPP_NULL(...) \ - ::sqlpp::tag::can_be_null +#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_SQLPP_NULL PROC_SQLPP_NULL +#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_SQLPP_NULL(...) ::sqlpp::tag::can_be_null -#endif // _sqlpp__ppgen__colops__null_h +#endif // _sqlpp__ppgen__colops__null_h diff --git a/include/sqlpp11/ppgen/colops/primary_key.h b/include/sqlpp11/ppgen/colops/primary_key.h index ec356a7c..aa7da21e 100644 --- a/include/sqlpp11/ppgen/colops/primary_key.h +++ b/include/sqlpp11/ppgen/colops/primary_key.h @@ -27,9 +27,8 @@ #ifndef _sqlpp__ppgen__colops__primary_key_h #define _sqlpp__ppgen__colops__primary_key_h -#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_SQLPP_PRIMARY_KEY \ - PROC_SQLPP_PRIMARY_KEY +#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_SQLPP_PRIMARY_KEY PROC_SQLPP_PRIMARY_KEY #define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_SQLPP_PRIMARY_KEY(...) \ - ::sqlpp::tag::must_not_insert, ::sqlpp::tag::must_not_update + ::sqlpp::tag::must_not_insert, ::sqlpp::tag::must_not_update -#endif // _sqlpp__ppgen__colops__primary_key_h +#endif // _sqlpp__ppgen__colops__primary_key_h diff --git a/include/sqlpp11/ppgen/colops/text.h b/include/sqlpp11/ppgen/colops/text.h index 5278ea01..f91788bf 100644 --- a/include/sqlpp11/ppgen/colops/text.h +++ b/include/sqlpp11/ppgen/colops/text.h @@ -27,9 +27,7 @@ #ifndef _sqlpp__ppgen__colops__text_h #define _sqlpp__ppgen__colops__text_h -#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_text \ - PROC_text -#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_text(...) \ - ::sqlpp::text +#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_text PROC_text +#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_text(...) ::sqlpp::text -#endif // _sqlpp__ppgen__colops__text_h +#endif // _sqlpp__ppgen__colops__text_h diff --git a/include/sqlpp11/ppgen/colops/unique_index.h b/include/sqlpp11/ppgen/colops/unique_index.h index 3a64e521..eb7037a3 100644 --- a/include/sqlpp11/ppgen/colops/unique_index.h +++ b/include/sqlpp11/ppgen/colops/unique_index.h @@ -27,9 +27,8 @@ #ifndef _sqlpp__ppgen__colops__unique_index_h #define _sqlpp__ppgen__colops__unique_index_h -#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_SQLPP_UNIQUE_INDEX \ - PROC_SQLPP_UNIQUE_INDEX -#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_SQLPP_UNIQUE_INDEX(indexname, tblname, /* cols */ ...) \ - [UNIQUE INDEX is not implemented] +#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_SQLPP_UNIQUE_INDEX PROC_SQLPP_UNIQUE_INDEX +#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_SQLPP_UNIQUE_INDEX(indexname, tblname, /* cols */...) \ + [UNIQUE INDEX is not implemented] -#endif // _sqlpp__ppgen__colops__unique_index_h +#endif // _sqlpp__ppgen__colops__unique_index_h diff --git a/include/sqlpp11/ppgen/colops/varchar.h b/include/sqlpp11/ppgen/colops/varchar.h index d5944a70..e4b0f55f 100644 --- a/include/sqlpp11/ppgen/colops/varchar.h +++ b/include/sqlpp11/ppgen/colops/varchar.h @@ -27,9 +27,7 @@ #ifndef _sqlpp__ppgen__colops__varchar_h #define _sqlpp__ppgen__colops__varchar_h -#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_varchar(str) \ - PROC_varchar -#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_varchar(str) \ - ::sqlpp::varchar +#define SQLPP_DECLARE_COLUMN_GET_TRAITS_LAZY_varchar(str) PROC_varchar +#define SQLPP_DECLARE_COLUMN_GEN_TRAITS_PROC_varchar(str) ::sqlpp::varchar -#endif // _sqlpp__ppgen__colops__varchar_h +#endif // _sqlpp__ppgen__colops__varchar_h diff --git a/include/sqlpp11/ppgen/tblops/character_set.h b/include/sqlpp11/ppgen/tblops/character_set.h index b9f35ae4..38825bdf 100644 --- a/include/sqlpp11/ppgen/tblops/character_set.h +++ b/include/sqlpp11/ppgen/tblops/character_set.h @@ -27,9 +27,7 @@ #ifndef _sqlpp__ppgen__tblops__character_set_h #define _sqlpp__ppgen__tblops__character_set_h -#define SQLPP_DECLARE_TABLE_GET_PROC_LAZY_SQLPP_CHARACTER_SET \ - PROC_SQLPP_CHARACTER_SET -#define SQLPP_DECLARE_TABLE_GEN_PROC_SQLPP_CHARACTER_SET(str) \ - [CHARACTER_SET is not implemented] +#define SQLPP_DECLARE_TABLE_GET_PROC_LAZY_SQLPP_CHARACTER_SET PROC_SQLPP_CHARACTER_SET +#define SQLPP_DECLARE_TABLE_GEN_PROC_SQLPP_CHARACTER_SET(str) [CHARACTER_SET is not implemented] -#endif // _sqlpp__ppgen__tblops__character_set_h +#endif // _sqlpp__ppgen__tblops__character_set_h diff --git a/include/sqlpp11/ppgen/tblops/comment.h b/include/sqlpp11/ppgen/tblops/comment.h index b55c3f64..499611a9 100644 --- a/include/sqlpp11/ppgen/tblops/comment.h +++ b/include/sqlpp11/ppgen/tblops/comment.h @@ -27,9 +27,7 @@ #ifndef _sqlpp__ppgen__tblops__comment_h #define _sqlpp__ppgen__tblops__comment_h -#define SQLPP_DECLARE_TABLE_GET_TRAITS_LAZY_SQLPP_COMMENT \ - PROC_SQLPP_COMMENT -#define SQLPP_DECLARE_TABLE_GEN_TRAITS_PROC_SQLPP_COMMENT(str) \ - [COMMENT is not implemented] +#define SQLPP_DECLARE_TABLE_GET_TRAITS_LAZY_SQLPP_COMMENT PROC_SQLPP_COMMENT +#define SQLPP_DECLARE_TABLE_GEN_TRAITS_PROC_SQLPP_COMMENT(str) [COMMENT is not implemented] -#endif // _sqlpp__ppgen__tblops__comment_h +#endif // _sqlpp__ppgen__tblops__comment_h diff --git a/include/sqlpp11/ppgen/tblops/default.h b/include/sqlpp11/ppgen/tblops/default.h index d9f4d56b..51cd6063 100644 --- a/include/sqlpp11/ppgen/tblops/default.h +++ b/include/sqlpp11/ppgen/tblops/default.h @@ -27,9 +27,7 @@ #ifndef _sqlpp__ppgen__tblops__default_h #define _sqlpp__ppgen__tblops__default_h -#define SQLPP_DECLARE_TABLE_GET_TRAITS_LAZY_SQLPP_DEFAULT \ - PROC_SQLPP_DEFAULT -#define SQLPP_DECLARE_TABLE_GEN_TRAITS_PROC_SQLPP_DEFAULT(...) \ - [DEFAULT is not implemented] +#define SQLPP_DECLARE_TABLE_GET_TRAITS_LAZY_SQLPP_DEFAULT PROC_SQLPP_DEFAULT +#define SQLPP_DECLARE_TABLE_GEN_TRAITS_PROC_SQLPP_DEFAULT(...) [DEFAULT is not implemented] -#endif // _sqlpp__ppgen__tblops__default_h +#endif // _sqlpp__ppgen__tblops__default_h diff --git a/include/sqlpp11/ppgen/tblops/engine.h b/include/sqlpp11/ppgen/tblops/engine.h index 38892dea..01d44da9 100644 --- a/include/sqlpp11/ppgen/tblops/engine.h +++ b/include/sqlpp11/ppgen/tblops/engine.h @@ -27,9 +27,7 @@ #ifndef _sqlpp__ppgen__tblops__engine_h #define _sqlpp__ppgen__tblops__engine_h -#define SQLPP_DECLARE_TABLE_GET_PROC_LAZY_SQLPP_ENGINE \ - PROC_SQLPP_ENGINE -#define SQLPP_DECLARE_TABLE_GEN_PROC_SQLPP_ENGINE(str) \ - [ENGINE is not implemented] +#define SQLPP_DECLARE_TABLE_GET_PROC_LAZY_SQLPP_ENGINE PROC_SQLPP_ENGINE +#define SQLPP_DECLARE_TABLE_GEN_PROC_SQLPP_ENGINE(str) [ENGINE is not implemented] -#endif // _sqlpp__ppgen__tblops__engine_h +#endif // _sqlpp__ppgen__tblops__engine_h diff --git a/include/sqlpp11/where.h b/include/sqlpp11/where.h index 93f76f80..448b2fbf 100644 --- a/include/sqlpp11/where.h +++ b/include/sqlpp11/where.h @@ -226,21 +226,23 @@ namespace sqlpp SQLPP_PORTABLE_STATIC_ASSERT(assert_where_dynamic_statement_dynamic_t, "dynamic_where() must not be called in a static statement"); -// workaround for msvc bugs https://connect.microsoft.com/VisualStudio/Feedback/Details/2086629 & https://connect.microsoft.com/VisualStudio/feedback/details/2173198 -// template -// using check_where_t = static_combined_check_t< -// static_check_t::value...>::value, assert_where_expressions_t>, -// static_check_t::value...>::value, assert_where_boolean_t>, -// static_check_t::value)...>::value, -// assert_where_no_aggregate_functions_t>>; + // workaround for msvc bugs https://connect.microsoft.com/VisualStudio/Feedback/Details/2086629 & + // https://connect.microsoft.com/VisualStudio/feedback/details/2173198 + // template + // using check_where_t = static_combined_check_t< + // static_check_t::value...>::value, assert_where_expressions_t>, + // static_check_t::value...>::value, assert_where_boolean_t>, + // static_check_t::value)...>::value, + // assert_where_no_aggregate_functions_t>>; template struct check_where { - using type = static_combined_check_t< - static_check_t::type::value...>::value, assert_where_expressions_t>, - static_check_t::value...>::value, assert_where_boolean_t>, - static_check_t::type::value)...>::value, - assert_where_no_aggregate_functions_t>>; + using type = static_combined_check_t< + static_check_t::type::value...>::value, + assert_where_expressions_t>, + static_check_t::value...>::value, assert_where_boolean_t>, + static_check_t::type::value)...>::value, + assert_where_no_aggregate_functions_t>>; }; template diff --git a/test_static_asserts/aggregates.cpp b/test_static_asserts/aggregates.cpp index 9e50cfd3..929bd843 100644 --- a/test_static_asserts/aggregates.cpp +++ b/test_static_asserts/aggregates.cpp @@ -123,7 +123,7 @@ namespace } } -int main(int, char*[]) +int main(int, char* []) { no_group_by(); dynamic_group_by(); diff --git a/test_static_asserts/case.cpp b/test_static_asserts/case.cpp index df1ea6f0..5b37e551 100644 --- a/test_static_asserts/case.cpp +++ b/test_static_asserts/case.cpp @@ -152,7 +152,7 @@ namespace } } -int main(int, char*[]) +int main(int, char* []) { when(); then(); diff --git a/test_static_asserts/date.cpp b/test_static_asserts/date.cpp index b22fc1bf..66d9cb6f 100644 --- a/test_static_asserts/date.cpp +++ b/test_static_asserts/date.cpp @@ -83,7 +83,7 @@ namespace } } -int main(int, char*[]) +int main(int, char* []) { allowed_comparands(); disallowed_comparands(); diff --git a/test_static_asserts/date_time.cpp b/test_static_asserts/date_time.cpp index e8db0a6d..2c16e2e3 100644 --- a/test_static_asserts/date_time.cpp +++ b/test_static_asserts/date_time.cpp @@ -83,7 +83,7 @@ namespace } } -int main(int, char*[]) +int main(int, char* []) { allowed_comparands(); disallowed_comparands(); diff --git a/test_static_asserts/insert.cpp b/test_static_asserts/insert.cpp index b6254d67..2236add0 100644 --- a/test_static_asserts/insert.cpp +++ b/test_static_asserts/insert.cpp @@ -168,7 +168,7 @@ namespace } } -int main(int, char*[]) +int main(int, char* []) { static_set(); dynamic_set(); diff --git a/test_static_asserts/where.cpp b/test_static_asserts/where.cpp index 2e624f7a..9fb5d9b3 100644 --- a/test_static_asserts/where.cpp +++ b/test_static_asserts/where.cpp @@ -143,7 +143,7 @@ namespace } } -int main(int, char*[]) +int main(int, char* []) { static_where(); dynamic_where(); diff --git a/tests/BooleanExpression.cpp b/tests/BooleanExpression.cpp index a078e61a..da9c14bb 100644 --- a/tests/BooleanExpression.cpp +++ b/tests/BooleanExpression.cpp @@ -28,7 +28,7 @@ #include "MockDb.h" #include -int BooleanExpression(int, char*[]) +int BooleanExpression(int, char* []) { MockDb db = {}; const auto t = test::TabBar{}; diff --git a/tests/CustomQuery.cpp b/tests/CustomQuery.cpp index d0cc4264..a35574cb 100644 --- a/tests/CustomQuery.cpp +++ b/tests/CustomQuery.cpp @@ -29,7 +29,7 @@ #include #include -int CustomQuery(int, char*[]) +int CustomQuery(int, char* []) { MockDb db = {}; MockDb::_serializer_context_t printer = {}; diff --git a/tests/DateTime.cpp b/tests/DateTime.cpp index 1783870f..b244bed2 100644 --- a/tests/DateTime.cpp +++ b/tests/DateTime.cpp @@ -30,7 +30,7 @@ SQLPP_ALIAS_PROVIDER(now) -int DateTime(int, char*[]) +int DateTime(int, char* []) { MockDb db = {}; MockDb::_serializer_context_t printer = {}; diff --git a/tests/Insert.cpp b/tests/Insert.cpp index a97fc9aa..0635f564 100644 --- a/tests/Insert.cpp +++ b/tests/Insert.cpp @@ -30,7 +30,7 @@ #include #include -int Insert(int, char*[]) +int Insert(int, char* []) { MockDb db = {}; MockDb::_serializer_context_t printer = {}; diff --git a/tests/Interpret.cpp b/tests/Interpret.cpp index b7c5a002..9b9fffe2 100644 --- a/tests/Interpret.cpp +++ b/tests/Interpret.cpp @@ -29,7 +29,7 @@ #include -int Interpret(int, char*[]) +int Interpret(int, char* []) { MockDb db = {}; MockDb::_serializer_context_t printer = {}; diff --git a/tests/Minimalistic.cpp b/tests/Minimalistic.cpp index 831b109a..28b4bb4d 100644 --- a/tests/Minimalistic.cpp +++ b/tests/Minimalistic.cpp @@ -1,6 +1,6 @@ #include -int Minimalistic(int, char*[]) +int Minimalistic(int, char* []) { return 0; } diff --git a/tests/Prepared.cpp b/tests/Prepared.cpp index 3138c0cf..e8796b02 100644 --- a/tests/Prepared.cpp +++ b/tests/Prepared.cpp @@ -29,7 +29,7 @@ #include #include -int Prepared(int, char*[]) +int Prepared(int, char* []) { MockDb db = {}; // test::TabFoo f; diff --git a/tests/Remove.cpp b/tests/Remove.cpp index 1b785e00..d0461b75 100644 --- a/tests/Remove.cpp +++ b/tests/Remove.cpp @@ -29,7 +29,7 @@ #include "MockDb.h" #include "is_regular.h" -int Remove(int, char*[]) +int Remove(int, char* []) { MockDb db = {}; MockDb::_serializer_context_t printer = {}; diff --git a/tests/Result.cpp b/tests/Result.cpp index 720b2870..c3219be8 100644 --- a/tests/Result.cpp +++ b/tests/Result.cpp @@ -31,7 +31,7 @@ static_assert(not sqlpp::enforce_null_result_treatment_t::value, "MockDb interprets NULL as trivial"); static_assert(sqlpp::enforce_null_result_treatment_t::value, "MockDb does not interpret NULL as trivial"); -int Result(int, char*[]) +int Result(int, char* []) { MockDb db = {}; EnforceDb edb{}; diff --git a/tests/Select.cpp b/tests/Select.cpp index 139b539e..db7c7172 100644 --- a/tests/Select.cpp +++ b/tests/Select.cpp @@ -42,7 +42,7 @@ int64_t getColumn(Db&& db, const Column& column) return 0; } -int Select(int, char*[]) +int Select(int, char* []) { MockDb db = {}; MockDb::_serializer_context_t printer = {}; diff --git a/tests/SelectType.cpp b/tests/SelectType.cpp index 18a12656..d516e21d 100644 --- a/tests/SelectType.cpp +++ b/tests/SelectType.cpp @@ -40,7 +40,7 @@ namespace alias SQLPP_ALIAS_PROVIDER(right) } -int SelectType(int, char*[]) +int SelectType(int, char* []) { MockDb db = {}; MockDb::_serializer_context_t printer = {}; diff --git a/tests/Union.cpp b/tests/Union.cpp index 818e5d0f..866e8385 100644 --- a/tests/Union.cpp +++ b/tests/Union.cpp @@ -29,7 +29,7 @@ #include #include -int Union(int, char*[]) +int Union(int, char* []) { MockDb db; MockDb::_serializer_context_t printer = {}; diff --git a/tests/Update.cpp b/tests/Update.cpp index 8922bc92..75b6f95d 100644 --- a/tests/Update.cpp +++ b/tests/Update.cpp @@ -29,7 +29,7 @@ #include "MockDb.h" #include "is_regular.h" -int Update(int, char*[]) +int Update(int, char* []) { MockDb db; MockDb::_serializer_context_t printer = {}; diff --git a/tests/With.cpp b/tests/With.cpp index 801c2581..5a0eb55a 100644 --- a/tests/With.cpp +++ b/tests/With.cpp @@ -29,7 +29,7 @@ #include #include -int With(int, char*[]) +int With(int, char* []) { MockDb db; MockDb::_serializer_context_t printer = {};