mirror of
https://github.com/rbock/sqlpp11.git
synced 2024-11-15 20:31:16 +08:00
Add dynamic_insert_into test.
This commit is contained in:
parent
c6adbf98f1
commit
25a8dfa292
@ -111,6 +111,11 @@ int main()
|
|||||||
db(update(tab).set(tab.gamma = false).where(tab.alpha.in(sqlpp::value_list(std::vector<int>{1, 2, 3, 4}))));
|
db(update(tab).set(tab.gamma = false).where(tab.alpha.in(sqlpp::value_list(std::vector<int>{1, 2, 3, 4}))));
|
||||||
db(update(tab).set(tab.gamma = true).where(tab.alpha.in(1)));
|
db(update(tab).set(tab.gamma = true).where(tab.alpha.in(1)));
|
||||||
|
|
||||||
|
// dynamic insert
|
||||||
|
auto dynin = dynamic_insert_into(db, tab).dynamic_set(tab.gamma = true);
|
||||||
|
dynin.insert_list.add(tab.beta = "cheesecake");
|
||||||
|
db(dynin);
|
||||||
|
|
||||||
// remove
|
// remove
|
||||||
db(remove_from(tab).where(tab.alpha == tab.alpha + 3));
|
db(remove_from(tab).where(tab.alpha == tab.alpha + 3));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user