Search in sources :

Example 1 with JdbcQueryMetadataRequest

use of org.apache.ignite.client.proto.query.event.JdbcQueryMetadataRequest in project ignite-3 by apache.

the class JdbcResultSet method meta.

/**
 * Returns columns metadata list.
 *
 * @return Results metadata.
 * @throws SQLException On error.
 */
private List<JdbcColumnMeta> meta() throws SQLException {
    if (finished && (!isQuery || autoClose)) {
        throw new SQLException("Server cursor is already closed.", SqlStateCode.INVALID_CURSOR_STATE);
    }
    if (!metaInit) {
        JdbcMetaColumnsResult res = qryHandler.queryMetadataAsync(new JdbcQueryMetadataRequest(cursorId)).join();
        meta = res.meta();
        metaInit = true;
    }
    return meta;
}
Also used : JdbcQueryMetadataRequest(org.apache.ignite.client.proto.query.event.JdbcQueryMetadataRequest) SQLException(java.sql.SQLException) JdbcMetaColumnsResult(org.apache.ignite.client.proto.query.event.JdbcMetaColumnsResult)

Aggregations

SQLException (java.sql.SQLException)1 JdbcMetaColumnsResult (org.apache.ignite.client.proto.query.event.JdbcMetaColumnsResult)1 JdbcQueryMetadataRequest (org.apache.ignite.client.proto.query.event.JdbcQueryMetadataRequest)1