public void handleWarning(SQLWarning warning) { AbstractJdbc2Statement.this.addWarning(warning); }
public void setByte(int parameterIndex, byte x) throws SQLException { checkClosed(); bindLiteral(parameterIndex, Integer.toString(x), Oid.INT2); }
public void setTime(int i, Time t, java.util.Calendar cal) throws SQLException { checkClosed(); if (t == null) { setNull(i, Types.TIME); return; } if (cal != null) cal = (Calendar)cal.clone(); bindString(i, connection.getTimestampUtils().toString(cal, t), Oid.UNSPECIFIED); }
public java.sql.Timestamp getTimestamp(int parameterIndex) throws SQLException { checkClosed(); checkIndex (parameterIndex, Types.TIMESTAMP, "Timestamp"); return (java.sql.Timestamp)callResult[parameterIndex-1]; }
public void setBoolean(int parameterIndex, boolean x) throws SQLException { checkClosed(); bindString(parameterIndex, x ? "1" : "0", Oid.BOOL); }
public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException { checkClosed(); if (x == null) setNull(parameterIndex, Types.DECIMAL); else bindLiteral(parameterIndex, x.toString(), Oid.NUMERIC); }
checkClosed(); setNull(parameterIndex, targetSqlType); return ; Object pgType = createInternalType( in, targetSqlType ); switch (targetSqlType) bindLiteral(parameterIndex, pgType.toString(), Oid.INT4); break; case Types.TINYINT: case Types.SMALLINT: bindLiteral(parameterIndex, pgType.toString(), Oid.INT2); break; case Types.BIGINT: bindLiteral(parameterIndex, pgType.toString(), Oid.INT8); break; case Types.REAL: bindLiteral(parameterIndex, pgType.toString(), Oid.FLOAT4); break; case Types.DOUBLE: case Types.FLOAT: bindLiteral(parameterIndex, pgType.toString(), Oid.FLOAT8); break; case Types.DECIMAL: case Types.NUMERIC: bindLiteral(parameterIndex, pgType.toString(), Oid.NUMERIC); break;
public boolean executeWithFlags(String p_sql, int flags) throws SQLException { checkClosed(); p_sql = replaceProcessing(p_sql); Query simpleQuery = connection.getQueryExecutor().createSimpleQuery(p_sql); execute(simpleQuery, null, QueryExecutor.QUERY_ONESHOT | flags); this.lastSimpleQuery = simpleQuery; return (result != null && result.getResultSet() != null); }
i = parseSql(p_sql,i,args,false,stdStrings); newsql.append(escapeFunction(functionName,args.toString(),stdStrings));
public int getMaxRows() throws SQLException { checkClosed(); return maxrows; }
protected void execute(Query queryToExecute, ParameterList queryParameters, int flags) throws SQLException { clearWarnings(); if (fetchSize > 0 && !wantsScrollableResultSet() && !connection.getAutoCommit() && !wantsHoldableResultSet()) flags |= QueryExecutor.QUERY_FORWARD_CURSOR;
public ResultSet createDriverResultSet(Field[] fields, Vector tuples) throws SQLException { return createResultSet(null, fields, tuples, null); }
public int[] executeBatch() throws SQLException checkClosed(); clearWarnings();
private void checkIndex (int parameterIndex) throws SQLException { checkIndex(parameterIndex, true); }
/** * This finalizer ensures that statements that have allocated server-side * resources free them when they become unreferenced. */ protected void finalize() { try { close(); } catch (SQLException e) { } }
protected void closeForNextExecution() throws SQLException { // Every statement execution clears any previous warnings. clearWarnings(); // Close any existing resultsets associated with this statement. while (firstUnclosedResult != null) { if (firstUnclosedResult.getResultSet() != null) firstUnclosedResult.getResultSet().close(); firstUnclosedResult = firstUnclosedResult.getNext(); } result = null; if (lastSimpleQuery != null) { lastSimpleQuery.close(); lastSimpleQuery = null; } if (generatedKeys != null) { if (generatedKeys.getResultSet() != null) { generatedKeys.getResultSet().close(); } generatedKeys = null; } }
checkClosed(); setNull(parameterIndex, targetSqlType); return ; Object pgType = createInternalType( in, targetSqlType ); switch (targetSqlType) bindLiteral(parameterIndex, pgType.toString(), Oid.INT4); break; case Types.TINYINT: case Types.SMALLINT: bindLiteral(parameterIndex, pgType.toString(), Oid.INT2); break; case Types.BIGINT: bindLiteral(parameterIndex, pgType.toString(), Oid.INT8); break; case Types.REAL: bindLiteral(parameterIndex, pgType.toString(), Oid.FLOAT4); break; case Types.DOUBLE: case Types.FLOAT: bindLiteral(parameterIndex, pgType.toString(), Oid.FLOAT8); break; case Types.DECIMAL: case Types.NUMERIC: bindLiteral(parameterIndex, pgType.toString(), Oid.NUMERIC); break;
public Object getObject(int parameterIndex) throws SQLException { checkClosed(); checkIndex (parameterIndex); return callResult[parameterIndex-1]; }
public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException { checkClosed(); if (x == null) setNull(parameterIndex, Types.DECIMAL); else bindLiteral(parameterIndex, x.toString(), Oid.NUMERIC); }
protected void setString(int parameterIndex, String x, int oid) throws SQLException { // if the passed string is null, then set this column to null checkClosed(); if (x == null) { if ( adjustIndex ) parameterIndex--; preparedParameters.setNull( parameterIndex, oid); } else bindString(parameterIndex, x, oid); }