public void setBoolean(int parameterIndex, boolean x) throws SQLException { checkClosed(); bindString(parameterIndex, x ? "1" : "0", Oid.BOOL); }
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); }
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 void setDate(int i, java.sql.Date d, java.util.Calendar cal) throws SQLException { checkClosed(); if (d == null) { setNull(i, Types.DATE); return; } if (cal != null) cal = (Calendar)cal.clone(); // We must use UNSPECIFIED here, or inserting a Date-with-timezone into a // timestamptz field does an unexpected rotation by the server's TimeZone: // // We want to interpret 2005/01/01 with calendar +0100 as // "local midnight in +0100", but if we go via date it interprets it // as local midnight in the server's timezone: // template1=# select '2005-01-01+0100'::timestamptz; // timestamptz // ------------------------ // 2005-01-01 02:00:00+03 // (1 row) // template1=# select '2005-01-01+0100'::date::timestamptz; // timestamptz // ------------------------ // 2005-01-01 00:00:00+03 // (1 row) bindString(i, connection.getTimestampUtils().toString(cal, d), Oid.UNSPECIFIED); }
bindString(i, connection.getTimestampUtils().toString(cal, t), Oid.UNSPECIFIED); // Let the server infer the right type.
break; case Types.DISTINCT: bindString(parameterIndex, in.toString(), Oid.UNSPECIFIED); break; case Types.OTHER: setPGobject(parameterIndex, (PGobject)in); else bindString(parameterIndex, in.toString(), Oid.UNSPECIFIED); break; default:
public void setBoolean(int parameterIndex, boolean x) throws SQLException { checkClosed(); bindString(parameterIndex, x ? "1" : "0", Oid.BOOL); }
public void setBoolean(int parameterIndex, boolean x) throws SQLException { checkClosed(); bindString(parameterIndex, x ? "1" : "0", Oid.BOOL); }
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); }
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); }
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 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 void setDate(int i, java.sql.Date d, java.util.Calendar cal) throws SQLException { checkClosed(); if (d == null) { setNull(i, Types.DATE); return; } if (cal != null) cal = (Calendar)cal.clone(); // We must use UNSPECIFIED here, or inserting a Date-with-timezone into a // timestamptz field does an unexpected rotation by the server's TimeZone: // // We want to interpret 2005/01/01 with calendar +0100 as // "local midnight in +0100", but if we go via date it interprets it // as local midnight in the server's timezone: // template1=# select '2005-01-01+0100'::timestamptz; // timestamptz // ------------------------ // 2005-01-01 02:00:00+03 // (1 row) // template1=# select '2005-01-01+0100'::date::timestamptz; // timestamptz // ------------------------ // 2005-01-01 00:00:00+03 // (1 row) bindString(i, connection.getTimestampUtils().toString(cal, d), Oid.UNSPECIFIED); }
public void setDate(int i, java.sql.Date d, java.util.Calendar cal) throws SQLException { checkClosed(); if (d == null) { setNull(i, Types.DATE); return; } if (cal != null) cal = (Calendar)cal.clone(); // We must use UNSPECIFIED here, or inserting a Date-with-timezone into a // timestamptz field does an unexpected rotation by the server's TimeZone: // // We want to interpret 2005/01/01 with calendar +0100 as // "local midnight in +0100", but if we go via date it interprets it // as local midnight in the server's timezone: // template1=# select '2005-01-01+0100'::timestamptz; // timestamptz // ------------------------ // 2005-01-01 02:00:00+03 // (1 row) // template1=# select '2005-01-01+0100'::date::timestamptz; // timestamptz // ------------------------ // 2005-01-01 00:00:00+03 // (1 row) bindString(i, connection.getTimestampUtils().toString(cal, d), Oid.UNSPECIFIED); }
bindString(i, connection.getTimestampUtils().toString(cal, t), Oid.UNSPECIFIED); // Let the server infer the right type.
bindString(i, connection.getTimestampUtils().toString(cal, t), Oid.UNSPECIFIED); // Let the server infer the right type.
break; case Types.DISTINCT: bindString(parameterIndex, in.toString(), Oid.UNSPECIFIED); break; case Types.OTHER: setPGobject(parameterIndex, (PGobject)in); else bindString(parameterIndex, in.toString(), Oid.UNSPECIFIED); break; default:
setPGobject(parameterIndex, (PGobject)in); else bindString(parameterIndex, in.toString(), Oid.UNSPECIFIED); break; default: