< Differences
| sqlpp11 | sqlpp23 |
|
using flags
|
// Either
select()
.flags(sqlpp::all)
.columns(tab.id)
.from(tab);
// Or
select(tab.id)
.flags(sqlpp::all)
.from(tab);
|
select(sqlpp::all, tab.id)
.from(tab);
|
| sqlpp11 | sqlpp23 |
|
delete from
|
remove_from(tab).where(tab.id == 11);
|
delete_from(tab).where(tab.id == 11);
|
|
truncate
|
remove_from(tab).unconditionally();
|
truncate(tab);
|
| sqlpp11 | sqlpp23 |
|
with ... select
|
const auto a = get_my_cte();
for (const auto& row :
db(with(a)(select(a.intN).from(a)))) {
// use row.intN
}
|
const auto a = get_my_cte();
for (const auto& row :
db(with(a) << select(a.intN).from(a))) {
// use row.intN
}
|
Custom queries can be used to construct statements that the library does not support directly.
| sqlpp11 | sqlpp23 |
|
select ... into
|
custom_query(select(all_of(foo)).from(foo),
into(bar))
.with_result_type_of(insert_into(bar));
|
select(all_of(t)).from(t)
<< into(f)
<< with_result_type_of(insert_into(f));
|
< Differences