/** * Executes a prepared query, closing any previously open result set. * * @param signature Parsed query * @return Result set * @throws java.sql.SQLException if a database error occurs */ protected ResultSet executeQueryInternal(Meta.Signature signature) throws SQLException { return connection.executeQueryInternal(this, signature, null, null); }
/** * Executes a prepared query, closing any previously open result set. * * @param signature Parsed query * @param isUpdate If the execute is for an update * @return Result set * @throws java.sql.SQLException if a database error occurs */ protected ResultSet executeQueryInternal(Meta.Signature signature, boolean isUpdate) throws SQLException { return connection.executeQueryInternal(this, signature, null, null, isUpdate); }
/** * Executes a prepared query, closing any previously open result set. * * @param signature Parsed query * @param isUpdate If the execute is for an update * @return Result set * @throws java.sql.SQLException if a database error occurs */ protected ResultSet executeQueryInternal(Meta.Signature signature, boolean isUpdate) throws SQLException { return connection.executeQueryInternal(this, signature, null, null, isUpdate); }
public ResultSet executeQuery() throws SQLException { this.updateCount = -1; final Signature sig = getSignature(); return getConnection().executeQueryInternal(this, sig, null, new QueryState(sig.sql)); }
protected ResultSet createResultSet(Meta.MetaResultSet metaResultSet, QueryState state) throws SQLException { final Meta.StatementHandle h = new Meta.StatementHandle( metaResultSet.connectionId, metaResultSet.statementId, null); final AvaticaStatement statement = lookupStatement(h); ResultSet resultSet = executeQueryInternal(statement, metaResultSet.signature.sanitize(), metaResultSet.firstFrame, state); if (metaResultSet.ownStatement) { resultSet.getStatement().closeOnCompletion(); } return resultSet; }
protected ResultSet createResultSet(Meta.MetaResultSet metaResultSet, QueryState state) throws SQLException { final Meta.StatementHandle h = new Meta.StatementHandle( metaResultSet.connectionId, metaResultSet.statementId, null); final AvaticaStatement statement = lookupStatement(h); // These are all the metadata operations, no updates ResultSet resultSet = executeQueryInternal(statement, metaResultSet.signature.sanitize(), metaResultSet.firstFrame, state, false); if (metaResultSet.ownStatement) { resultSet.getStatement().closeOnCompletion(); } return resultSet; }
protected ResultSet createResultSet(Meta.MetaResultSet metaResultSet, QueryState state) throws SQLException { final Meta.StatementHandle h = new Meta.StatementHandle( metaResultSet.connectionId, metaResultSet.statementId, null); final AvaticaStatement statement = lookupStatement(h); // These are all the metadata operations, no updates ResultSet resultSet = executeQueryInternal(statement, metaResultSet.signature.sanitize(), metaResultSet.firstFrame, state, false); if (metaResultSet.ownStatement) { resultSet.getStatement().closeOnCompletion(); } return resultSet; }
public long executeLargeUpdate() throws SQLException { checkOpen(); getConnection().executeQueryInternal(this, null, null, new QueryState(getSignature().sql), true); return updateCount; }
public ResultSet executeQuery() throws SQLException { checkOpen(); this.updateCount = -1; final Signature sig = getSignature(); return getConnection().executeQueryInternal(this, sig, null, new QueryState(sig.sql), false); }
public long executeLargeUpdate() throws SQLException { getConnection().executeQueryInternal(this, getSignature(), null, new QueryState(getSignature().sql)); return updateCount; }
public long executeLargeUpdate() throws SQLException { checkOpen(); getConnection().executeQueryInternal(this, null, null, new QueryState(getSignature().sql), true); return updateCount; }
public ResultSet executeQuery() throws SQLException { checkOpen(); this.updateCount = -1; final Signature sig = getSignature(); return getConnection().executeQueryInternal(this, sig, null, new QueryState(sig.sql), false); }
public boolean execute() throws SQLException { this.updateCount = -1; getConnection().executeQueryInternal(this, getSignature(), null, new QueryState(getSignature().sql)); // Result set is null for DML or DDL. // Result set is closed if user cancelled the query. return openResultSet != null && !openResultSet.isClosed(); }
public boolean execute() throws SQLException { checkOpen(); this.updateCount = -1; // We don't know if this is actually an update or a query, so call it a query so we pass the // Signature to the server. getConnection().executeQueryInternal(this, getSignature(), null, new QueryState(getSignature().sql), false); // Result set is null for DML or DDL. // Result set is closed if user cancelled the query. return openResultSet != null && !openResultSet.isClosed(); }
public boolean execute() throws SQLException { checkOpen(); this.updateCount = -1; // We don't know if this is actually an update or a query, so call it a query so we pass the // Signature to the server. getConnection().executeQueryInternal(this, getSignature(), null, new QueryState(getSignature().sql), false); // Result set is null for DML or DDL. // Result set is closed if user cancelled the query. return openResultSet != null && !openResultSet.isClosed(); }