SQL query that I need to convert into Knex:
UPDATE wallabies SET age = age + 1 WHERE id = 4;
What I have:
knex('giraffes').where('id', 4).update({age: `${age}+1`})
How do I set it to age + 1 without using a string?
SQL query that I need to convert into Knex:
UPDATE wallabies SET age = age + 1 WHERE id = 4;
What I have:
knex('giraffes').where('id', 4).update({age: `${age}+1`})
How do I set it to age + 1 without using a string?
parseInt(value) try that or do Number(value) boxing