Using knexjs only (no bookshelf) I would like to do something like the following query:
select * from table1 where column1 < column2
However, when I do this:
.table("table1").select().where("column1", "<", "column2")
The SQL that knexjs generates is:
select * from table1 where column1 < 'column2'
Which doesn't give the desired result b/c it's not comparing the value from the column, it's comparing the value of the string, 'column2'.
Anyone know how to do what I'm wanting? Thanks!