Open grapewheel opened 1 year ago
使用getRow单行查询:
const tableStoreService = await useInject(TableStoreService) const result = await tableStoreService.getRow({ tableName: 'install', primaryKey: [{ sn: 'I2023091317390264223' }], maxVersions: 1, })
返回(无结果):
{ "consumed": { "capacityUnit": { "read": 1, "write": 0 } }, "row": "" }
使用BatchGetRow多行查询:
const tableStoreService = await useInject(TableStoreService) const result = await tableStoreService.batchGetRow({ tables: [ { tableName: 'install', primaryKey: [ [{ sn: 'I2023091317390264223' }] ], maxVersions: 1, }, ], })
返回(有结果):
{ "tables": [ [ { "isOk": true, "errorCode": null, "errorMessage": null, "tableName": "install", "capacityUnit": { "read": 1, "write": 0 }, "primaryKey": [ { "name": "sn", "value": "I2023091317390264223" } ], "attributes": [ { "columnName": "electricPrice", "columnValue": 0.8, "timestamp": 1694597943098 }, ... ] } ] ], }
使用阿里云tablestore后台是能查询的
使用getRow单行查询:
返回(无结果):
使用BatchGetRow多行查询:
返回(有结果):
使用阿里云tablestore后台是能查询的