微信小程序,报错thirdScriptError db.collection(...).where(...).update is not a function;

微信小程序,报错thirdScriptError db.collection(...).where(...).update is not a function;

问题描述:

        env: 'ec-1480e4',
        traceUser: true
      });
      const newpwd1 = newpwd
      const db = wx.cloud.database()
      db.collection('test2').where({
        userPassword:oldpwd
      }).update({
        userPassword: newpwd
        })

    }

楼主请问有解决吗很疑惑欸