I have a very simple Knex query against a MySQL table to find the maximum value of the id
column:
const maxId = await knex('some_table').max('id').first()
But this returns a TextRow
object with a single, oddly named property. From a console.log
:
TextRow { 'max(`id`)': 99 }
Is there an easy way for me to get the value, or do I have to use object property notation like this:
const idValue = maxId['max(`id`)']