public abstract class AbstractDruidJdbcStatement extends Object implements Closeable
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.
| Modifier and Type | Field and Description |
|---|---|
protected String |
connectionId |
protected DruidJdbcResultSet |
resultSet |
static long |
START_OFFSET |
protected int |
statementId |
protected Throwable |
throwable |
| Constructor and Description |
|---|
AbstractDruidJdbcStatement(String connectionId,
int statementId) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
closeResultSet() |
static List<org.apache.calcite.avatica.ColumnMetaData> |
createColumnMetaData(org.apache.calcite.rel.type.RelDataType rowType) |
protected static org.apache.calcite.avatica.Meta.Signature |
createSignature(PrepareResult prepareResult,
String sql) |
String |
getConnectionId() |
long |
getCurrentOffset() |
abstract org.apache.calcite.avatica.Meta.Signature |
getSignature() |
int |
getStatementId() |
boolean |
isDone() |
org.apache.calcite.avatica.Meta.Frame |
nextFrame(long fetchOffset,
int fetchMaxRowCount) |
protected DruidJdbcResultSet |
requireResultSet() |
public static final long START_OFFSET
protected final String connectionId
protected final int statementId
protected Throwable throwable
protected DruidJdbcResultSet resultSet
public AbstractDruidJdbcStatement(String connectionId, int statementId)
protected static org.apache.calcite.avatica.Meta.Signature createSignature(PrepareResult prepareResult, String sql)
public static List<org.apache.calcite.avatica.ColumnMetaData> createColumnMetaData(org.apache.calcite.rel.type.RelDataType rowType)
public org.apache.calcite.avatica.Meta.Frame nextFrame(long fetchOffset,
int fetchMaxRowCount)
public abstract org.apache.calcite.avatica.Meta.Signature getSignature()
public void closeResultSet()
protected DruidJdbcResultSet requireResultSet()
public long getCurrentOffset()
public boolean isDone()
public void close()
close in interface Closeableclose in interface AutoCloseablepublic String getConnectionId()
public int getStatementId()
Copyright © 2011–2022 The Apache Software Foundation. All rights reserved.