diff --git a/include/sqlpp11/case.h b/include/sqlpp11/case.h index 11877fca..5183fd8b 100644 --- a/include/sqlpp11/case.h +++ b/include/sqlpp11/case.h @@ -83,7 +83,7 @@ namespace sqlpp auto _else_impl(const std::true_type&, Else else_) -> case_t { return {_when, _then, else_}; - }; + } template auto _else_impl(const std::false_type&, Else else_) -> void; @@ -105,7 +105,7 @@ namespace sqlpp static_assert(detail::valid_else_t::value, "arguments of then and else must be expressions of the same type (or null)"); return _else_impl(detail::valid_else_t{}, else_); - }; + } private: When _when; @@ -119,7 +119,7 @@ namespace sqlpp auto _then_impl(const std::true_type&, Then t) -> case_then_t> { return {_when, t}; - }; + } template auto _then_impl(const std::false_type&, Then t) -> void; @@ -140,7 +140,7 @@ namespace sqlpp { static_assert(detail::valid_then_t::value, "then argument must be a value expression"); return _then_impl(detail::valid_then_t{}, t); - }; + } private: When _when; diff --git a/include/sqlpp11/data_types.h b/include/sqlpp11/data_types.h index 9e50cf9d..0c54cc61 100644 --- a/include/sqlpp11/data_types.h +++ b/include/sqlpp11/data_types.h @@ -33,5 +33,6 @@ #include #include #include +#include #endif diff --git a/include/sqlpp11/no_value.h b/include/sqlpp11/data_types/no_value.h similarity index 77% rename from include/sqlpp11/no_value.h rename to include/sqlpp11/data_types/no_value.h index 15703d0e..312cab93 100644 --- a/include/sqlpp11/no_value.h +++ b/include/sqlpp11/data_types/no_value.h @@ -27,26 +27,12 @@ #ifndef SQLPP_NO_VALUE_H #define SQLPP_NO_VALUE_H -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include -namespace sqlpp -{ - struct no_value_t - { - using _traits = make_traits; - using _cpp_value_type = void; - }; - - template - struct expression_operators - { - }; - - template - struct column_operators - { - }; -} #endif diff --git a/include/sqlpp11/data_types/no_value/column_operators.h b/include/sqlpp11/data_types/no_value/column_operators.h new file mode 100644 index 00000000..3417f2ae --- /dev/null +++ b/include/sqlpp11/data_types/no_value/column_operators.h @@ -0,0 +1,41 @@ +/* + * 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. + */ + +#ifndef SQLPP_NO_VALUE_COLUMN_OPERATORS_H +#define SQLPP_NO_VALUE_COLUMN_OPERATORS_H + +#include + +namespace sqlpp +{ + struct no_value_t; + + template + struct column_operators + { + }; +} +#endif diff --git a/include/sqlpp11/data_types/no_value/data_type.h b/include/sqlpp11/data_types/no_value/data_type.h new file mode 100644 index 00000000..df98a11f --- /dev/null +++ b/include/sqlpp11/data_types/no_value/data_type.h @@ -0,0 +1,44 @@ +/* + * 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. + */ + +#ifndef SQLPP_NO_VALUE_DATA_TYPE_H +#define SQLPP_NO_VALUE_DATA_TYPE_H + +#include + +namespace sqlpp +{ + struct no_value_t + { + using _traits = make_traits; + using _cpp_value_type = void; + + template + using _is_valid_operand = wrong_t; + }; +} + +#endif diff --git a/include/sqlpp11/data_types/no_value/expression_operators.h b/include/sqlpp11/data_types/no_value/expression_operators.h new file mode 100644 index 00000000..baac3856 --- /dev/null +++ b/include/sqlpp11/data_types/no_value/expression_operators.h @@ -0,0 +1,42 @@ +/* + * 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. + */ + +#ifndef SQLPP_NO_VALUE_EXPRESSION_OPERATORS_H +#define SQLPP_NO_VALUE_EXPRESSION_OPERATORS_H + +#include +#include +#include + +namespace sqlpp +{ + template + struct expression_operators : public basic_expression_operators + { + }; +} + +#endif diff --git a/include/sqlpp11/data_types/no_value/operand.h b/include/sqlpp11/data_types/no_value/operand.h new file mode 100644 index 00000000..cbda37f3 --- /dev/null +++ b/include/sqlpp11/data_types/no_value/operand.h @@ -0,0 +1,35 @@ +/* + * 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. + */ + +#ifndef SQLPP_NO_VALUE_OPERAND_H +#define SQLPP_NO_VALUE_OPERAND_H + +namespace sqlpp +{ + // There is no no_value operand +} + +#endif diff --git a/include/sqlpp11/data_types/no_value/parameter_value.h b/include/sqlpp11/data_types/no_value/parameter_value.h new file mode 100644 index 00000000..0a822237 --- /dev/null +++ b/include/sqlpp11/data_types/no_value/parameter_value.h @@ -0,0 +1,35 @@ +/* + * 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. + */ + +#ifndef SQLPP_NO_VALUE_PARAMETER_VALUE_H +#define SQLPP_NO_VALUE_PARAMETER_VALUE_H + +namespace sqlpp +{ + // There is no no_value parameter +} + +#endif diff --git a/include/sqlpp11/data_types/no_value/result_field.h b/include/sqlpp11/data_types/no_value/result_field.h new file mode 100644 index 00000000..647b6c0a --- /dev/null +++ b/include/sqlpp11/data_types/no_value/result_field.h @@ -0,0 +1,72 @@ +/* + * 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. + */ + +#ifndef SQLPP_NO_VALUE_RESULT_FIELD_H +#define SQLPP_NO_VALUE_RESULT_FIELD_H + +#include +#include +#include + +namespace sqlpp +{ + template + struct result_field_t> + { + template + void _bind(Target&, size_t) + { + } + + template + void _post_bind(Target&, size_t) + { + } + + void _validate() const + { + } + + void _invalidate() const + { + } + + constexpr bool is_null() const + { + return true; + } + }; + + template + inline std::ostream& operator<<( + std::ostream& os, const result_field_t>&) + { + os << "NULL"; + return os; + } +} + +#endif diff --git a/include/sqlpp11/data_types/no_value/wrap_operand.h b/include/sqlpp11/data_types/no_value/wrap_operand.h new file mode 100644 index 00000000..545eb09c --- /dev/null +++ b/include/sqlpp11/data_types/no_value/wrap_operand.h @@ -0,0 +1,35 @@ +/* + * 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. + */ + +#ifndef SQLPP_NO_VALUE_WRAP_OPERAND_H +#define SQLPP_NO_VALUE_WRAP_OPERAND_H + +namespace sqlpp +{ + // There is no no_value operand +} + +#endif diff --git a/include/sqlpp11/default_value.h b/include/sqlpp11/default_value.h index bee70bb2..83d9dc00 100644 --- a/include/sqlpp11/default_value.h +++ b/include/sqlpp11/default_value.h @@ -27,7 +27,7 @@ #ifndef SQLPP_DEFAULT_VALUE_H #define SQLPP_DEFAULT_VALUE_H -#include +#include namespace sqlpp { diff --git a/include/sqlpp11/into.h b/include/sqlpp11/into.h index 8751cfd1..f420ab57 100644 --- a/include/sqlpp11/into.h +++ b/include/sqlpp11/into.h @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include #include diff --git a/include/sqlpp11/multi_column.h b/include/sqlpp11/multi_column.h index a805a4e2..a8bd1377 100644 --- a/include/sqlpp11/multi_column.h +++ b/include/sqlpp11/multi_column.h @@ -27,7 +27,6 @@ #ifndef SQLPP_MULTI_COLUMN_H #define SQLPP_MULTI_COLUMN_H -#include #include #include @@ -35,6 +34,8 @@ namespace sqlpp { + struct no_value_t; + template struct multi_column_alias_t; diff --git a/include/sqlpp11/noop.h b/include/sqlpp11/noop.h index 0adc03e7..3236e226 100644 --- a/include/sqlpp11/noop.h +++ b/include/sqlpp11/noop.h @@ -28,7 +28,7 @@ #define SQLPP_NOOP_H #include -#include +#include #include #include diff --git a/include/sqlpp11/null.h b/include/sqlpp11/null.h index 6bd4c4f9..cde00e65 100644 --- a/include/sqlpp11/null.h +++ b/include/sqlpp11/null.h @@ -27,7 +27,7 @@ #ifndef SQLPP_NULL_H #define SQLPP_NULL_H -#include +#include namespace sqlpp { diff --git a/include/sqlpp11/prepared_execute.h b/include/sqlpp11/prepared_execute.h index 5304449b..0080b6ee 100644 --- a/include/sqlpp11/prepared_execute.h +++ b/include/sqlpp11/prepared_execute.h @@ -29,7 +29,7 @@ #include #include -#include +#include namespace sqlpp { diff --git a/include/sqlpp11/prepared_insert.h b/include/sqlpp11/prepared_insert.h index 467aebe0..5e7ec2cf 100644 --- a/include/sqlpp11/prepared_insert.h +++ b/include/sqlpp11/prepared_insert.h @@ -29,7 +29,7 @@ #include #include -#include +#include namespace sqlpp { diff --git a/include/sqlpp11/prepared_remove.h b/include/sqlpp11/prepared_remove.h index d1ed093c..b3b4e416 100644 --- a/include/sqlpp11/prepared_remove.h +++ b/include/sqlpp11/prepared_remove.h @@ -29,7 +29,7 @@ #include #include -#include +#include namespace sqlpp { diff --git a/include/sqlpp11/prepared_select.h b/include/sqlpp11/prepared_select.h index 9444bc1c..57454a37 100644 --- a/include/sqlpp11/prepared_select.h +++ b/include/sqlpp11/prepared_select.h @@ -29,7 +29,7 @@ #include #include -#include +#include namespace sqlpp { diff --git a/include/sqlpp11/prepared_update.h b/include/sqlpp11/prepared_update.h index 9b40a397..a5855d1b 100644 --- a/include/sqlpp11/prepared_update.h +++ b/include/sqlpp11/prepared_update.h @@ -29,7 +29,7 @@ #include #include -#include +#include namespace sqlpp { diff --git a/include/sqlpp11/select_column_list.h b/include/sqlpp11/select_column_list.h index 7a90bdef..40a94d4b 100644 --- a/include/sqlpp11/select_column_list.h +++ b/include/sqlpp11/select_column_list.h @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/include/sqlpp11/select_pseudo_table.h b/include/sqlpp11/select_pseudo_table.h index 6127629c..196c5e10 100644 --- a/include/sqlpp11/select_pseudo_table.h +++ b/include/sqlpp11/select_pseudo_table.h @@ -27,7 +27,7 @@ #ifndef SQLPP_SELECT_PSEUDO_TABLE_H #define SQLPP_SELECT_PSEUDO_TABLE_H -#include +#include namespace sqlpp { diff --git a/include/sqlpp11/single_table.h b/include/sqlpp11/single_table.h index ed900cdf..9a9037c9 100644 --- a/include/sqlpp11/single_table.h +++ b/include/sqlpp11/single_table.h @@ -28,7 +28,7 @@ #define SQLPP_SINGLE_TABLE_H #include -#include +#include #include #include #include diff --git a/include/sqlpp11/table.h b/include/sqlpp11/table.h index e9eb833b..b80b8ae8 100644 --- a/include/sqlpp11/table.h +++ b/include/sqlpp11/table.h @@ -33,7 +33,7 @@ #include #include #include -#include +#include namespace sqlpp { diff --git a/include/sqlpp11/verbatim.h b/include/sqlpp11/verbatim.h index 55d5d651..4a25f102 100644 --- a/include/sqlpp11/verbatim.h +++ b/include/sqlpp11/verbatim.h @@ -27,7 +27,7 @@ #ifndef SQLPP_VERBATIM_H #define SQLPP_VERBATIM_H -#include +#include #include #include diff --git a/include/sqlpp11/verbatim_table.h b/include/sqlpp11/verbatim_table.h index 72d3e4ce..1618bd07 100644 --- a/include/sqlpp11/verbatim_table.h +++ b/include/sqlpp11/verbatim_table.h @@ -27,7 +27,7 @@ #ifndef SQLPP_VERBATIM_TABLE_H #define SQLPP_VERBATIM_TABLE_H -#include +#include namespace sqlpp { diff --git a/tests/MockDb.h b/tests/MockDb.h index 2611add7..a90d4eae 100644 --- a/tests/MockDb.h +++ b/tests/MockDb.h @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tests/Select.cpp b/tests/Select.cpp index 5d276eef..2d5a9a4c 100644 --- a/tests/Select.cpp +++ b/tests/Select.cpp @@ -164,5 +164,11 @@ int Select(int, char**) select(sqlpp::value(7).as(t.alpha)); + for (const auto& row : + db(select(sqlpp::case_when(true).then(sqlpp::null).else_(sqlpp::null).as(t.beta)).from(t).where(true))) + { + std::cerr << row.beta << std::endl; + } + return 0; }