@Override public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { Meta.Signature sig = mockPreparedSignature(sql); return factory().newPreparedStatement(this, null, sig, resultSetType, resultSetConcurrency, resultSetHoldability); }
public void assign(Meta.Signature signature, Meta.Frame firstFrame, long updateCount) throws SQLException { statement.setSignature(signature); if (updateCount != -1) { statement.updateCount = updateCount; } else { final TimeZone timeZone = getTimeZone(); statement.openResultSet = factory.newResultSet(statement, new QueryState(sql), signature, timeZone, firstFrame); } }
public AvaticaStatement createStatement( int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { return factory.newStatement(this, null, resultSetType, resultSetConcurrency, resultSetHoldability); }
public Connection connect(String url, Properties info) throws SQLException { if (!acceptsURL(url)) { return null; } final String prefix = getConnectStringPrefix(); assert url.startsWith(prefix); final String urlSuffix = url.substring(prefix.length()); final Properties info2 = ConnectStringParser.parse(urlSuffix, info); final AvaticaConnection connection = factory.newConnection(this, factory, url, info2); handler.onConnectionInit(connection); return connection; }
public int getJDBCMinorVersion() throws SQLException { return connection.factory.getJdbcMinorVersion(); }
public int getJDBCMajorVersion() throws SQLException { return connection.factory.getJdbcMajorVersion(); }
/** * Creates an AvaticaPreparedStatement. * * @param connection Connection * @param h Statement handle * @param signature Result of preparing statement * @param resultSetType Result set type * @param resultSetConcurrency Result set concurrency * @param resultSetHoldability Result set holdability * @throws SQLException If fails due to underlying implementation reasons. */ protected AvaticaPreparedStatement(AvaticaConnection connection, Meta.StatementHandle h, Meta.Signature signature, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { super(connection, h, resultSetType, resultSetConcurrency, resultSetHoldability, signature); this.slots = new TypedValue[signature.parameters.size()]; this.resultSetMetaData = connection.factory.newResultSetMetaData(this, signature); }
this.info = info; this.meta = driver.createMeta(this); this.metaData = factory.newDatabaseMetaData(this); try { this.holdability = metaData.getResultSetHoldability();
public void assign(Meta.Signature signature, Meta.Frame firstFrame, long updateCount) throws SQLException { statement.setSignature(signature); if (updateCount != -1) { statement.updateCount = updateCount; } else { final TimeZone timeZone = getTimeZone(); statement.openResultSet = factory.newResultSet(statement, new QueryState(sql), signature, timeZone, firstFrame); } }
/** Creates a statement wrapper around an existing handle. */ protected AvaticaStatement lookupStatement(Meta.StatementHandle h) throws SQLException { final AvaticaStatement statement = statementMap.get(h.id); if (statement != null) { return statement; } //noinspection MagicConstant return factory.newStatement(this, Objects.requireNonNull(h), ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, holdability); }
public Connection connect(String url, Properties info) throws SQLException { if (!acceptsURL(url)) { return null; } final String prefix = getConnectStringPrefix(); assert url.startsWith(prefix); final String urlSuffix = url.substring(prefix.length()); final Properties info2 = ConnectStringParser.parse(urlSuffix, info); final AvaticaConnection connection = factory.newConnection(this, factory, url, info2); handler.onConnectionInit(connection); return connection; }
public int getJDBCMinorVersion() throws SQLException { return connection.factory.getJdbcMinorVersion(); }
public int getJDBCMajorVersion() throws SQLException { return connection.factory.getJdbcMajorVersion(); }
/** * Creates an AvaticaPreparedStatement. * * @param connection Connection * @param h Statement handle * @param signature Result of preparing statement * @param resultSetType Result set type * @param resultSetConcurrency Result set concurrency * @param resultSetHoldability Result set holdability * @throws SQLException If fails due to underlying implementation reasons. */ protected AvaticaPreparedStatement(AvaticaConnection connection, Meta.StatementHandle h, Meta.Signature signature, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { super(connection, h, resultSetType, resultSetConcurrency, resultSetHoldability, signature); this.slots = new TypedValue[signature.parameters.size()]; this.resultSetMetaData = connection.factory.newResultSetMetaData(this, signature); this.parameterValueBatch = new ArrayList<>(); }
this.info = info; this.meta = driver.createMeta(this); this.metaData = factory.newDatabaseMetaData(this); try { this.holdability = metaData.getResultSetHoldability();
public PreparedStatement prepareStatement( String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { try { final Meta.StatementHandle h = meta.prepare(handle, sql, -1); return factory.newPreparedStatement(this, h, h.signature, resultSetType, resultSetConcurrency, resultSetHoldability); } catch (RuntimeException e) { throw helper.createException("while preparing SQL: " + sql, e); } }
public void assign(Meta.Signature signature, Meta.Frame firstFrame, long updateCount) throws SQLException { statement.setSignature(signature); if (updateCount != -1) { statement.updateCount = updateCount; } else { final TimeZone timeZone = getTimeZone(); statement.openResultSet = factory.newResultSet(statement, new QueryState(sql), signature, timeZone, firstFrame); } }
/** Creates a statement wrapper around an existing handle. */ protected AvaticaStatement lookupStatement(Meta.StatementHandle h) throws SQLException { final AvaticaStatement statement = statementMap.get(h.id); if (statement != null) { return statement; } //noinspection MagicConstant return factory.newStatement(this, Objects.requireNonNull(h), ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, holdability); }
public Connection connect(String url, Properties info) throws SQLException { if (!acceptsURL(url)) { return null; } final String prefix = getConnectStringPrefix(); assert url.startsWith(prefix); final String urlSuffix = url.substring(prefix.length()); final Properties info2 = ConnectStringParser.parse(urlSuffix, info); final AvaticaConnection connection = factory.newConnection(this, factory, url, info2); handler.onConnectionInit(connection); return connection; }
public int getJDBCMinorVersion() throws SQLException { return connection.factory.getJdbcMinorVersion(); }