in lib/protocol/decoder.js [167:197]
_parseWriteRowItem: function (rowItem, tableName) {
var primaryKey = null;
var attributes = null;
var errorCode = null;
var errorMessage = null;
if (rowItem.isOk) {
if (rowItem.row != null && rowItem.row.length != 0) {
var inputStream = new TableStore.PlainBufferInputStream(rowItem.row);
var codedInputStream = new TableStore.PlainBufferCodedInputStream(inputStream);
var result = codedInputStream.readRow();
primaryKey = result.primaryKey;
attributes = result.attributes;
}
} else {
errorCode = rowItem.error.code;
errorMessage = rowItem.error.message;
}
var writeRowItem = {
isOk: rowItem.isOk,
errorCode: errorCode,
errorMessage: errorMessage,
tableName: tableName,
capacityUnit: (rowItem.consumed == null ? '' : rowItem.consumed.capacityUnit),
primaryKey: primaryKey,
attributes: attributes
};
return writeRowItem;
},