designPattern_OptimisticOfflineLock_sqlite_orm
designPattern_OptimisticOfflineLock_sqlite_orm
I found coalesce is the substitution for ifnull. But I am at a loss as to how to write this SQL in sqlite_orm... could you give me a hand here?...
I have this going in the right direction but still need to insert the nested select: ```C++ auto lines = storage.select(columns(alias_column(&Claim::id), as(coalesce(alias_column(&Claim::other_system_id), 0))), left_join(on(c(alias_column(&Invoice::fkey_claim)) == alias_column(&Claim::id)))); ``` This produces the...
Thanks!!! In what branch? master?
is this still current: "LEFT JOIN ( SELECT fkey_claim, COUNT(*) AS response_1_count FROM Invoices WHERE fkey_INSResponse = 1 GROUP BY fkey_claim ) is not supported right now"
Correct! if you do not qualify unique it will not take sqlite_orm::unique!! The compiler seems to think std::unique is a better match than sqlite_orm::unique! It thinks the pointer to member...
and the explicit table template argument is necessary because of the inheritance... (in make_table)
Hi! Do this: ```C++ auto storage = sqlite_orm::make_storage("", make_table("tb_xuser", make_column("id", &XUser::id, autoincrement(), primary_key()), make_column("deleted", &XUser::deleted), make_column("first_name", &XUser::firstName), make_column("last_name", &XUser::lastName), sqlite_orm::unique(column(&XUser::firstName), column(&XUser::lastName)) )); ``` it should work
here is another one worth considering with similar structure (which means solving one solves the other): ```SQL select ename, salary, comm from ( select ename, salary, comm, case when comm...
this last one can be simplified like this, and sqlite_orm can do it: ```SQL select ename, salary, comm from emp order by case when comm is null then 0 else...