我用doc也一样 改用where之后就好了
请求关于云数据库表为空时 查询出错的问题?我新建了一张表在云数据库,这时候还没有数据,然后,我在云函数进行id条件查询会报错。 正常不是null之类的吗? 难道每个查询之前都需要先查询表是否为空? 大概的报错如下: [代码]Error: errCode: -1 unknown error | errMsg: document.get:fail document with _id 0709965b4f6c33f2c2cf859b12b231aa does not exist; at document.get api; [代码][代码] [代码][代码]at new CloudSDKError (C:\Users\hasbu\code\oil_preference\cloudfunctions\getGasCollect\node_modules\wx-server-sdk\index.js:6360:28)[代码][代码] [代码][代码]at returnAsCloudSDKError (C:\Users\hasbu\code\oil_preference\cloudfunctions\getGasCollect\node_modules\wx-server-sdk\index.js:6412:16)[代码][代码] [代码][代码]at Object.returnAsFinalCloudSDKError (C:\Users\hasbu\code\oil_preference\cloudfunctions\getGasCollect\node_modules\wx-server-sdk\index.js:6426:13)[代码][代码] [代码][代码]at DocumentReference.<anonymous> (C:\Users\hasbu\code\oil_preference\cloudfunctions\getGasCollect\node_modules\wx-server-sdk\index.js:1506:40)[代码][代码] [代码][代码]at step (C:\Users\hasbu\code\oil_preference\cloudfunctions\getGasCollect\node_modules\tslib\tslib.js:136:27)[代码][代码] [代码][代码]at Object.next (C:\Users\hasbu\code\oil_preference\cloudfunctions\getGasCollect\node_modules\tslib\tslib.js:117:57)[代码][代码] [代码][代码]at fulfilled (C:\Users\hasbu\code\oil_preference\cloudfunctions\getGasCollect\node_modules\tslib\tslib.js:107:62)[代码][代码] [代码][代码]at processTicksAndRejections (internal[代码][代码]/process/task_queues[代码][代码].js:86:5)[代码]
2023-03-04