in lib/sql.js [36:86]
this.get = function (rowIndex, columnIndex) {
if (rowIndex >= this.rowCount || rowIndex < 0) {
throw new Error("Row index " + columnIndex + " out of range");
}
if (columnIndex >= this.columnCount || columnIndex < 0) {
throw new Error("Column index " + columnIndex + " out of range");
}
let columnType = this._columnTypes[columnIndex];
let columnValue = this._columnValues[columnIndex];
switch (columnType) {
case TableStore.SQLDataType.LONG:
if (columnValue.isNullvalues(rowIndex)) {
return null;
} else {
return columnValue.longValues(rowIndex);
}
case TableStore.SQLDataType.BOOLEAN:
if (columnValue.isNullvalues(rowIndex)) {
return null;
} else {
return columnValue.boolValues(rowIndex);
}
case TableStore.SQLDataType.DOUBLE:
if (columnValue.isNullvalues(rowIndex)) {
return null;
} else {
return columnValue.doubleValues(rowIndex);
}
case TableStore.SQLDataType.STRING:
if (columnValue.isNullvalues(rowIndex)) {
return null;
} else {
return columnValue.stringValues(rowIndex);
}
case TableStore.SQLDataType.BINARY:
if (columnValue.isNullvalues(rowIndex)) {
return null;
} else {
return columnValue.binaryValues(rowIndex);
}
case TableStore.SQLDataType.STRING_RLE:
if (columnValue.isNullvalues(rowIndex)) {
return null;
} else {
let rleStringValue = this._rleStringValues[columnIndex];
return this._resolveRLEString(rleStringValue, rowIndex);
}
default:
throw new Error("not supported column type in flatBuffers: " + columnType);
}
};