Search in sources :

Example 1 with JdbcThinParameterMetadata

use of org.apache.ignite.internal.jdbc.thin.JdbcThinParameterMetadata in project ignite by apache.

the class JdbcPreparedStatement method parameterMetaData.

/**
 * Fetches parameters metadata of the specified query.
 */
private ParameterMetaData parameterMetaData() throws SQLException {
    SqlFieldsQueryEx qry = new SqlFieldsQueryEx(sql, null);
    setupQuery(qry);
    try {
        List<JdbcParameterMeta> params = conn.ignite().context().query().getIndexing().parameterMetaData(conn.schemaName(), qry);
        return new JdbcThinParameterMetadata(params);
    } catch (IgniteSQLException ex) {
        throw ex.toJdbcException();
    }
}
Also used : JdbcParameterMeta(org.apache.ignite.internal.processors.odbc.jdbc.JdbcParameterMeta) SqlFieldsQueryEx(org.apache.ignite.internal.processors.cache.query.SqlFieldsQueryEx) IgniteSQLException(org.apache.ignite.internal.processors.query.IgniteSQLException) JdbcThinParameterMetadata(org.apache.ignite.internal.jdbc.thin.JdbcThinParameterMetadata)

Aggregations

JdbcThinParameterMetadata (org.apache.ignite.internal.jdbc.thin.JdbcThinParameterMetadata)1 SqlFieldsQueryEx (org.apache.ignite.internal.processors.cache.query.SqlFieldsQueryEx)1 JdbcParameterMeta (org.apache.ignite.internal.processors.odbc.jdbc.JdbcParameterMeta)1 IgniteSQLException (org.apache.ignite.internal.processors.query.IgniteSQLException)1