in lib/protocol/plain_buffer_coded_stream.js [224:269]
readRowWithoutHeader: function () {
var rowCheckSum = 0;
var primaryKey = [];
var attributes = [];
if (this.checkLastTagWas(TableStore.plainBufferConsts.TAG_ROW_PK)) {
this.readTag();
while (this.checkLastTagWas(TableStore.plainBufferConsts.TAG_CELL)) {
var pkColumn = this.readPrimaryKeyColumn(rowCheckSum);
primaryKey.push({ name: pkColumn.columnName, value: pkColumn.primaryKeyValue });
rowCheckSum = pkColumn.rowCheckSum;
}
}
if (this.checkLastTagWas(TableStore.plainBufferConsts.TAG_ROW_DATA)) {
this.readTag();
while (this.checkLastTagWas(TableStore.plainBufferConsts.TAG_CELL)) {
var attrColumn = this.readColumn(rowCheckSum);
attributes.push({
columnName: attrColumn.columnName,
columnValue: attrColumn.columnValue,
timestamp: attrColumn.timestamp
});
rowCheckSum = attrColumn.rowCheckSum;
}
}
if (this.checkLastTagWas(TableStore.plainBufferConsts.TAG_DELETE_ROW_MARKER)) {
this.readTag();
rowCheckSum = TableStore.plainBufferCrc8.crcInt8(rowCheckSum, 1);
} else {
rowCheckSum = TableStore.plainBufferCrc8.crcInt8(rowCheckSum, 0);
}
if (this.checkLastTagWas(TableStore.plainBufferConsts.TAG_ROW_CHECKSUM)) {
var checkSum = this.inputStream.readRawByte();
if (checkSum != rowCheckSum) {
throw new Error("Checksum is mismatch.");
}
this.readTag();
} else {
throw new Error("Expect TAG_ROW_CHECKSUM but it was " + this.getLastTag());
}
//return primaryKey, attributes;
return { primaryKey: primaryKey, attributes: attributes };
},