writing case expression
bakhodir10 opened this issue · comments
Bakhodir commented
I was using knex and wrote that query.
knex()
.columns(
'id',
this.knex.raw('case when u.password is null then true else false end as condition'))
.select()
.from(users as u
);
Now, I am using mongo-sql.
How can I write the code in mongo-sql ?
I want to get user's password property as condition whether it is true or not.
Any ideas ?
John Fawcett commented
@bakhodirsbox something like this work? http://mosql.j0.hn/#/snippets/av