const {id,name} = req.body;
const subQuery = knex('client').select('id').where({id})
subQuery.then(response=>{
if(response.length>0){
subQuery.update({name})
.then(resp=>{
res.json('update done')
})
.catch(err=>{res.json(err)})
}
else{
res.json('update failed')
}
})
.catch(err=>{res.json(err)})
const data = await db('user')
.where('userId', '818f68e5-bf7f-418c-8e8e-19f3b25cb9c3')
.update({ about: 'Alice in Wonderland' }, '*', { includeTriggerModifications: true })