diff --git a/README.md b/README.md index 48839d43..dc8c040c 100644 --- a/README.md +++ b/README.md @@ -4,26 +4,8 @@ A type safe embedded domain specific language for SQL queries and results in C++ Documentation is found in the [wiki](https://github.com/rbock/sqlpp11/wiki) -Contact: --------- - * Issues at https://github.com/rbock/sqlpp11/issues - * email at rbock at eudoxos dot de - * [![Join the chat at https://gitter.im/sqlpp11/Lobby](https://badges.gitter.im/sqlpp11/Lobby.svg)](https://gitter.im/sqlpp11/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) - -Breaking changes in 0.36: -------------------------- -See [Changes](ChangeLog.md) - -Status: -------- - -Branch / Compiler | clang-3.4, gcc-4.9, Xcode-7 | MSVC 2015/2017 | Test Coverage -------------------| -------------------------------|-------------|--------------- -master | [![Build Status](https://travis-ci.org/rbock/sqlpp11.svg?branch=master)](https://travis-ci.org/rbock/sqlpp11?branch=master) | [![Build status](https://ci.appveyor.com/api/projects/status/eid7mwqgavo0h61h/branch/master?svg=true)](https://ci.appveyor.com/project/rbock/sqlpp11/branch/master) | [![Coverage Status](https://coveralls.io/repos/rbock/sqlpp11/badge.svg?branch=master)](https://coveralls.io/r/rbock/sqlpp11?branch=master) -develop | [![Build Status](https://travis-ci.org/rbock/sqlpp11.svg?branch=develop)](https://travis-ci.org/rbock/sqlpp11?branch=develop) | [![Build status](https://ci.appveyor.com/api/projects/status/eid7mwqgavo0h61h/branch/develop?svg=true)](https://ci.appveyor.com/project/rbock/sqlpp11/branch/develop) | [![Coverage Status](https://coveralls.io/repos/rbock/sqlpp11/badge.svg?branch=develop)](https://coveralls.io/r/rbock/sqlpp11?branch=develop) - -Motivation: ------------ +So what is this about? +---------------------- SQL and C++ are both strongly typed languages. Still, most C/C++ interfaces to SQL are based on constructing queries as strings and on interpreting arrays or maps of strings as results. sqlpp11 is a templated library representing an embedded domain specific language (EDSL) that allows you to @@ -100,6 +82,21 @@ db(update(foo).set(foo.hasFun = not foo.hasFun).where(foo.name != "nobody")); db(remove_from(foo).where(not foo.hasFun)); ``` +License: +------------- +sqlpp11 is distributed under the [BSD 2-Clause License](https://github.com/rbock/sqlpp11/blob/master/LICENSE). + +Status: +------- +Branch / Compiler | clang-3.4, gcc-4.9, Xcode-7 | MSVC 2015/2017 | Test Coverage +------------------| -------------------------------|-------------|--------------- +master | [![Build Status](https://travis-ci.org/rbock/sqlpp11.svg?branch=master)](https://travis-ci.org/rbock/sqlpp11?branch=master) | [![Build status](https://ci.appveyor.com/api/projects/status/eid7mwqgavo0h61h/branch/master?svg=true)](https://ci.appveyor.com/project/rbock/sqlpp11/branch/master) | [![Coverage Status](https://coveralls.io/repos/rbock/sqlpp11/badge.svg?branch=master)](https://coveralls.io/r/rbock/sqlpp11?branch=master) +develop | [![Build Status](https://travis-ci.org/rbock/sqlpp11.svg?branch=develop)](https://travis-ci.org/rbock/sqlpp11?branch=develop) | [![Build status](https://ci.appveyor.com/api/projects/status/eid7mwqgavo0h61h/branch/develop?svg=true)](https://ci.appveyor.com/project/rbock/sqlpp11/branch/develop) | [![Coverage Status](https://coveralls.io/repos/rbock/sqlpp11/badge.svg?branch=develop)](https://coveralls.io/r/rbock/sqlpp11?branch=develop) + +MSVC 2017 is currently broken, see + - https://github.com/rbock/sqlpp11/issues/181 + - https://developercommunity.visualstudio.com/content/problem/95983/c-vs152-153-regression-in-variadic-template-argume.html + Additional information available: --------------------------------- Past talks about sqlpp11 and some coding concepts used within the library: @@ -192,7 +189,14 @@ Include generated header (MyTable.h), that's all. If you prefer Ruby over Python, you might want to take a look at https://github.com/douyw/sqlpp11gen -License: -------------- -sqlpp11 is distributed under the [BSD 2-Clause License](https://github.com/rbock/sqlpp11/blob/master/LICENSE). +Contact: +-------- + * Issues at https://github.com/rbock/sqlpp11/issues + * email at rbock at eudoxos dot de + * [![Join the chat at https://gitter.im/sqlpp11/Lobby](https://badges.gitter.im/sqlpp11/Lobby.svg)](https://gitter.im/sqlpp11/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) + +Breaking changes in 0.36: +------------------------- +See [Changes](ChangeLog.md) + diff --git a/include/sqlpp11/aggregate_functions.h b/include/sqlpp11/aggregate_functions.h index 4d250a77..d2904b96 100644 --- a/include/sqlpp11/aggregate_functions.h +++ b/include/sqlpp11/aggregate_functions.h @@ -24,8 +24,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SQLPP_AGGREGATE_FUNCTIONS_H -#define SQLPP_AGGREGATE_FUNCTIONS_H +#ifndef SQLPP11_AGGREGATE_FUNCTIONS_H +#define SQLPP11_AGGREGATE_FUNCTIONS_H #include #include diff --git a/include/sqlpp11/aggregate_functions/avg.h b/include/sqlpp11/aggregate_functions/avg.h index f3c273b8..a9df9e62 100644 --- a/include/sqlpp11/aggregate_functions/avg.h +++ b/include/sqlpp11/aggregate_functions/avg.h @@ -24,8 +24,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SQLPP_AVG_H -#define SQLPP_AVG_H +#ifndef SQLPP11_AGGREGATE_FUNCTIONS_AVG_H +#define SQLPP11_AGGREGATE_FUNCTIONS_AVG_H #include #include @@ -116,13 +116,13 @@ namespace sqlpp } template - auto avg(const distinct_t&, T t) -> avg_t> + auto avg(const distinct_t& /*unused*/, T t) -> avg_t> { static_assert(not contains_aggregate_function_t>::value, "avg() cannot be used on an aggregate function"); static_assert(is_numeric_t>::value, "avg() requires a numeric value expression as argument"); return {t}; } -} +} // namespace sqlpp #endif diff --git a/include/sqlpp11/aggregate_functions/count.h b/include/sqlpp11/aggregate_functions/count.h index 225aa6a5..79d96e52 100644 --- a/include/sqlpp11/aggregate_functions/count.h +++ b/include/sqlpp11/aggregate_functions/count.h @@ -24,8 +24,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SQLPP_COUNT_H -#define SQLPP_COUNT_H +#ifndef SQLPP11_AGGREGATE_FUNCTIONS_COUNT_H +#define SQLPP11_AGGREGATE_FUNCTIONS_COUNT_H #include #include @@ -117,13 +117,13 @@ namespace sqlpp } template - auto count(const distinct_t&, T t) -> count_t> + auto count(const distinct_t& /*unused*/, T t) -> count_t> { static_assert(not contains_aggregate_function_t>::value, "count() cannot be used on an aggregate function"); static_assert(is_expression_t>::value, "count() requires an expression as argument"); return {t}; } -} +} // namespace sqlpp #endif diff --git a/include/sqlpp11/aggregate_functions/max.h b/include/sqlpp11/aggregate_functions/max.h index abe29d6a..16faaa47 100644 --- a/include/sqlpp11/aggregate_functions/max.h +++ b/include/sqlpp11/aggregate_functions/max.h @@ -24,8 +24,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SQLPP_MAX_H -#define SQLPP_MAX_H +#ifndef SQLPP11_AGGREGATE_FUNCTIONS_MAX_H +#define SQLPP11_AGGREGATE_FUNCTIONS_MAX_H #include #include @@ -100,6 +100,6 @@ namespace sqlpp static_assert(is_expression_t>::value, "max() requires an expression as argument"); return {t}; } -} +} // namespace sqlpp #endif diff --git a/include/sqlpp11/aggregate_functions/min.h b/include/sqlpp11/aggregate_functions/min.h index a82bf9c7..37604e03 100644 --- a/include/sqlpp11/aggregate_functions/min.h +++ b/include/sqlpp11/aggregate_functions/min.h @@ -24,8 +24,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SQLPP_MIN_H -#define SQLPP_MIN_H +#ifndef SQLPP11_AGGREGATE_FUNCTIONS_MIN_H +#define SQLPP11_AGGREGATE_FUNCTIONS_MIN_H #include #include @@ -100,6 +100,6 @@ namespace sqlpp static_assert(is_expression_t>::value, "min() requires an expression as argument"); return {t}; } -} +} // namespace sqlpp #endif diff --git a/include/sqlpp11/aggregate_functions/sum.h b/include/sqlpp11/aggregate_functions/sum.h index cee32aed..67428472 100644 --- a/include/sqlpp11/aggregate_functions/sum.h +++ b/include/sqlpp11/aggregate_functions/sum.h @@ -24,8 +24,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SQLPP_SUM_H -#define SQLPP_SUM_H +#ifndef SQLPP11_AGGREGATE_FUNCTIONS_SUM_H +#define SQLPP11_AGGREGATE_FUNCTIONS_SUM_H #include #include @@ -98,7 +98,9 @@ namespace sqlpp serialize_operand(t._expr, context); } else + { serialize(t._expr, context); + } context << ")"; return context; @@ -115,13 +117,13 @@ namespace sqlpp } template - auto sum(const distinct_t&, T t) -> sum_t> + auto sum(const distinct_t& /*unused*/, T t) -> sum_t> { static_assert(not contains_aggregate_function_t>::value, "sum() cannot be used on an aggregate function"); static_assert(is_numeric_t>::value, "sum() requires a numeric expression as argument"); return {t}; } -} +} // namespace sqlpp #endif diff --git a/include/sqlpp11/alias.h b/include/sqlpp11/alias.h index 0a041a9e..197862cf 100644 --- a/include/sqlpp11/alias.h +++ b/include/sqlpp11/alias.h @@ -24,8 +24,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SQLPP_ALIAS_H -#define SQLPP_ALIAS_H +#ifndef SQLPP11_ALIAS_H +#define SQLPP11_ALIAS_H #include #include @@ -70,6 +70,6 @@ namespace sqlpp return context; } }; -} +} // namespace sqlpp #endif diff --git a/include/sqlpp11/alias_operators.h b/include/sqlpp11/alias_operators.h index 0a03eb3f..da318f19 100644 --- a/include/sqlpp11/alias_operators.h +++ b/include/sqlpp11/alias_operators.h @@ -24,8 +24,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SQLPP_ALIAS_OPERATORS_H -#define SQLPP_ALIAS_OPERATORS_H +#ifndef SQLPP11_ALIAS_OPERATORS_H +#define SQLPP11_ALIAS_OPERATORS_H #include @@ -35,10 +35,10 @@ namespace sqlpp struct alias_operators { template - expression_alias_t as(const alias_provider&) const + expression_alias_t as(const alias_provider& /*unused*/) const { return {*static_cast(this)}; } }; -} +} // namespace sqlpp #endif diff --git a/include/sqlpp11/alias_provider.h b/include/sqlpp11/alias_provider.h index 3c1abbd4..b77a9e20 100644 --- a/include/sqlpp11/alias_provider.h +++ b/include/sqlpp11/alias_provider.h @@ -24,8 +24,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SQLPP_ALIAS_PROVIDER_H -#define SQLPP_ALIAS_PROVIDER_H +#ifndef SQLPP11_ALIAS_PROVIDER_H +#define SQLPP11_ALIAS_PROVIDER_H #include #include @@ -100,7 +100,7 @@ namespace sqlpp SQLPP_ALIAS_PROVIDER(z) SQLPP_ALIAS_PROVIDER(left) SQLPP_ALIAS_PROVIDER(right) - } -} + } // namespace alias +} // namespace sqlpp #endif diff --git a/include/sqlpp11/all_of.h b/include/sqlpp11/all_of.h index b7a2ea85..0a23a168 100644 --- a/include/sqlpp11/all_of.h +++ b/include/sqlpp11/all_of.h @@ -24,8 +24,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SQLPP_ALL_OF_H -#define SQLPP_ALL_OF_H +#ifndef SQLPP11_ALL_OF_H +#define SQLPP11_ALL_OF_H #include #include @@ -47,7 +47,7 @@ namespace sqlpp }; template - auto all_of(Table) -> all_of_t + auto all_of(Table /*unused*/) -> all_of_t
{ return {}; } @@ -60,11 +60,11 @@ namespace sqlpp using _serialize_check = assert_no_stand_alone_all_of_t; using T = all_of_t
; - static Context& _(const T&, const Context&) + static Context& _(const T& /*unused*/, const Context& /*unused*/) { _serialize_check{}; } }; -} +} // namespace sqlpp #endif diff --git a/include/sqlpp11/any.h b/include/sqlpp11/any.h index d3f125c2..d8e86d04 100644 --- a/include/sqlpp11/any.h +++ b/include/sqlpp11/any.h @@ -24,8 +24,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SQLPP_ANY_H -#define SQLPP_ANY_H +#ifndef SQLPP11_ANY_H +#define SQLPP11_ANY_H #include #include @@ -76,6 +76,6 @@ namespace sqlpp // FIXME: can we accept non-values like NULL here? return {t}; } -} +} // namespace sqlpp #endif diff --git a/include/sqlpp11/assignment.h b/include/sqlpp11/assignment.h index 7517f8f5..529d20ae 100644 --- a/include/sqlpp11/assignment.h +++ b/include/sqlpp11/assignment.h @@ -24,8 +24,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SQLPP_ASSIGNMENT_H -#define SQLPP_ASSIGNMENT_H +#ifndef SQLPP11_ASSIGNMENT_H +#define SQLPP11_ASSIGNMENT_H #include #include @@ -77,6 +77,6 @@ namespace sqlpp return context; } }; -} +} // namespace sqlpp #endif diff --git a/include/sqlpp11/auto_alias.h b/include/sqlpp11/auto_alias.h index 43ce044c..f54628c5 100644 --- a/include/sqlpp11/auto_alias.h +++ b/include/sqlpp11/auto_alias.h @@ -24,8 +24,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SQLPP_AUTO_ALIAS_H -#define SQLPP_AUTO_ALIAS_H +#ifndef SQLPP11_AUTO_ALIAS_H +#define SQLPP11_AUTO_ALIAS_H #include @@ -56,10 +56,10 @@ namespace sqlpp { using type = expression_alias_t; }; - } + } // namespace detail template using auto_alias_t = typename detail::auto_alias_impl::type; -} +} // namespace sqlpp #endif diff --git a/include/sqlpp11/bad_expression.h b/include/sqlpp11/bad_expression.h index 3aa43f0c..c8c37712 100644 --- a/include/sqlpp11/bad_expression.h +++ b/include/sqlpp11/bad_expression.h @@ -24,8 +24,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SQLPP_BAD_EXPRESSION_H -#define SQLPP_BAD_EXPRESSION_H +#ifndef SQLPP11_BAD_EXPRESSION_H +#define SQLPP11_BAD_EXPRESSION_H #include #include @@ -38,7 +38,7 @@ namespace sqlpp struct bad_expression { template - bad_expression(T&&...) + bad_expression(T&&... /*unused*/) { } using _traits = make_traits; @@ -53,6 +53,6 @@ namespace sqlpp static Context& _(const T&, Context&); }; -} +} // namespace sqlpp #endif diff --git a/include/sqlpp11/basic_expression_operators.h b/include/sqlpp11/basic_expression_operators.h index ffa56525..f4665b73 100644 --- a/include/sqlpp11/basic_expression_operators.h +++ b/include/sqlpp11/basic_expression_operators.h @@ -25,8 +25,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SQLPP_DETAIL_BASIC_EXPRESSION_OPERATORS_H -#define SQLPP_DETAIL_BASIC_EXPRESSION_OPERATORS_H +#ifndef SQLPP11_BASIC_EXPRESSION_OPERATORS_H +#define SQLPP11_BASIC_EXPRESSION_OPERATORS_H #include #include @@ -82,7 +82,7 @@ namespace sqlpp { using type = Expr, wrap_operand_t>; }; - } + } // namespace detail template