Class AbstractDruidJdbcStatement

java.lang.Object
org.apache.druid.sql.avatica.AbstractDruidJdbcStatement
All Implemented Interfaces:
Closeable, AutoCloseable
Direct Known Subclasses:
DruidJdbcPreparedStatement, DruidJdbcStatement

public abstract class AbstractDruidJdbcStatement extends Object implements Closeable
Common implementation for the JDBC Statement and PreparedStatement implementations in Druid. Statement use DruidJdbcResultSet objects to iterate through rows: zero or one may be open at any time, and a single statement supports multiple result sets concurrently. Druid closes the result set after the last batch in compliance with this note on page 137 of the JDBC 4.1 specification:

Some JDBC driver implementations may also implicitly close the ResultSet when the ResultSet type is TYPE_FORWARD_ONLY and the next method of ResultSet returns false.

  • Field Details

  • Constructor Details

  • Method Details

    • createSignature

      protected static org.apache.calcite.avatica.Meta.Signature createSignature(PrepareResult prepareResult, String sql)
    • createColumnMetaData

      public static List<org.apache.calcite.avatica.ColumnMetaData> createColumnMetaData(org.apache.calcite.rel.type.RelDataType rowType)
    • nextFrame

      public org.apache.calcite.avatica.Meta.Frame nextFrame(long fetchOffset, int fetchMaxRowCount)
    • getSignature

      public abstract org.apache.calcite.avatica.Meta.Signature getSignature()
    • closeResultSet

      public void closeResultSet()
    • requireResultSet

      protected DruidJdbcResultSet requireResultSet()
    • getCurrentOffset

      public long getCurrentOffset()
    • isDone

      public boolean isDone()
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • getConnectionId

      public String getConnectionId()
    • getStatementId

      public int getStatementId()
    • getSqlQuery

      public SqlQueryPlus getSqlQuery()