Search in sources :

Example 6 with GridH2ValueCacheObject

use of org.apache.ignite.internal.processors.query.h2.opt.GridH2ValueCacheObject in project ignite by apache.

the class H2ResultSetIterator method readRow.

/**
 * @throws SQLException On error.
 */
private void readRow() throws SQLException {
    if (res != null) {
        Value[] values = res.currentRow();
        for (int c = 0; c < row.length; c++) {
            Value val = values[c];
            if (val instanceof GridH2ValueCacheObject) {
                GridH2ValueCacheObject valCacheObj = (GridH2ValueCacheObject) values[c];
                row[c] = valCacheObj.getObject(true);
            } else
                row[c] = val.getObject();
        }
    } else {
        for (int c = 0; c < row.length; c++) row[c] = data.getObject(c + 1);
    }
}
Also used : Value(org.h2.value.Value) GridH2ValueCacheObject(org.apache.ignite.internal.processors.query.h2.opt.GridH2ValueCacheObject)

Aggregations

GridH2ValueCacheObject (org.apache.ignite.internal.processors.query.h2.opt.GridH2ValueCacheObject)6 Value (org.h2.value.Value)5 Timestamp (java.sql.Timestamp)2 UUID (java.util.UUID)2 IgniteCheckedException (org.apache.ignite.IgniteCheckedException)2 GridKernalContext (org.apache.ignite.internal.GridKernalContext)2 CacheObject (org.apache.ignite.internal.processors.cache.CacheObject)2 ValueJavaObject (org.h2.value.ValueJavaObject)2 ValueTimestamp (org.h2.value.ValueTimestamp)2 CacheObjectValueContext (org.apache.ignite.internal.processors.cache.CacheObjectValueContext)1 KeyCacheObject (org.apache.ignite.internal.processors.cache.KeyCacheObject)1