Add knex('users').firstOrFail()
MIT License
Add knex('users').firstOrFail()
. Plug and play.
select
and returning
.yarn add knex-first-or-fail
import 'knex-first-or-fail';
import createKnex from 'knex';
export const knex = createKnex(dbConfig);
And you are ready to go.
knex('users').where({ id: 1 }).firstOrFail()