mirror of
https://github.com/rbock/sqlpp11.git
synced 2026-01-01 10:41:22 -06:00
Minor cleanup
This commit is contained in:
12
README.md
12
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:
|
||||
---------
|
||||
|
||||
@@ -235,6 +235,13 @@ int main()
|
||||
static_assert(std::is_same<decltype(a), decltype(b)>::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<decltype(a), decltype(b)>::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);
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
# to be called from the sqlpp11 folder
|
||||
clang++ -std=c++11 -stdlib=libc++ examples/SelectTest.cpp -Iinclude
|
||||
|
||||
Reference in New Issue
Block a user