From e59dc3862a6a0aea86b6b836b86e903fdcbf8f23 Mon Sep 17 00:00:00 2001 From: rbock Date: Mon, 25 Aug 2014 21:22:22 +0200 Subject: [PATCH] An alias for creating a new statement type --- include/sqlpp11/extra_tables.h | 2 +- include/sqlpp11/from.h | 2 +- include/sqlpp11/group_by.h | 2 +- include/sqlpp11/having.h | 2 +- include/sqlpp11/insert_value_list.h | 2 +- include/sqlpp11/into.h | 2 +- include/sqlpp11/limit.h | 2 +- include/sqlpp11/offset.h | 2 +- include/sqlpp11/order_by.h | 2 +- include/sqlpp11/policy_update.h | 2 ++ include/sqlpp11/select_column_list.h | 2 +- include/sqlpp11/select_flag_list.h | 2 +- include/sqlpp11/single_table.h | 2 +- include/sqlpp11/update_list.h | 2 +- include/sqlpp11/using.h | 2 +- include/sqlpp11/where.h | 2 +- 16 files changed, 17 insertions(+), 15 deletions(-) diff --git a/include/sqlpp11/extra_tables.h b/include/sqlpp11/extra_tables.h index 991780b5..d6ff0eb2 100644 --- a/include/sqlpp11/extra_tables.h +++ b/include/sqlpp11/extra_tables.h @@ -140,7 +140,7 @@ namespace sqlpp struct _methods_t { template - using _new_statement_t = typename Policies::template _new_statement_t; + using _new_statement_t = new_statement; static void _check_consistency() {} diff --git a/include/sqlpp11/from.h b/include/sqlpp11/from.h index 3785d82c..6626801e 100644 --- a/include/sqlpp11/from.h +++ b/include/sqlpp11/from.h @@ -161,7 +161,7 @@ namespace sqlpp { using _database_t = typename Policies::_database_t; template - using _new_statement_t = typename Policies::template _new_statement_t; + using _new_statement_t = new_statement; static void _check_consistency() {} diff --git a/include/sqlpp11/group_by.h b/include/sqlpp11/group_by.h index 82bcbf39..5f647a51 100644 --- a/include/sqlpp11/group_by.h +++ b/include/sqlpp11/group_by.h @@ -170,7 +170,7 @@ namespace sqlpp { using _database_t = typename Policies::_database_t; template - using _new_statement_t = typename Policies::template _new_statement_t; + using _new_statement_t = new_statement; static void _check_consistency() {} diff --git a/include/sqlpp11/having.h b/include/sqlpp11/having.h index 48652ca0..92dfe983 100644 --- a/include/sqlpp11/having.h +++ b/include/sqlpp11/having.h @@ -168,7 +168,7 @@ namespace sqlpp { using _database_t = typename Policies::_database_t; template - using _new_statement_t = typename Policies::template _new_statement_t; + using _new_statement_t = new_statement; static void _check_consistency() {} diff --git a/include/sqlpp11/insert_value_list.h b/include/sqlpp11/insert_value_list.h index d80feea4..dcb6e503 100644 --- a/include/sqlpp11/insert_value_list.h +++ b/include/sqlpp11/insert_value_list.h @@ -329,7 +329,7 @@ namespace sqlpp { using _database_t = typename Policies::_database_t; template - using _new_statement_t = typename Policies::template _new_statement_t; + using _new_statement_t = new_statement; static void _check_consistency() { diff --git a/include/sqlpp11/into.h b/include/sqlpp11/into.h index 6cf97ff4..a8ab72be 100644 --- a/include/sqlpp11/into.h +++ b/include/sqlpp11/into.h @@ -138,7 +138,7 @@ namespace sqlpp { using _database_t = typename Policies::_database_t; template - using _new_statement_t = typename Policies::template _new_statement_t; + using _new_statement_t = new_statement; static void _check_consistency() { diff --git a/include/sqlpp11/limit.h b/include/sqlpp11/limit.h index 15962e7c..c6e7b793 100644 --- a/include/sqlpp11/limit.h +++ b/include/sqlpp11/limit.h @@ -207,7 +207,7 @@ namespace sqlpp { using _database_t = typename Policies::_database_t; template - using _new_statement_t = typename Policies::template _new_statement_t; + using _new_statement_t = new_statement; static void _check_consistency() {} diff --git a/include/sqlpp11/offset.h b/include/sqlpp11/offset.h index f7a84652..9b72ebec 100644 --- a/include/sqlpp11/offset.h +++ b/include/sqlpp11/offset.h @@ -218,7 +218,7 @@ namespace sqlpp { using _database_t = typename Policies::_database_t; template - using _new_statement_t = typename Policies::template _new_statement_t; + using _new_statement_t = new_statement; static void _check_consistency() {} diff --git a/include/sqlpp11/order_by.h b/include/sqlpp11/order_by.h index d94f1362..5e45d962 100644 --- a/include/sqlpp11/order_by.h +++ b/include/sqlpp11/order_by.h @@ -170,7 +170,7 @@ namespace sqlpp { using _database_t = typename Policies::_database_t; template - using _new_statement_t = typename Policies::template _new_statement_t; + using _new_statement_t = new_statement; static void _check_consistency() {} diff --git a/include/sqlpp11/policy_update.h b/include/sqlpp11/policy_update.h index ecb61181..1afd9c24 100644 --- a/include/sqlpp11/policy_update.h +++ b/include/sqlpp11/policy_update.h @@ -50,6 +50,8 @@ namespace sqlpp template using update_policies_t = typename update_policies_impl::type; + template + using new_statement = typename Policies::template _new_statement_t; } diff --git a/include/sqlpp11/select_column_list.h b/include/sqlpp11/select_column_list.h index b2609987..4466c1b1 100644 --- a/include/sqlpp11/select_column_list.h +++ b/include/sqlpp11/select_column_list.h @@ -364,7 +364,7 @@ namespace sqlpp { using _database_t = typename Policies::_database_t; template - using _new_statement_t = typename Policies::template _new_statement_t; + using _new_statement_t = new_statement; static void _check_consistency() {} diff --git a/include/sqlpp11/select_flag_list.h b/include/sqlpp11/select_flag_list.h index 28ec7912..f3b2aec7 100644 --- a/include/sqlpp11/select_flag_list.h +++ b/include/sqlpp11/select_flag_list.h @@ -169,7 +169,7 @@ namespace sqlpp { using _database_t = typename Policies::_database_t; template - using _new_statement_t = typename Policies::template _new_statement_t; + using _new_statement_t = new_statement; static void _check_consistency() {} diff --git a/include/sqlpp11/single_table.h b/include/sqlpp11/single_table.h index 9160c7e4..024cf81a 100644 --- a/include/sqlpp11/single_table.h +++ b/include/sqlpp11/single_table.h @@ -138,7 +138,7 @@ namespace sqlpp { using _database_t = typename Policies::_database_t; template - using _new_statement_t = typename Policies::template _new_statement_t; + using _new_statement_t = new_statement; static void _check_consistency() {} diff --git a/include/sqlpp11/update_list.h b/include/sqlpp11/update_list.h index 57252940..6fbc738f 100644 --- a/include/sqlpp11/update_list.h +++ b/include/sqlpp11/update_list.h @@ -165,7 +165,7 @@ namespace sqlpp { using _database_t = typename Policies::_database_t; template - using _new_statement_t = typename Policies::template _new_statement_t; + using _new_statement_t = new_statement; static void _check_consistency() { diff --git a/include/sqlpp11/using.h b/include/sqlpp11/using.h index a4897474..79e7d7cc 100644 --- a/include/sqlpp11/using.h +++ b/include/sqlpp11/using.h @@ -163,7 +163,7 @@ namespace sqlpp { using _database_t = typename Policies::_database_t; template - using _new_statement_t = typename Policies::template _new_statement_t; + using _new_statement_t = new_statement; static void _check_consistency() {} diff --git a/include/sqlpp11/where.h b/include/sqlpp11/where.h index dfcf0260..0404e9e5 100644 --- a/include/sqlpp11/where.h +++ b/include/sqlpp11/where.h @@ -220,7 +220,7 @@ namespace sqlpp { using _database_t = typename Policies::_database_t; template - using _new_statement_t = typename Policies::template _new_statement_t; + using _new_statement_t = new_statement; static void _check_consistency() {