import org.postgresql.largeobject.*;
import org.postgresql.util.*;
-/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1Statement.java,v 1.11 2002/10/01 00:39:02 davec Exp $
+/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1Statement.java,v 1.12 2002/10/19 21:53:42 barry Exp $
* This class defines methods of the jdbc1 specification. This class is
* extended by org.postgresql.jdbc2.AbstractJdbc2Statement which adds the jdbc2
* methods. The real Statement class (for jdbc1) is org.postgresql.jdbc1.Jdbc1Statement
*/
public void setShort(int parameterIndex, short x) throws SQLException
{
- //Note this should be fixed
- //as soon as the backend correctly supports int8 type
- //comparisons
- bind(parameterIndex, "'" + Integer.toString(x) + "'", PG_INT2);
+ bind(parameterIndex, Integer.toString(x), PG_INT2);
}
/*
*/
public void setLong(int parameterIndex, long x) throws SQLException
{
- //Note this should be fixed
- //as soon as the backend correctly supports int8 type
- //comparisons
- bind(parameterIndex, "'" + Long.toString(x) + "'", PG_INT8);
+ bind(parameterIndex, Long.toString(x), PG_INT8);
}
/*
*/
public void setFloat(int parameterIndex, float x) throws SQLException
{
- //Note this should be fixed
- //as soon as the backend correctly supports int8 type
- //comparisons
- bind(parameterIndex, "'" + Float.toString(x) + "'", PG_FLOAT);
+ bind(parameterIndex, Float.toString(x), PG_FLOAT);
}
/*
*/
public void setDouble(int parameterIndex, double x) throws SQLException
{
- //Note this should be fixed
- //as soon as the backend correctly supports int8 type
- //comparisons
- bind(parameterIndex, "'" + Double.toString(x) + "'", PG_DOUBLE);
+ bind(parameterIndex, Double.toString(x), PG_DOUBLE);
}
/*
setNull(parameterIndex, Types.OTHER);
else
{
- //Note this should be fixed
- //as soon as the backend correctly supports int8 type
- //comparisons
- bind(parameterIndex, "'" + x.toString() + "'", PG_NUMERIC);
+ bind(parameterIndex, x.toString(), PG_NUMERIC);
}
}
if (x instanceof Boolean)
bind(parameterIndex, ((Boolean)x).booleanValue() ? "1" : "0", PG_BOOLEAN);
else
- //Note this should be fixed
- //as soon as the backend correctly supports int8 type
- //comparisons
- bind(parameterIndex, "'" + x.toString() + "'", PG_NUMERIC);
+ bind(parameterIndex, x.toString(), PG_NUMERIC);
break;
case Types.CHAR:
case Types.VARCHAR: