⭐ Complex subqueries
SELECT cust_code, cust_name, cust_city, grade
FROM customer
WHERE grade=2 AND EXISTS
(SELECT COUNT(*)
FROM customer
WHERE grade=2
GROUP BY grade
HAVING COUNT(*)>2);now can be called with this way:
auto rows = storage.select(columns(&Customer::code, &Customer::name, &Customer::city, &Customer::grade),
where(is_equal(&Customer::grade, 2)
and exists(select(count<Customer>(),
where(is_equal(&Customer::grade, 2)),
group_by(&Customer::grade),
having(greater_than(count(), 2))))));⭐ EXCEPT and INTERSECT
All compound operators now are available:
SELECT dept_id
FROM dept_master
EXCEPT
SELECT dept_id
FROM emp_masteris just
auto rows = storage.select(except(select(&DeptMaster::deptId),
select(&EmpMaster::deptId)));and
SELECT dept_id
FROM dept_master
INTERSECT
SELECT dept_id
FROM emp_masteris just
auto rows = storage.select(intersect(select(&DeptMaster::deptId),
select(&EmpMaster::deptId)));-
⭐ Column aliases
-
⭐
SELECT * FROM tablewith syntaxstorage.select(asterisk<T>())returnsstd::tupleof mapped members' types -
⭐
CAST(expression AS type)expression withcast<T>(expression)syntax -
⭐ added
juliandayfunction -
🚀
FOREIGN KEYnow works with compositePRIMARY KEY
🚀 added simple arithmetic types biding to WHERE conditions
bool myFilterIsOn = getMyFilterValue();
auto values = storage.get_all<User>(where(!myFilterIsOn and like(&User::name, "Adele%")));- 🚀 improved performance - replaced
std::shared_ptrwithstd::unique_ptrinside storage, view iterator and aggregate functions - ⚙️ added Windows CI with Appveyor (thanks to @soroshsabz)
- 🐞 Bug fixes - fixed runtime error which can be faced during
storage::iterate()call - ⚠️ Minor warning fixes