Using only knacks (without a 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")
SQL that knexjs generates:
select * from table1 where column1 < 'column2'
Which does not give the desired b / c result, it does not compare the value from the column, comparing the value of the string "column2".
Does anyone know how to do what I want? Thanks!
source share