public DbColumnBuilder(String name,int typeCode,int length,boolean nullable) { this.name = name; this.typeCode = typeCode; this.typeName = JdbcTypes.forTypeCode(typeCode).getName(); this.length = length; this.nullable = nullable; }
@Override public void close() throws SQLException { JDBC.closeStatementOnly(stmt); super.close(); } }
@Override public final void addBatch(String sql) throws SQLException { this.lastExecutingSql = sql; try { super.addBatch(sql); }catch (SQLException e) { throw handleSQLException(e); } }
/** * Test the type of the statement and return the proxy of it. */ protected Statement proxyOf(Statement stmt) { if (stmt instanceof PreparedStatement) { return proxyOfPreparedStatement((PreparedStatement) stmt, null); } if (stmt instanceof CallableStatement) { return proxyOfCallableStatement((CallableStatement) stmt, null); } return proxyOfStatement(stmt); }
@Override public final ResultSet getResultSet() throws SQLException { return proxyOfResultSet(super.getResultSet()); }
@Override public final ResultSet getGeneratedKeys() throws SQLException { return proxyOfResultSet(super.getGeneratedKeys()); }
public boolean isSpecial(){ return this.equals(Special); } }
public OutputStream setAsciiStream(long pos) throws SQLException { unsupported(); return null; }
@Override public void rollback() throws SQLException { transactionState = TRANSACTION_STATE_ROLLBACK; super.rollback(); }
public long position(Blob pattern, long start) throws SQLException { unsupported(); return 0; }
/** * Returns the proxy of {@link Statement}. */ protected StatementProxy proxyOfStatement(Statement stmt) { return new StatementProxy(this, stmt, statementStackTrace); }
/** * Returns the proxy of {@link CallableStatement}. */ protected CallableStatementProxy proxyOfCallableStatement(CallableStatement cs, String sql) { return new CallableStatementProxy<>(this, cs, sql, statementStackTrace); }
@Override public void commit() throws SQLException { transactionState = TRANSACTION_STATE_COMMIT; super.commit(); }
/** * Returns the proxy of {@link PreparedStatement}. */ protected PreparedStatementProxy proxyOfPreparedStatement(PreparedStatement ps, String sql) { return new PreparedStatementProxy(this, ps, sql, statementStackTrace); }
/** * Returns the proxy of {@link DatabaseMetaData}. */ protected DatabaseMetadataProxy proxyOfMetadata(DatabaseMetaData md) { return new DatabaseMetadataProxy(this, md); }
public DbColumnBuilder setTypeCode(Integer typeCode) { this.typeCode = typeCode; if(null != typeCode){ this.typeName = JdbcTypes.forTypeCode(typeCode).getName(); }else{ this.typeName = null; } return this; }
public int setString(long pos, String str, int offset, int len) throws SQLException { unsupported(); return 0; }
@Override public void rollback(Savepoint savepoint) throws SQLException { transactionState = TRANSACTION_STATE_ROLLBACK; super.rollback(savepoint); }
@Override public InputStream getBinaryStream(long pos, long length) throws SQLException { unsupported(); return null; }
@Override public Reader getCharacterStream(long pos, long length) throws SQLException { unsupported(); return null; }