Please note that this question ONLY relates to the popular SQLite.swift
library, stephencelis/SQLite.swift
With SQLite.swift you can
let a = Expression<String>("a")
let b = Expression<String>("b")
and so on. But how do you
select a.x, a.y, ifnull(b.q, 'default text'), a.z
from a
left join b on blah
how do you make an expression for an inline sql ifnull clause?
(The doco mentions that Expression has an init(literal:) initializer - maybe it's relevant - but it's undocumented and has unusual binding arguments.)
Please note, I'm completely aware that you could make the value optional
let q = Expression<String?>("q")
and then just put in the default later;
I am asking how to express "ifnull(b.q, 'default text')" as an Expression (or, learn it is impossible) so that value will actually be used in the SQL expression.
Once again, this question relates only to the library /stephencelis/SQLite.swift