mirror of
https://github.com/rbock/sqlpp11.git
synced 2024-11-15 20:31:16 +08:00
Minor cleanup
This commit is contained in:
parent
80e573568e
commit
f39582082b
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
|
sqlpp11 is a templated library representing an embedded domain specific language (EDSL) that allows you to
|
||||||
|
|
||||||
* define types representing tables and columns,
|
* 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,
|
* 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.
|
* interpret results by iterating over query-specific structs with appropriately named and typed members.
|
||||||
|
|
||||||
This results in several benefits, e.g.
|
This results in several benefits, e.g.
|
||||||
|
|
||||||
* the library user operates comfortably on structs and functions,
|
* 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 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 hides the gory details of string construction for queries and interpreting string based results returned by select calls.
|
||||||
|
|
||||||
Examples:
|
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");
|
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
|
// Test that a multicolumn is not a value
|
||||||
{
|
{
|
||||||
auto m = multi_column(sqlpp::alias::a, t.alpha, t.beta);
|
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
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user