aliyun / aliyun-tablestore-nodejs-sdk

Aliyun TableStore(原OTS) SDK for Node.js
Apache License 2.0
88 stars 33 forks source link

请问increment操作可以在batchWriteRow中调用吗 #23

Closed gohopo closed 5 years ago

gohopo commented 5 years ago

如题,我把put update increment都封装在batchWriteRow中调用,其它操作都正常,但是increment报错了。 提示Except TableStore.UpdateType,but it's Increment (大致是这样,不在电脑旁,记不太清了)。

boxiaowpl commented 5 years ago

batchWriteRow本身是支持increment的:https://github.com/aliyun/aliyun-tablestore-nodejs-sdk/blob/master/lib/metadata.js#L15 有使用问题可以加钉钉群:11789671

gohopo commented 5 years ago

自己解决了,原因是没有npm install tablestore. 之前看函数计算文档说内置了一些库,包括tablestore,所以项目里没有引用. 刚刚试着安装就可以用increment了. 应该是函数计算中的tablestore版本太旧导致的.