diff --git a/include/sqlpp11/in_fwd.h b/include/sqlpp11/aggregate_function.h similarity index 86% rename from include/sqlpp11/in_fwd.h rename to include/sqlpp11/aggregate_function.h index cceeba81..6ddc12fd 100644 --- a/include/sqlpp11/in_fwd.h +++ b/include/sqlpp11/aggregate_function.h @@ -26,10 +26,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -namespace sqlpp -{ - template - struct in_t; - template - struct not_in_t; -} // namespace sqlpp +#include +#include +#include +#include +#include diff --git a/include/sqlpp11/aggregate_functions/avg.h b/include/sqlpp11/aggregate_function/avg.h similarity index 100% rename from include/sqlpp11/aggregate_functions/avg.h rename to include/sqlpp11/aggregate_function/avg.h diff --git a/include/sqlpp11/aggregate_functions/count.h b/include/sqlpp11/aggregate_function/count.h similarity index 98% rename from include/sqlpp11/aggregate_functions/count.h rename to include/sqlpp11/aggregate_function/count.h index 2ab43135..b2d3a514 100644 --- a/include/sqlpp11/aggregate_functions/count.h +++ b/include/sqlpp11/aggregate_function/count.h @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include diff --git a/include/sqlpp11/aggregate_functions/max.h b/include/sqlpp11/aggregate_function/max.h similarity index 100% rename from include/sqlpp11/aggregate_functions/max.h rename to include/sqlpp11/aggregate_function/max.h diff --git a/include/sqlpp11/aggregate_functions/min.h b/include/sqlpp11/aggregate_function/min.h similarity index 100% rename from include/sqlpp11/aggregate_functions/min.h rename to include/sqlpp11/aggregate_function/min.h diff --git a/include/sqlpp11/aggregate_functions/sum.h b/include/sqlpp11/aggregate_function/sum.h similarity index 100% rename from include/sqlpp11/aggregate_functions/sum.h rename to include/sqlpp11/aggregate_function/sum.h diff --git a/include/sqlpp11/aggregate_functions.h b/include/sqlpp11/aggregate_functions.h deleted file mode 100644 index f39903e2..00000000 --- a/include/sqlpp11/aggregate_functions.h +++ /dev/null @@ -1,33 +0,0 @@ -#pragma once - -/* - * Copyright (c) 2013-2015, Roland Bock - * 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. - */ - -#include -#include -#include -#include -#include diff --git a/include/sqlpp11/for_update.h b/include/sqlpp11/clause/for_update.h similarity index 100% rename from include/sqlpp11/for_update.h rename to include/sqlpp11/clause/for_update.h diff --git a/include/sqlpp11/from.h b/include/sqlpp11/clause/from.h similarity index 100% rename from include/sqlpp11/from.h rename to include/sqlpp11/clause/from.h diff --git a/include/sqlpp11/group_by.h b/include/sqlpp11/clause/group_by.h similarity index 100% rename from include/sqlpp11/group_by.h rename to include/sqlpp11/clause/group_by.h diff --git a/include/sqlpp11/having.h b/include/sqlpp11/clause/having.h similarity index 100% rename from include/sqlpp11/having.h rename to include/sqlpp11/clause/having.h diff --git a/include/sqlpp11/insert.h b/include/sqlpp11/clause/insert.h similarity index 97% rename from include/sqlpp11/insert.h rename to include/sqlpp11/clause/insert.h index 2161885a..5d01845f 100644 --- a/include/sqlpp11/insert.h +++ b/include/sqlpp11/clause/insert.h @@ -33,8 +33,8 @@ #include #include #include -#include -#include +#include +#include namespace sqlpp { diff --git a/include/sqlpp11/insert_value.h b/include/sqlpp11/clause/insert_value.h similarity index 100% rename from include/sqlpp11/insert_value.h rename to include/sqlpp11/clause/insert_value.h diff --git a/include/sqlpp11/insert_value_list.h b/include/sqlpp11/clause/insert_value_list.h similarity index 99% rename from include/sqlpp11/insert_value_list.h rename to include/sqlpp11/clause/insert_value_list.h index 95b18bc6..50528f9e 100644 --- a/include/sqlpp11/insert_value_list.h +++ b/include/sqlpp11/clause/insert_value_list.h @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include #include diff --git a/include/sqlpp11/into.h b/include/sqlpp11/clause/into.h similarity index 100% rename from include/sqlpp11/into.h rename to include/sqlpp11/clause/into.h diff --git a/include/sqlpp11/limit.h b/include/sqlpp11/clause/limit.h similarity index 100% rename from include/sqlpp11/limit.h rename to include/sqlpp11/clause/limit.h diff --git a/include/sqlpp11/offset.h b/include/sqlpp11/clause/offset.h similarity index 100% rename from include/sqlpp11/offset.h rename to include/sqlpp11/clause/offset.h diff --git a/include/sqlpp11/order_by.h b/include/sqlpp11/clause/order_by.h similarity index 100% rename from include/sqlpp11/order_by.h rename to include/sqlpp11/clause/order_by.h diff --git a/include/sqlpp11/remove.h b/include/sqlpp11/clause/remove.h similarity index 97% rename from include/sqlpp11/remove.h rename to include/sqlpp11/clause/remove.h index f06631fe..7edc5b26 100644 --- a/include/sqlpp11/remove.h +++ b/include/sqlpp11/clause/remove.h @@ -32,9 +32,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include namespace sqlpp { diff --git a/include/sqlpp11/select.h b/include/sqlpp11/clause/select.h similarity index 86% rename from include/sqlpp11/select.h rename to include/sqlpp11/clause/select.h index 318f68a1..7a8adceb 100644 --- a/include/sqlpp11/select.h +++ b/include/sqlpp11/clause/select.h @@ -30,18 +30,18 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include namespace sqlpp diff --git a/include/sqlpp11/select_as.h b/include/sqlpp11/clause/select_as.h similarity index 100% rename from include/sqlpp11/select_as.h rename to include/sqlpp11/clause/select_as.h diff --git a/include/sqlpp11/select_column_list.h b/include/sqlpp11/clause/select_column_list.h similarity index 99% rename from include/sqlpp11/select_column_list.h rename to include/sqlpp11/clause/select_column_list.h index 8d3135c0..d7dff79f 100644 --- a/include/sqlpp11/select_column_list.h +++ b/include/sqlpp11/clause/select_column_list.h @@ -33,8 +33,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/include/sqlpp11/select_column_traits.h b/include/sqlpp11/clause/select_column_traits.h similarity index 100% rename from include/sqlpp11/select_column_traits.h rename to include/sqlpp11/clause/select_column_traits.h diff --git a/include/sqlpp11/select_flag_list.h b/include/sqlpp11/clause/select_flag_list.h similarity index 99% rename from include/sqlpp11/select_flag_list.h rename to include/sqlpp11/clause/select_flag_list.h index 06b3a69b..5dc346ac 100644 --- a/include/sqlpp11/select_flag_list.h +++ b/include/sqlpp11/clause/select_flag_list.h @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include diff --git a/include/sqlpp11/select_flags.h b/include/sqlpp11/clause/select_flags.h similarity index 100% rename from include/sqlpp11/select_flags.h rename to include/sqlpp11/clause/select_flags.h diff --git a/include/sqlpp11/update.h b/include/sqlpp11/clause/update.h similarity index 97% rename from include/sqlpp11/update.h rename to include/sqlpp11/clause/update.h index 717ab3ca..8b408237 100644 --- a/include/sqlpp11/update.h +++ b/include/sqlpp11/clause/update.h @@ -32,9 +32,9 @@ #include #include #include -#include +#include #include -#include +#include namespace sqlpp { diff --git a/include/sqlpp11/update_list.h b/include/sqlpp11/clause/update_list.h similarity index 100% rename from include/sqlpp11/update_list.h rename to include/sqlpp11/clause/update_list.h diff --git a/include/sqlpp11/using.h b/include/sqlpp11/clause/using.h similarity index 100% rename from include/sqlpp11/using.h rename to include/sqlpp11/clause/using.h diff --git a/include/sqlpp11/where.h b/include/sqlpp11/clause/where.h similarity index 100% rename from include/sqlpp11/where.h rename to include/sqlpp11/clause/where.h diff --git a/include/sqlpp11/with.h b/include/sqlpp11/clause/with.h similarity index 100% rename from include/sqlpp11/with.h rename to include/sqlpp11/clause/with.h diff --git a/include/sqlpp11/cte.h b/include/sqlpp11/cte.h index 30b18e33..09337598 100644 --- a/include/sqlpp11/cte.h +++ b/include/sqlpp11/cte.h @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include #include @@ -169,10 +169,10 @@ namespace sqlpp { static_assert(is_statement_t::value, "argument of union call has to be a statement"); static_assert(has_policy_t::value, "argument of union call has to be a select"); - static_assert(has_result_row_t::value, "argument of a union has to be a (complete) select statement"); + static_assert(has_result_row_t::value, "argument of a clause/union.has to be a (complete) select statement"); static_assert(std::is_same<_result_row_t, get_result_row_t>::value, - "both select statements in a union have to have the same result columns (type and name)"); + "both select statements in a clause/union.have to have the same result columns (type and name)"); return _union_impl(check_cte_union_t{}, rhs); } @@ -184,10 +184,10 @@ namespace sqlpp { static_assert(is_statement_t::value, "argument of union call has to be a statement"); static_assert(has_policy_t::value, "argument of union call has to be a select"); - static_assert(has_result_row_t::value, "argument of a union has to be a (complete) select statement"); + static_assert(has_result_row_t::value, "argument of a clause/union.has to be a (complete) select statement"); static_assert(std::is_same<_result_row_t, get_result_row_t>::value, - "both select statements in a union have to have the same result columns (type and name)"); + "both select statements in a clause/union.have to have the same result columns (type and name)"); return _union_impl(check_cte_union_t{}, rhs); } diff --git a/include/sqlpp11/field_spec.h b/include/sqlpp11/field_spec.h index 3bf3dbe7..8b1d25c7 100644 --- a/include/sqlpp11/field_spec.h +++ b/include/sqlpp11/field_spec.h @@ -29,7 +29,7 @@ #include #include -#include +#include namespace sqlpp { diff --git a/include/sqlpp11/functions.h b/include/sqlpp11/function.h similarity index 94% rename from include/sqlpp11/functions.h rename to include/sqlpp11/function.h index e5d2999f..98268aee 100644 --- a/include/sqlpp11/functions.h +++ b/include/sqlpp11/function.h @@ -30,11 +30,11 @@ #include #include #include -#include -#include +#include +#include #include -#include -#include +#include +#include #include #include // Csaba Csoma suggests: unsafe_sql instead of verbatim #include diff --git a/include/sqlpp11/is_null_fwd.h b/include/sqlpp11/is_null_fwd.h deleted file mode 100644 index 888ff84a..00000000 --- a/include/sqlpp11/is_null_fwd.h +++ /dev/null @@ -1,35 +0,0 @@ -#pragma once - -/* - * Copyright (c) 2013-2015, Roland Bock - * 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. - */ - -namespace sqlpp -{ - template - struct is_null_t; - template - struct is_not_null_t; -} // namespace sqlpp diff --git a/include/sqlpp11/lower.h b/include/sqlpp11/lower.h deleted file mode 100644 index 4f30e177..00000000 --- a/include/sqlpp11/lower.h +++ /dev/null @@ -1,72 +0,0 @@ -#pragma once - -/* - * Copyright (c) 2023, Roland Bock - * 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. - */ - -#include -#include - -namespace sqlpp -{ - template - struct lower_t - { - using _traits = make_traits; - - using _nodes = detail::type_vector; - - lower_t(const Expr expr) : _expr(expr) - { - } - - lower_t(const lower_t&) = default; - lower_t(lower_t&&) = default; - lower_t& operator=(const lower_t&) = default; - lower_t& operator=(lower_t&&) = default; - ~lower_t() = default; - - Expr _expr; - }; - - template - Context& serialize(Context& context, const lower_t& t) - { - context << "LOWER("; - serialize_operand(context, t._expr); - context << ")"; - return context; - } - - template - using check_lower_args = std::enable_if_t::value>; - - template > - auto lower(T t) -> lower_t - { - return {std::move(t)}; - } - -} // namespace sqlpp diff --git a/include/sqlpp11/mysql/bind_result.h b/include/sqlpp11/mysql/bind_result.h index 9e3245cf..d56bc585 100644 --- a/include/sqlpp11/mysql/bind_result.h +++ b/include/sqlpp11/mysql/bind_result.h @@ -55,7 +55,7 @@ namespace sqlpp bind_result_t(const std::shared_ptr& handle) : _handle{handle} { if (_handle and _handle->debug) - std::cerr << "MySQL debug: Constructing bind result, using handle at " << _handle.get() << std::endl; + std::cerr << "MySQL debug: Constructing bind result, clause/using.handle at " << _handle.get() << std::endl; } bind_result_t(const bind_result_t&) = delete; bind_result_t(bind_result_t&& rhs) = default; diff --git a/include/sqlpp11/mysql/char_result.h b/include/sqlpp11/mysql/char_result.h index 73031192..75a35cf1 100644 --- a/include/sqlpp11/mysql/char_result.h +++ b/include/sqlpp11/mysql/char_result.h @@ -57,7 +57,7 @@ namespace sqlpp throw sqlpp::exception{"MySQL: Constructing char_result without valid handle"}; if (_handle->debug) - std::cerr << "MySQL debug: Constructing result, using handle at " << _handle.get() << std::endl; + std::cerr << "MySQL debug: Constructing result, clause/using.handle at " << _handle.get() << std::endl; } char_result_t(const char_result_t&) = delete; diff --git a/include/sqlpp11/mysql/connection.h b/include/sqlpp11/mysql/connection.h index 9a7b1ea0..94991a9c 100644 --- a/include/sqlpp11/mysql/connection.h +++ b/include/sqlpp11/mysql/connection.h @@ -35,8 +35,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/include/sqlpp11/mysql/prepared_statement.h b/include/sqlpp11/mysql/prepared_statement.h index 6e3d6fe0..4795350b 100644 --- a/include/sqlpp11/mysql/prepared_statement.h +++ b/include/sqlpp11/mysql/prepared_statement.h @@ -51,7 +51,7 @@ namespace sqlpp prepared_statement_t(std::shared_ptr&& handle) : _handle{std::move(handle)} { if (_handle and _handle->debug) - std::cerr << "MySQL debug: Constructing prepared_statement, using handle at " << _handle.get() << std::endl; + std::cerr << "MySQL debug: Constructing prepared_statement, clause/using.handle at " << _handle.get() << std::endl; } prepared_statement_t(const prepared_statement_t&) = delete; diff --git a/include/sqlpp11/mysql/remove.h b/include/sqlpp11/mysql/remove.h index c24be9e6..1e7cf32b 100644 --- a/include/sqlpp11/mysql/remove.h +++ b/include/sqlpp11/mysql/remove.h @@ -26,9 +26,9 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include -#include -#include +#include +#include +#include namespace sqlpp { diff --git a/include/sqlpp11/mysql/serializer.h b/include/sqlpp11/mysql/serializer.h index 9f8f07bc..466430f6 100644 --- a/include/sqlpp11/mysql/serializer.h +++ b/include/sqlpp11/mysql/serializer.h @@ -27,7 +27,7 @@ */ #include -#include +#include namespace sqlpp { diff --git a/include/sqlpp11/mysql/update.h b/include/sqlpp11/mysql/update.h index bc0a24fc..3fb7d43e 100644 --- a/include/sqlpp11/mysql/update.h +++ b/include/sqlpp11/mysql/update.h @@ -26,9 +26,9 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include -#include -#include +#include +#include +#include namespace sqlpp { diff --git a/include/sqlpp11/operator/as_expression.h b/include/sqlpp11/operator/as_expression.h index 4099202c..3f90dc42 100644 --- a/include/sqlpp11/operator/as_expression.h +++ b/include/sqlpp11/operator/as_expression.h @@ -69,7 +69,7 @@ namespace sqlpp { serialize_operand(context, t._expression); context << " AS "; - context << name_tag_of_t>::_name_t::template char_ptr(); + context << name_tag_of_t::_name_t::template char_ptr(); return context; } template diff --git a/include/sqlpp11/postgresql/bind_result.h b/include/sqlpp11/postgresql/bind_result.h index 6079f4a4..69013673 100644 --- a/include/sqlpp11/postgresql/bind_result.h +++ b/include/sqlpp11/postgresql/bind_result.h @@ -155,7 +155,7 @@ namespace sqlpp _var_buffers.resize(_handle->result.field_count()); if (this->_handle && this->_handle->debug()) { - std::cerr << "PostgreSQL debug: constructing bind result, using handle at: " << this->_handle.get() + std::cerr << "PostgreSQL debug: constructing bind result, clause/using.handle at: " << this->_handle.get() << std::endl; } } diff --git a/include/sqlpp11/postgresql/exception.h b/include/sqlpp11/postgresql/exception.h index 30ed6d2b..174124ef 100644 --- a/include/sqlpp11/postgresql/exception.h +++ b/include/sqlpp11/postgresql/exception.h @@ -28,7 +28,7 @@ */ /** - classes copied from http://pqxx.org/devprojects/libpqxx/doc/3.1/html/Reference/a00032.html + classes copied clause/from.http://pqxx.org/devprojects/libpqxx/doc/3.1/html/Reference/a00032.html */ #include "visibility.h" diff --git a/include/sqlpp11/postgresql/insert.h b/include/sqlpp11/postgresql/insert.h index 7adaf98d..c3009a0a 100644 --- a/include/sqlpp11/postgresql/insert.h +++ b/include/sqlpp11/postgresql/insert.h @@ -26,7 +26,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include +#include #include #include diff --git a/include/sqlpp11/postgresql/on_conflict.h b/include/sqlpp11/postgresql/on_conflict.h index 670e72fc..a86aca07 100644 --- a/include/sqlpp11/postgresql/on_conflict.h +++ b/include/sqlpp11/postgresql/on_conflict.h @@ -28,7 +28,7 @@ */ #include -#include +#include #include namespace sqlpp diff --git a/include/sqlpp11/postgresql/on_conflict_do_update.h b/include/sqlpp11/postgresql/on_conflict_do_update.h index cc02811f..8fbe8ad4 100644 --- a/include/sqlpp11/postgresql/on_conflict_do_update.h +++ b/include/sqlpp11/postgresql/on_conflict_do_update.h @@ -30,7 +30,7 @@ #include #include #include -#include +#include namespace sqlpp { diff --git a/include/sqlpp11/postgresql/postgresql.h b/include/sqlpp11/postgresql/postgresql.h index 0dcd1d0d..62abb2fb 100644 --- a/include/sqlpp11/postgresql/postgresql.h +++ b/include/sqlpp11/postgresql/postgresql.h @@ -31,6 +31,6 @@ #include #include #include -#include -#include -#include +#include +#include +#include diff --git a/include/sqlpp11/postgresql/prepared_statement.h b/include/sqlpp11/postgresql/prepared_statement.h index f160f18e..db73eebf 100644 --- a/include/sqlpp11/postgresql/prepared_statement.h +++ b/include/sqlpp11/postgresql/prepared_statement.h @@ -67,7 +67,7 @@ namespace sqlpp { if (_handle && _handle->debug()) { - std::cerr << "PostgreSQL debug: constructing prepared_statement, using handle at: " << _handle.get() + std::cerr << "PostgreSQL debug: constructing prepared_statement, clause/using.handle at: " << _handle.get() << std::endl; } } diff --git a/include/sqlpp11/postgresql/remove.h b/include/sqlpp11/postgresql/remove.h index 5df12402..ac884c8c 100644 --- a/include/sqlpp11/postgresql/remove.h +++ b/include/sqlpp11/postgresql/remove.h @@ -26,7 +26,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include +#include #include namespace sqlpp diff --git a/include/sqlpp11/postgresql/returning.h b/include/sqlpp11/postgresql/returning.h index 59a6c76a..72bf8ba5 100644 --- a/include/sqlpp11/postgresql/returning.h +++ b/include/sqlpp11/postgresql/returning.h @@ -28,7 +28,7 @@ */ #include -#include +#include #include namespace sqlpp diff --git a/include/sqlpp11/postgresql/update.h b/include/sqlpp11/postgresql/update.h index f7a200c2..919d62fc 100644 --- a/include/sqlpp11/postgresql/update.h +++ b/include/sqlpp11/postgresql/update.h @@ -26,7 +26,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include +#include #include namespace sqlpp diff --git a/include/sqlpp11/sqlite3/bind_result.h b/include/sqlpp11/sqlite3/bind_result.h index 1bba1463..2c1bfd02 100644 --- a/include/sqlpp11/sqlite3/bind_result.h +++ b/include/sqlpp11/sqlite3/bind_result.h @@ -57,7 +57,7 @@ namespace sqlpp bind_result_t(const std::shared_ptr& handle) : _handle{handle} { if (_handle and _handle->debug) - std::cerr << "Sqlite3 debug: Constructing bind result, using handle at " << _handle.get() << std::endl; + std::cerr << "Sqlite3 debug: Constructing bind result, clause/using.handle at " << _handle.get() << std::endl; } bind_result_t(const bind_result_t&) = delete; diff --git a/include/sqlpp11/sqlite3/insert_or.h b/include/sqlpp11/sqlite3/insert_or.h index 698904d2..144a7658 100644 --- a/include/sqlpp11/sqlite3/insert_or.h +++ b/include/sqlpp11/sqlite3/insert_or.h @@ -27,8 +27,8 @@ */ #include -#include -#include +#include +#include #include #include #include diff --git a/include/sqlpp11/sqlite3/prepared_statement.h b/include/sqlpp11/sqlite3/prepared_statement.h index daac5e98..dc1fe563 100644 --- a/include/sqlpp11/sqlite3/prepared_statement.h +++ b/include/sqlpp11/sqlite3/prepared_statement.h @@ -82,7 +82,7 @@ namespace sqlpp prepared_statement_t(std::shared_ptr&& handle) : _handle(std::move(handle)) { if (_handle and _handle->debug) - std::cerr << "Sqlite3 debug: Constructing prepared_statement, using handle at " << _handle.get() << std::endl; + std::cerr << "Sqlite3 debug: Constructing prepared_statement, clause/using.handle at " << _handle.get() << std::endl; } prepared_statement_t(const prepared_statement_t&) = delete; prepared_statement_t(prepared_statement_t&& rhs) = default; diff --git a/include/sqlpp11/sqlite3/serializer.h b/include/sqlpp11/sqlite3/serializer.h index 0b05fc67..d696529a 100644 --- a/include/sqlpp11/sqlite3/serializer.h +++ b/include/sqlpp11/sqlite3/serializer.h @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include diff --git a/include/sqlpp11/sqlpp11.h b/include/sqlpp11/sqlpp11.h index 57a0afe3..31b54f17 100644 --- a/include/sqlpp11/sqlpp11.h +++ b/include/sqlpp11/sqlpp11.h @@ -27,13 +27,12 @@ */ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include -#include #include #include diff --git a/include/sqlpp11/trim.h b/include/sqlpp11/trim.h deleted file mode 100644 index 68087b6c..00000000 --- a/include/sqlpp11/trim.h +++ /dev/null @@ -1,80 +0,0 @@ -#pragma once - -/* - * Copyright (c) 2013-2015, Roland Bock - * Copyright (c) 2017, Juan Dent - * 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. - */ - -#include -#include - -namespace sqlpp -{ - template - struct trim_t - { - using _traits = make_traits; - - trim_t(const Expr expr) : _expr(expr) - { - } - - trim_t(const trim_t&) = default; - trim_t(trim_t&&) = default; - trim_t& operator=(const trim_t&) = default; - trim_t& operator=(trim_t&&) = default; - ~trim_t() = default; - - Expr _expr; - }; - - template - struct value_type_of> : public value_type_of {}; - - template - struct nodes_of> - { - using type = detail::type_vector; - }; - - template - Context& serialize(Context& context, const trim_t& t) - { - context << "TRIM("; - serialize_operand(context, t._expr); - context << ")"; - return context; - } - - template - using check_trim_args = std::enable_if_t::value>; - - template > - auto trim(T t) -> trim_t - { - return {std::move(t)}; - } - -} // namespace sqlpp diff --git a/include/sqlpp11/union.h b/include/sqlpp11/union.h deleted file mode 100644 index ab91aa84..00000000 --- a/include/sqlpp11/union.h +++ /dev/null @@ -1,197 +0,0 @@ -#pragma once - -/* - * Copyright (c) 2013-2016, Roland Bock - * 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. - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace sqlpp -{ - struct no_union_t; - - using blank_union_t = statement_t; - // There is no order by or limit or offset in union, use it as a pseudo table to do that. - - template - struct union_statement_impl - { - using type = Check; - }; - - template - struct union_statement_impl - { - using type = statement_t; - }; - - template - using union_statement_t = typename union_statement_impl::type; - - // UNION(EXPR) - template - struct union_t - { - using _traits = make_traits; - using _nodes = detail::type_vector; - - using _data_t = union_data_t; - - // Base template to be inherited by the statement - template - struct _base_t - { - _base_t(_data_t data) : _data{std::move(data)} - { - } - - _data_t _data; - - using _selected_columns_t = typename std::decay::type; - _selected_columns_t& get_selected_columns() - { - return _data._lhs.get_selected_columns(); - } - const _selected_columns_t& get_selected_columns() const - { - return _data._lhs.get_selected_columns(); - } - - using _consistency_check = detail::get_first_if; - }; - - template - using _result_methods_t = typename Lhs::template _result_methods_t; - }; - - SQLPP_PORTABLE_STATIC_ASSERT(assert_union_args_are_statements_t, "arguments for union() must be statements"); - template - struct check_union - { - using type = static_combined_check_t< - static_check_t::value...>::value, assert_union_args_are_statements_t>>; - }; - template - using check_union_t = typename check_union::type; - - // NO UNION YET - struct no_union_t - { - using _traits = make_traits; - using _nodes = detail::type_vector<>; - - // Data - using _data_t = no_data_t; - - template - struct _base_t - { - _base_t() = default; - _base_t(_data_t data) : _data{std::move(data)} - { - } - - _data_t _data; - - template - using _new_statement_t = union_statement_t; - - using _consistency_check = consistent_t; - - template - auto union_distinct(Rhs rhs) const - -> _new_statement_t, Rhs>, - union_t, Rhs>> - { - static_assert(is_statement_t::value, "argument of union call has to be a statement"); - static_assert(has_policy_t::value, "argument of union call has to be a select"); - static_assert(has_result_row_t::value, "argument of a union has to be a complete select statement"); - static_assert(has_result_row_t>::value, - "left hand side argument of a union has to be a complete select statement or union"); - - using lhs_result_row_t = get_result_row_t>; - using rhs_result_row_t = get_result_row_t; - static_assert(is_result_compatible::value, - "both arguments in a union have to have the same result columns (type and name)"); - - return _union_impl(check_union_t, Rhs>{}, rhs); - } - - template - auto union_all(Rhs rhs) const -> _new_statement_t, Rhs>, - union_t, Rhs>> - { - static_assert(is_statement_t::value, "argument of union call has to be a statement"); - static_assert(has_policy_t::value, "argument of union call has to be a select"); - static_assert(has_result_row_t::value, "argument of a union has to be a (complete) select statement"); - static_assert(has_result_row_t>::value, - "left hand side argument of a union has to be a (complete) select statement"); - - using lhs_result_row_t = get_result_row_t>; - using rhs_result_row_t = get_result_row_t; - static_assert(is_result_compatible::value, - "both arguments in a union have to have the same result columns (type and name)"); - - return _union_impl(check_union_t, Rhs>{}, rhs); - } - - private: - template - auto _union_impl(Check, Rhs rhs) const -> inconsistent; - - template - auto _union_impl(consistent_t /*unused*/, Rhs rhs) const - -> _new_statement_t, Rhs>> - { - return {blank_union_t{}, union_data_t, Rhs>{ - static_cast&>(*this), rhs}}; - } - }; - }; - - /* - template - auto union_all(T&& t) -> decltype(statement_t().union_all(std::forward(t))) - { - return statement_t().union_all(std::forward(t)); - } - - template - auto union_distinct(T&& t) -> decltype(statement_t().union_distinct(std::forward(t))) - { - return statement_t().union_distinct(std::forward(t)); - } - */ -} // namespace sqlpp diff --git a/include/sqlpp11/upper.h b/include/sqlpp11/upper.h deleted file mode 100644 index 466e739b..00000000 --- a/include/sqlpp11/upper.h +++ /dev/null @@ -1,72 +0,0 @@ -#pragma once - -/* - * Copyright (c) 2023, Roland Bock - * 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. - */ - -#include -#include - -namespace sqlpp -{ - template - struct upper_t - { - using _traits = make_traits; - - using _nodes = detail::type_vector; - - upper_t(const Expr expr) : _expr(expr) - { - } - - upper_t(const upper_t&) = default; - upper_t(upper_t&&) = default; - upper_t& operator=(const upper_t&) = default; - upper_t& operator=(upper_t&&) = default; - ~upper_t() = default; - - Expr _expr; - }; - - template - Context& serialize(Context& context, const upper_t& t) - { - context << "UPPER("; - serialize_operand(context, t._expr); - context << ")"; - return context; - } - - template - using check_upper_args = std::enable_if_t::value>; - - template > - auto upper(T t) -> upper_t - { - return {std::move(t)}; - } - -} // namespace sqlpp diff --git a/include/sqlpp11/without_table_check.h b/include/sqlpp11/without_table_check.h deleted file mode 100644 index 793d83b4..00000000 --- a/include/sqlpp11/without_table_check.h +++ /dev/null @@ -1,60 +0,0 @@ -#pragma once - -/* - * Copyright (c) 2016-2016, Roland Bock - * 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. - */ - -#include - -namespace sqlpp -{ - template - struct without_table_check_t: public Expression - { - using _required_tables = detail::type_set<>; - - without_table_check_t(Expression expression) : Expression(expression) - { - } - - const Expression& expr() const { return *this; } - }; - - template - Context& serialize(Context& context, const without_table_check_t& t) - { - serialize(context, t.expr()); - return context; - } - - template - auto without_table_check(Expression expr) -> without_table_check_t - { - static_assert(is_expression_t::value or is_alias_t::value, - "invalid argument (expression or alias expression expected)"); - - return {expr}; - } -} // namespace sqlpp diff --git a/tests/core/constraints/must_not_insert.cpp b/tests/core/constraints/must_not_insert.cpp index 7047e7d8..1fffd2cd 100644 --- a/tests/core/constraints/must_not_insert.cpp +++ b/tests/core/constraints/must_not_insert.cpp @@ -30,7 +30,7 @@ #include "Sample.h" #include "MockDb.h" -#include +#include #include MockDb db; diff --git a/tests/core/constraints/must_not_update.cpp b/tests/core/constraints/must_not_update.cpp index 18c9790d..11944091 100644 --- a/tests/core/constraints/must_not_update.cpp +++ b/tests/core/constraints/must_not_update.cpp @@ -30,7 +30,7 @@ #include "Sample.h" #include "MockDb.h" -#include +#include MockDb db; diff --git a/tests/core/constraints/require_insert.cpp b/tests/core/constraints/require_insert.cpp index f6e2e405..6c0615de 100644 --- a/tests/core/constraints/require_insert.cpp +++ b/tests/core/constraints/require_insert.cpp @@ -30,7 +30,7 @@ #include "Sample.h" #include "MockDb.h" -#include +#include #include MockDb db; diff --git a/tests/core/static_asserts/aggregates.cpp b/tests/core/static_asserts/aggregates.cpp index 3c1f539d..bc4516cb 100644 --- a/tests/core/static_asserts/aggregates.cpp +++ b/tests/core/static_asserts/aggregates.cpp @@ -29,7 +29,7 @@ #include #include #include -#include +#include namespace { diff --git a/tests/core/types/CMakeLists.txt b/tests/core/types/CMakeLists.txt index 73f12ce1..e260ba8c 100644 --- a/tests/core/types/CMakeLists.txt +++ b/tests/core/types/CMakeLists.txt @@ -35,7 +35,7 @@ function(test_compile name) endfunction() add_subdirectory(operator) -test_compile(aggregate_functions) +test_compile(aggregate_function) test_compile(case_when) test_compile(dynamic) test_compile(result_row) diff --git a/tests/core/types/aggregate_functions.cpp b/tests/core/types/aggregate_function.cpp similarity index 100% rename from tests/core/types/aggregate_functions.cpp rename to tests/core/types/aggregate_function.cpp diff --git a/tests/core/types/dynamic.cpp b/tests/core/types/dynamic.cpp index bd87fd6b..ccd4b255 100644 --- a/tests/core/types/dynamic.cpp +++ b/tests/core/types/dynamic.cpp @@ -56,8 +56,8 @@ void test_dynamic(Value v) static_assert(not sqlpp::has_name::value, ""); static_assert(not sqlpp::has_name::value, ""); - static_assert(sqlpp::has_name::value, ""); - static_assert(sqlpp::has_name::value, ""); + static_assert(not sqlpp::has_name::value, ""); + static_assert(not sqlpp::has_name::value, ""); static_assert(is_select_column_value_type::value, ""); static_assert(is_select_column_value_type::value, ""); diff --git a/tests/core/types/select_as.cpp b/tests/core/types/select_as.cpp index c7f5b958..173d51da 100644 --- a/tests/core/types/select_as.cpp +++ b/tests/core/types/select_as.cpp @@ -76,8 +76,11 @@ void test_select_as(Value v) static_assert(is_same_type(), ""); // The column of a single-value pseudo table can be renamed and used as named value - static_assert(sqlpp::has_name::value, ""); - static_assert(sqlpp::has_name::value, ""); + static_assert(not sqlpp::has_name::value, ""); + static_assert(not sqlpp::has_name::value, ""); + + static_assert(sqlpp::select_column_has_name::value, ""); + static_assert(sqlpp::select_column_has_name::value, ""); static_assert(is_select_column_same_type(), ""); static_assert(is_select_column_same_type(), ""); @@ -102,8 +105,11 @@ void test_select_as(Value v) static_assert(is_same_type(), ""); // The column of a multi-value pseudo table can be renamed and used as named value - static_assert(sqlpp::has_name::value, ""); - static_assert(sqlpp::has_name::value, ""); + static_assert(not sqlpp::has_name::value, ""); + static_assert(not sqlpp::has_name::value, ""); + + static_assert(sqlpp::select_column_has_name::value, ""); + static_assert(sqlpp::select_column_has_name::value, ""); static_assert(is_select_column_same_type(), ""); static_assert(is_select_column_same_type(), ""); diff --git a/tests/core/usage/Function.cpp b/tests/core/usage/Function.cpp index eb1cbdb7..a2ed0839 100644 --- a/tests/core/usage/Function.cpp +++ b/tests/core/usage/Function.cpp @@ -27,7 +27,7 @@ #include "MockDb.h" #include #include -#include +#include #include #include diff --git a/tests/core/usage/Insert.cpp b/tests/core/usage/Insert.cpp index 36a48621..1014406b 100644 --- a/tests/core/usage/Insert.cpp +++ b/tests/core/usage/Insert.cpp @@ -29,8 +29,8 @@ #include #include #include -#include -#include +#include +#include int Insert(int, char*[]) { diff --git a/tests/core/usage/Prepared.cpp b/tests/core/usage/Prepared.cpp index eb4ae271..3faddda1 100644 --- a/tests/core/usage/Prepared.cpp +++ b/tests/core/usage/Prepared.cpp @@ -27,7 +27,7 @@ #include "MockDb.h" #include "is_regular.h" #include -#include +#include #include "../../include/test_helpers.h" int Prepared(int, char* []) diff --git a/tests/core/usage/Select.cpp b/tests/core/usage/Select.cpp index ac166b79..dfbf76ed 100644 --- a/tests/core/usage/Select.cpp +++ b/tests/core/usage/Select.cpp @@ -31,8 +31,7 @@ #include #include #include -#include -#include +#include #include "../../include/test_helpers.h" struct to_cerr diff --git a/tests/core/usage/SelectType.cpp b/tests/core/usage/SelectType.cpp index fa4d8cfa..3adf8262 100644 --- a/tests/core/usage/SelectType.cpp +++ b/tests/core/usage/SelectType.cpp @@ -29,8 +29,7 @@ #include #include #include -#include -#include +#include #include "../../include/test_helpers.h" namespace alias diff --git a/tests/core/usage/Union.cpp b/tests/core/usage/Union.cpp index fca49f70..aab7ffd2 100644 --- a/tests/core/usage/Union.cpp +++ b/tests/core/usage/Union.cpp @@ -25,7 +25,7 @@ #include "Sample.h" #include "MockDb.h" -#include +#include #include #include diff --git a/tests/core/usage/With.cpp b/tests/core/usage/With.cpp index cf136cd9..09239eba 100644 --- a/tests/core/usage/With.cpp +++ b/tests/core/usage/With.cpp @@ -25,7 +25,7 @@ #include "Sample.h" #include "MockDb.h" -#include +#include #include #include #include "../../include/test_helpers.h" diff --git a/tests/include/ConnectionPoolTests.h b/tests/include/ConnectionPoolTests.h index 0db71d87..821eff39 100644 --- a/tests/include/ConnectionPoolTests.h +++ b/tests/include/ConnectionPoolTests.h @@ -60,7 +60,7 @@ namespace sqlpp } for (;;) { auto handle = pool.get().native_handle(); - auto insert_res = ns.insert(handle); + auto insert_res = ns.clause/insert.handle); if (insert_res.second == false) { return ns; } diff --git a/tests/mysql/usage/DynamicSelect.cpp b/tests/mysql/usage/DynamicSelect.cpp index 9f98ec95..9750463e 100644 --- a/tests/mysql/usage/DynamicSelect.cpp +++ b/tests/mysql/usage/DynamicSelect.cpp @@ -27,12 +27,12 @@ #include "Tables.h" #include #include -#include +#include #include -#include -#include +#include +#include #include -#include +#include #include #include diff --git a/tests/mysql/usage/MoveConstructor.cpp b/tests/mysql/usage/MoveConstructor.cpp index 0a839ff7..bc7ff895 100644 --- a/tests/mysql/usage/MoveConstructor.cpp +++ b/tests/mysql/usage/MoveConstructor.cpp @@ -27,12 +27,12 @@ #include "Tables.h" #include #include -#include +#include #include -#include -#include +#include +#include #include -#include +#include #include #include diff --git a/tests/mysql/usage/Prepared.cpp b/tests/mysql/usage/Prepared.cpp index bf72b7a1..fb220f42 100644 --- a/tests/mysql/usage/Prepared.cpp +++ b/tests/mysql/usage/Prepared.cpp @@ -28,12 +28,12 @@ #include #include #include -#include +#include #include -#include -#include +#include +#include #include -#include +#include #include #include diff --git a/tests/mysql/usage/Select.cpp b/tests/mysql/usage/Select.cpp index 1f7024dc..8d5223e4 100644 --- a/tests/mysql/usage/Select.cpp +++ b/tests/mysql/usage/Select.cpp @@ -28,12 +28,12 @@ #include #include #include -#include +#include #include -#include -#include +#include +#include #include -#include +#include #include "../../include/test_helpers.h" #include diff --git a/tests/mysql/usage/Truncated.cpp b/tests/mysql/usage/Truncated.cpp index 713893ae..16ceb84a 100644 --- a/tests/mysql/usage/Truncated.cpp +++ b/tests/mysql/usage/Truncated.cpp @@ -28,12 +28,12 @@ #include #include #include -#include +#include #include -#include -#include +#include +#include #include -#include +#include #include "../../include/test_helpers.h" #include diff --git a/tests/sqlite3/usage/DynamicLoadingTest.cpp b/tests/sqlite3/usage/DynamicLoadingTest.cpp index 439b8c66..15c45ac2 100644 --- a/tests/sqlite3/usage/DynamicLoadingTest.cpp +++ b/tests/sqlite3/usage/DynamicLoadingTest.cpp @@ -26,12 +26,12 @@ #include "TabSample.h" #include #include -#include -#include -#include +#include +#include +#include #include #include -#include +#include #ifdef SQLPP_USE_SQLCIPHER #include diff --git a/tests/sqlite3/usage/DynamicSelect.cpp b/tests/sqlite3/usage/DynamicSelect.cpp index 0078d216..16caa8a1 100644 --- a/tests/sqlite3/usage/DynamicSelect.cpp +++ b/tests/sqlite3/usage/DynamicSelect.cpp @@ -26,12 +26,12 @@ #include "Tables.h" #include #include -#include -#include -#include +#include +#include +#include #include #include -#include +#include #ifdef SQLPP_USE_SQLCIPHER #include diff --git a/tests/sqlite3/usage/Select.cpp b/tests/sqlite3/usage/Select.cpp index f01e97d5..6daf1262 100644 --- a/tests/sqlite3/usage/Select.cpp +++ b/tests/sqlite3/usage/Select.cpp @@ -28,12 +28,12 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include -#include +#include #include #include diff --git a/tests/sqlite3/usage/Transaction.cpp b/tests/sqlite3/usage/Transaction.cpp index 2090bd96..c444f80e 100644 --- a/tests/sqlite3/usage/Transaction.cpp +++ b/tests/sqlite3/usage/Transaction.cpp @@ -27,12 +27,12 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include -#include +#include #ifdef SQLPP_USE_SQLCIPHER #include