multiGet
读同一个hashKey下的多行数据
/**
* Multi Get
* @param {String} tableName
* @param {Object} args
* {Buffer} args.hashKey required
* {Array} args.sortKeyArray required
* {Buffer} args.sortKeyArray[i] required
* {Number} args.timeout(ms) optional
* {Number} args.maxFetchCount optional
* {Number} args.maxFetchSize optional
* @param {Function} callback
* @throws{InvalidParamException} callback is not function
*/
client.multiGet(
tableName,
args,
function(err, result){
// if operation succeed, err will be null,
// result[i].hashKey is hashKey, result[i].sortKey is sortKey, result[i].value is value
// else err will be instance of PException, result will be null
}
);
- multiGet操作的必填参数为表名,hashKey,sortKey数组和callback
- 若sortKey数据为空数组,则表示期望获取该hashKey下的所有sortKey的值
- maxFetchCount为最多获取数据的条数,默认为100
- maxFetchSize为最大获取数据的大小,默认为1000000字节