Class JdbcQueryEventHandlerImpl

java.lang.Object
org.apache.ignite.client.handler.JdbcQueryEventHandlerImpl
All Implemented Interfaces:
org.apache.ignite.internal.jdbc.proto.JdbcDatabaseMetadataHandler

public class JdbcQueryEventHandlerImpl extends Object implements org.apache.ignite.internal.jdbc.proto.JdbcDatabaseMetadataHandler
Jdbc query event handler implementation.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final ClientResourceRegistry
    Client registry resources.
    static final Set<org.apache.ignite.internal.sql.engine.SqlQueryType>
    SqlQueryTypes allowed in JDBC select statements.
    static final Set<org.apache.ignite.internal.sql.engine.SqlQueryType>
    SqlQueryTypes allowed in JDBC update statements.
    static final Set<org.apache.ignite.internal.sql.engine.SqlQueryType>
    SqlQueryTypes types that return 0 in executeUpdate and execute / getUpdateCount.
  • Constructor Summary

    Constructors
    Constructor
    Description
    JdbcQueryEventHandlerImpl(org.apache.ignite.internal.sql.engine.QueryProcessor processor, JdbcMetadataCatalog meta, ClientResourceRegistry resources, org.apache.ignite.internal.tx.TxManager txManager, org.gridgain.internal.rbac.authorization.Authorizer authorizer)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    CompletableFuture<org.apache.ignite.internal.jdbc.proto.event.JdbcBatchExecuteResult>
    batchAsync(long connectionId, org.apache.ignite.internal.jdbc.proto.event.JdbcBatchExecuteRequest req)
    Deprecated.
    This method is left for compatibility and may be removed in the future.
    CompletableFuture<org.apache.ignite.internal.jdbc.proto.event.JdbcBatchExecuteResult>
    batchPrepStatementAsync(long connectionId, org.apache.ignite.internal.jdbc.proto.event.JdbcBatchPreparedStmntRequest req)
    Deprecated.
    This method is left for compatibility and may be removed in the future.
    CompletableFuture<org.apache.ignite.internal.jdbc.proto.event.JdbcQueryCancelResult>
    cancelAsync(long connectionId, long correlationToken)
    Deprecated.
    This method is left for compatibility and may be removed in the future.
    CompletableFuture<org.apache.ignite.internal.jdbc.proto.event.JdbcMetaColumnsResult>
    columnsMetaAsync(org.apache.ignite.internal.jdbc.proto.event.JdbcMetaColumnsRequest req)
    CompletableFuture<org.apache.ignite.internal.jdbc.proto.event.JdbcConnectResult>
    connect(ZoneId timeZoneId, String username)
    Deprecated.
    This method is left for compatibility and may be removed in the future.
    CompletableFuture<org.apache.ignite.internal.jdbc.proto.event.JdbcFinishTxResult>
    finishTxAsync(long connectionId, boolean commit)
    Deprecated.
    This method is left for compatibility and may be removed in the future.
    CompletableFuture<org.apache.ignite.internal.jdbc.proto.event.JdbcMetaPrimaryKeysResult>
    primaryKeysMetaAsync(org.apache.ignite.internal.jdbc.proto.event.JdbcMetaPrimaryKeysRequest req)
    CompletableFuture<? extends org.apache.ignite.internal.jdbc.proto.event.Response>
    queryAsync(long connectionId, org.apache.ignite.internal.jdbc.proto.event.JdbcQueryExecuteRequest req)
    Deprecated.
    This method is left for compatibility and may be removed in the future.
    CompletableFuture<org.apache.ignite.internal.jdbc.proto.event.JdbcMetaSchemasResult>
    schemasMetaAsync(org.apache.ignite.internal.jdbc.proto.event.JdbcMetaSchemasRequest req)
    CompletableFuture<org.apache.ignite.internal.jdbc.proto.event.JdbcMetaTablesResult>
    tablesMetaAsync(org.apache.ignite.internal.jdbc.proto.event.JdbcMetaTablesRequest req)

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • UPDATE_STATEMENT_QUERIES

      public static final Set<org.apache.ignite.internal.sql.engine.SqlQueryType> UPDATE_STATEMENT_QUERIES
      SqlQueryTypes allowed in JDBC update statements.
    • SELECT_STATEMENT_QUERIES

      public static final Set<org.apache.ignite.internal.sql.engine.SqlQueryType> SELECT_STATEMENT_QUERIES
      SqlQueryTypes allowed in JDBC select statements.
    • ZERO_UPDATE_COUNT_QUERIES

      public static final Set<org.apache.ignite.internal.sql.engine.SqlQueryType> ZERO_UPDATE_COUNT_QUERIES
      SqlQueryTypes types that return 0 in executeUpdate and execute / getUpdateCount.
    • resources

      protected final ClientResourceRegistry resources
      Client registry resources.
  • Constructor Details

    • JdbcQueryEventHandlerImpl

      public JdbcQueryEventHandlerImpl(org.apache.ignite.internal.sql.engine.QueryProcessor processor, JdbcMetadataCatalog meta, ClientResourceRegistry resources, org.apache.ignite.internal.tx.TxManager txManager, org.gridgain.internal.rbac.authorization.Authorizer authorizer)
      Constructor.
      Parameters:
      processor - Processor.
      meta - JdbcMetadataInfo.
      resources - Client resources.
      txManager - Transaction manager.
      authorizer - RBAC authorizer.
  • Method Details

    • tablesMetaAsync

      public CompletableFuture<org.apache.ignite.internal.jdbc.proto.event.JdbcMetaTablesResult> tablesMetaAsync(org.apache.ignite.internal.jdbc.proto.event.JdbcMetaTablesRequest req)
      Specified by:
      tablesMetaAsync in interface org.apache.ignite.internal.jdbc.proto.JdbcDatabaseMetadataHandler
    • columnsMetaAsync

      public CompletableFuture<org.apache.ignite.internal.jdbc.proto.event.JdbcMetaColumnsResult> columnsMetaAsync(org.apache.ignite.internal.jdbc.proto.event.JdbcMetaColumnsRequest req)
      Specified by:
      columnsMetaAsync in interface org.apache.ignite.internal.jdbc.proto.JdbcDatabaseMetadataHandler
    • schemasMetaAsync

      public CompletableFuture<org.apache.ignite.internal.jdbc.proto.event.JdbcMetaSchemasResult> schemasMetaAsync(org.apache.ignite.internal.jdbc.proto.event.JdbcMetaSchemasRequest req)
      Specified by:
      schemasMetaAsync in interface org.apache.ignite.internal.jdbc.proto.JdbcDatabaseMetadataHandler
    • primaryKeysMetaAsync

      public CompletableFuture<org.apache.ignite.internal.jdbc.proto.event.JdbcMetaPrimaryKeysResult> primaryKeysMetaAsync(org.apache.ignite.internal.jdbc.proto.event.JdbcMetaPrimaryKeysRequest req)
      Specified by:
      primaryKeysMetaAsync in interface org.apache.ignite.internal.jdbc.proto.JdbcDatabaseMetadataHandler
    • connect

      @Deprecated public CompletableFuture<org.apache.ignite.internal.jdbc.proto.event.JdbcConnectResult> connect(ZoneId timeZoneId, String username)
      Deprecated.
      This method is left for compatibility and may be removed in the future.
      Create connection context on a server and returns connection identity.
      Parameters:
      timeZoneId - Client time-zone ID.
      username - Current user name.
      Returns:
      A future representing result of the operation.
    • queryAsync

      @Deprecated public CompletableFuture<? extends org.apache.ignite.internal.jdbc.proto.event.Response> queryAsync(long connectionId, org.apache.ignite.internal.jdbc.proto.event.JdbcQueryExecuteRequest req)
      Deprecated.
      This method is left for compatibility and may be removed in the future.
      JdbcQueryExecuteRequest command handler.
      Parameters:
      connectionId - Identifier of the connection.
      req - Execute query request.
      Returns:
      Result future.
    • batchAsync

      @Deprecated public CompletableFuture<org.apache.ignite.internal.jdbc.proto.event.JdbcBatchExecuteResult> batchAsync(long connectionId, org.apache.ignite.internal.jdbc.proto.event.JdbcBatchExecuteRequest req)
      Deprecated.
      This method is left for compatibility and may be removed in the future.
      JdbcBatchExecuteRequest command handler.
      Parameters:
      connectionId - Identifier of the connection.
      req - Batch query request.
      Returns:
      Result future.
    • batchPrepStatementAsync

      @Deprecated public CompletableFuture<org.apache.ignite.internal.jdbc.proto.event.JdbcBatchExecuteResult> batchPrepStatementAsync(long connectionId, org.apache.ignite.internal.jdbc.proto.event.JdbcBatchPreparedStmntRequest req)
      Deprecated.
      This method is left for compatibility and may be removed in the future.
      JdbcBatchPreparedStmntRequest command handler.
      Parameters:
      connectionId - The identifier of the connection.
      req - Batch query request.
      Returns:
      Result future.
    • finishTxAsync

      @Deprecated public CompletableFuture<org.apache.ignite.internal.jdbc.proto.event.JdbcFinishTxResult> finishTxAsync(long connectionId, boolean commit)
      Deprecated.
      This method is left for compatibility and may be removed in the future.
      Commit/rollback active transaction (if any) when Connection.setAutoCommit(boolean) autocommit} is disabled.
      Parameters:
      connectionId - An identifier of the connection on a server.
      commit - True to commit active transaction, false to rollback it.
      Returns:
      Result future.
    • cancelAsync

      @Deprecated public CompletableFuture<org.apache.ignite.internal.jdbc.proto.event.JdbcQueryCancelResult> cancelAsync(long connectionId, long correlationToken)
      Deprecated.
      This method is left for compatibility and may be removed in the future.
      Cancels the execution of JDBC statement.
      Parameters:
      connectionId - An identifier of the connection on a server.
      correlationToken - A token associated with the execution.
      Returns:
      Result future.