1const data = await db('user')
2.where('userId', '818f68e5-bf7f-418c-8e8e-19f3b25cb9c3')
3.update({ about: 'Alice in Wonderland' }, '*', { includeTriggerModifications: true })
1const {id,name} = req.body;
2 const subQuery = knex('client').select('id').where({id})
3 subQuery.then(response=>{
4 if(response.length>0){
5 subQuery.update({name})
6 .then(resp=>{
7 res.json('update done')
8 })
9 .catch(err=>{res.json(err)})
10 }
11 else{
12 res.json('update failed')
13 }
14})
15.catch(err=>{res.json(err)})
16