public StatementImpl createStatement( int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { // Check to see the connection is open checkConnection(); validateResultSetType(resultSetType); validateResultSetConcurrency(resultSetConcurrency); // TODO: implement close cursors at commit // add the statement object to the map StatementImpl newStatement = new StatementImpl(this, resultSetType, resultSetConcurrency); addStatement(newStatement); return newStatement; }
public CallableStatementImpl prepareCall( String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { // Check to see the connection is open checkConnection(); validateResultSetType(resultSetType); validateResultSetConcurrency(resultSetConcurrency); validateSQL(sql); // TODO: implement close cursors at commit // add the statement object to the map CallableStatementImpl newStatement = new CallableStatementImpl(this, sql, resultSetType, resultSetConcurrency); addStatement(newStatement); return newStatement; }
public PreparedStatementImpl prepareStatement( String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability, int autoGeneratedKeys) throws SQLException { // Check to see the connection is open checkConnection(); validateResultSetType(resultSetType); validateResultSetConcurrency(resultSetConcurrency); validateSQL(sql); // add the statement object to the map PreparedStatementImpl newStatement = new PreparedStatementImpl(this, sql, resultSetType, resultSetConcurrency); newStatement.setAutoGeneratedKeys(autoGeneratedKeys == Statement.RETURN_GENERATED_KEYS); addStatement(newStatement); return newStatement; }