With knex, is it possible to do this without raw
?
q.leftJoin('columnName as cn', raw('?? is true', ['cn.bool']))
I tried
q.leftJoin('columnName as cn', b => {
b.on('cn.bool', 'is', 'true')
}
But it does not work.
There is no way to make it without raw
, since the default behavior of join
in next is to join by 2 columns and not by value.