From f39582082bfee1192ab06809be9244f2c64ac3f2 Mon Sep 17 00:00:00 2001 From: Roland Bock Date: Sat, 17 Aug 2013 11:27:41 +0200 Subject: [PATCH] Minor cleanup --- README.md | 12 ++++++------ tests/SelectTest.cpp | 7 +++++++ tests/compile.sh | 3 --- 3 files changed, 13 insertions(+), 9 deletions(-) delete mode 100644 tests/compile.sh diff --git a/README.md b/README.md index 4b9952ce..ffe11e68 100644 --- a/README.md +++ b/README.md @@ -10,15 +10,15 @@ SQL and C++ are both strongly typed languages. Still, most C/C++ interfaces to S sqlpp11 is a templated library representing an embedded domain specific language (EDSL) that allows you to - * define types representing tables and columns, - * construct type safe queries checked at compile time for syntax errors, type errors, name errors and even some semantic errors, - * interpret results by iterating over query-specific structs with appropriately named and typed members. + * define types representing tables and columns, + * construct type safe queries checked at compile time for syntax errors, type errors, name errors and even some semantic errors, + * interpret results by iterating over query-specific structs with appropriately named and typed members. This results in several benefits, e.g. - * the library user operates comfortably on structs and functions, - * the compiler reports many kinds of errors long before the code enters unit testing or production, - * the library hides the gory details of string construction for queries and interpreting string based results returned by select calls. + * the library user operates comfortably on structs and functions, + * the compiler reports many kinds of errors long before the code enters unit testing or production, + * the library hides the gory details of string construction for queries and interpreting string based results returned by select calls. Examples: --------- diff --git a/tests/SelectTest.cpp b/tests/SelectTest.cpp index 4420cabd..027a9fc2 100644 --- a/tests/SelectTest.cpp +++ b/tests/SelectTest.cpp @@ -235,6 +235,13 @@ int main() static_assert(std::is_same::value, "all_of(t) has to be expanded by multi_column"); } + // Test that select(tab) is expanded in multi_column + { + auto a = multi_column(sqlpp::alias::a, t); + auto b = multi_column(sqlpp::alias::a, t.alpha, t.beta, t.gamma); + static_assert(std::is_same::value, "t has to be expanded by multi_column"); + } + // Test that a multicolumn is not a value { auto m = multi_column(sqlpp::alias::a, t.alpha, t.beta); diff --git a/tests/compile.sh b/tests/compile.sh deleted file mode 100644 index 55cf4410..00000000 --- a/tests/compile.sh +++ /dev/null @@ -1,3 +0,0 @@ -# to be called from the sqlpp11 folder -clang++ -std=c++11 -stdlib=libc++ examples/SelectTest.cpp -Iinclude -