0
0
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:
Roland Bock 2021-08-06 10:14:24 +02:00
parent c6adbf98f1
commit 25a8dfa292

View File

@ -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 = 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
db(remove_from(tab).where(tab.alpha == tab.alpha + 3));