Postgresql 如何在一个查询中使用knex切换postgres表中的布尔值?
是否可以在单个查询中使用knex切换postgres表中的布尔值并返回新值Postgresql 如何在一个查询中使用knex切换postgres表中的布尔值?,postgresql,boolean,toggle,knex.js,Postgresql,Boolean,Toggle,Knex.js,是否可以在单个查询中使用knex切换postgres表中的布尔值并返回新值 await knex('table').update({ boolCol: knex.raw('NOT ??', ['boolCol]) }).returning('boolCol');
await knex('table').update({
boolCol: knex.raw('NOT ??', ['boolCol])
}).returning('boolCol');