CacheReader

CacheReader

Reads one or more than forward-only stream of result sets by executing OQ commands on cache source.


Constructor

# new CacheReader()

Initialize an instance of CacheReader

Methods

# getBigDecimal(index)

Gets value of specified index as decimal

Parameters:
Name Type Description
index Number

Index of column

Returns:

decimal value on specified index

# getBoolean(index)

Gets value of specified index as bool

Parameters:
Name Type Description
index Number

Index of column

Returns:

bool value on specified index

# getDate(index) → {Date}

Returns DateTime at specified column index

Parameters:
Name Type Description
index Number

Index of Column

Returns:
Type
Date

# getDouble(index)

Gets value of specified index as double

Parameters:
Name Type Description
index Number

Index of column

Returns:

double value on specified index

# getFieldCount()

Gets number of columns.

Returns:

Number

# getInt(index)

Gets value of specified index as 32 bit integer

Parameters:
Name Type Description
index Number

Index of column

Returns:

Number value on specified index

# getIsClosed()

True, if reader is closed else false.

Returns:

boolean

# getLong(index)

Gets value of specified index as 64 bit integer

Parameters:
Name Type Description
index Number

Index of column

Returns:

Number value on specified index

# getName(index)

Returns name of specified column index

Parameters:
Name Type Description
index Number

Index of column

Returns:

Name of column

# getOrdinal(columnName)

Returns index of specified column name

Parameters:
Name Type Description
columnName String

Name of column

Returns:

Index of column

# getShort(index)

Gets value of specified index as 16 bit integer

Parameters:
Name Type Description
index Number

Index of column

Returns:

Number value on specified index

# getString(index)

Gets value of specified index as string

Parameters:
Name Type Description
index Number

Index of column

Returns:

string value on specified column

# getValue(index, cls)

Gets value at specified column index

Parameters:
Name Type Description
index Number

Index of column

cls JsonDataType

Specifies the type of value obtained from the Cache.

Throws:
  • IOException

  • ClassNotFoundException

Returns:

long value on specified index

# getValues(objects, cls)

Populates array of objects with values in current row

Parameters:
Name Type Description
objects Array.<Object>

array of objects to be populated

cls JsonDataType

Specifies the type of value obtained from the Cache.

Returns:

No of objects copied in specified array

# (async) read()

Advances ICacheReader to next record

Returns:

true if there are more rows; else false