mirror of
https://github.com/postgres/postgres.git
synced 2025-07-15 19:21:59 +03:00
JDBC indenting, comment cleanups.
This commit is contained in:
@ -7,7 +7,7 @@ import java.math.BigDecimal;
|
||||
import org.postgresql.Field;
|
||||
import org.postgresql.util.*;
|
||||
|
||||
/**
|
||||
/*
|
||||
* Array is used collect one column of query result data.
|
||||
*
|
||||
* <p>Read a field of type Array into either a natively-typed
|
||||
@ -31,7 +31,7 @@ public class Array implements java.sql.Array
|
||||
private int idx = 0;
|
||||
private String rawString = null;
|
||||
|
||||
/**
|
||||
/*
|
||||
* Create a new Array
|
||||
*
|
||||
* @param conn a database connection
|
||||
|
@ -8,7 +8,7 @@ package org.postgresql.jdbc2;
|
||||
import java.sql.*;
|
||||
import java.math.*;
|
||||
|
||||
/**
|
||||
/*
|
||||
* CallableStatement is used to execute SQL stored procedures.
|
||||
*
|
||||
* <p>JDBC provides a stored procedure SQL escape that allows stored
|
||||
@ -41,7 +41,7 @@ import java.math.*;
|
||||
|
||||
public class CallableStatement extends org.postgresql.jdbc2.PreparedStatement implements java.sql.CallableStatement
|
||||
{
|
||||
/**
|
||||
/*
|
||||
* @exception SQLException on failure
|
||||
*/
|
||||
public CallableStatement(Connection c, String q) throws SQLException
|
||||
@ -49,7 +49,7 @@ public class CallableStatement extends org.postgresql.jdbc2.PreparedStatement im
|
||||
super(c, q);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Before executing a stored procedure call you must explicitly
|
||||
* call registerOutParameter to register the java.sql.Type of each
|
||||
* out parameter.
|
||||
@ -67,7 +67,7 @@ public class CallableStatement extends org.postgresql.jdbc2.PreparedStatement im
|
||||
public void registerOutParameter(int parameterIndex, int sqlType) throws SQLException
|
||||
{}
|
||||
|
||||
/**
|
||||
/*
|
||||
* You must also specify the scale for numeric/decimal types:
|
||||
*
|
||||
* <p>Note: When reading the value of an out parameter, you must use
|
||||
@ -89,7 +89,7 @@ public class CallableStatement extends org.postgresql.jdbc2.PreparedStatement im
|
||||
//return true;
|
||||
//}
|
||||
|
||||
/**
|
||||
/*
|
||||
* An OUT parameter may have the value of SQL NULL; wasNull
|
||||
* reports whether the last value read has this special value.
|
||||
*
|
||||
@ -109,7 +109,7 @@ public class CallableStatement extends org.postgresql.jdbc2.PreparedStatement im
|
||||
//return null;
|
||||
//}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Get the value of a CHAR, VARCHAR, or LONGVARCHAR parameter as a
|
||||
* Java String.
|
||||
*
|
||||
@ -129,7 +129,7 @@ public class CallableStatement extends org.postgresql.jdbc2.PreparedStatement im
|
||||
//return null;
|
||||
//}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Get the value of a BIT parameter as a Java boolean.
|
||||
*
|
||||
* @param parameterIndex the first parameter is 1, the second is 2,...
|
||||
@ -141,7 +141,7 @@ public class CallableStatement extends org.postgresql.jdbc2.PreparedStatement im
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Get the value of a TINYINT parameter as a Java byte.
|
||||
*
|
||||
* @param parameterIndex the first parameter is 1, the second is 2,...
|
||||
@ -153,7 +153,7 @@ public class CallableStatement extends org.postgresql.jdbc2.PreparedStatement im
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Get the value of a SMALLINT parameter as a Java short.
|
||||
*
|
||||
* @param parameterIndex the first parameter is 1, the second is 2,...
|
||||
@ -165,7 +165,7 @@ public class CallableStatement extends org.postgresql.jdbc2.PreparedStatement im
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Get the value of an INTEGER parameter as a Java int.
|
||||
*
|
||||
* @param parameterIndex the first parameter is 1, the second is 2,...
|
||||
@ -177,7 +177,7 @@ public class CallableStatement extends org.postgresql.jdbc2.PreparedStatement im
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Get the value of a BIGINT parameter as a Java long.
|
||||
*
|
||||
* @param parameterIndex the first parameter is 1, the second is 2,...
|
||||
@ -189,7 +189,7 @@ public class CallableStatement extends org.postgresql.jdbc2.PreparedStatement im
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Get the value of a FLOAT parameter as a Java float.
|
||||
*
|
||||
* @param parameterIndex the first parameter is 1, the second is 2,...
|
||||
@ -201,7 +201,7 @@ public class CallableStatement extends org.postgresql.jdbc2.PreparedStatement im
|
||||
return (float) 0.0;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Get the value of a DOUBLE parameter as a Java double.
|
||||
*
|
||||
* @param parameterIndex the first parameter is 1, the second is 2,...
|
||||
@ -213,7 +213,7 @@ public class CallableStatement extends org.postgresql.jdbc2.PreparedStatement im
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Get the value of a NUMERIC parameter as a java.math.BigDecimal
|
||||
* object.
|
||||
*
|
||||
@ -230,7 +230,7 @@ public class CallableStatement extends org.postgresql.jdbc2.PreparedStatement im
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Get the value of a SQL BINARY or VARBINARY parameter as a Java
|
||||
* byte[]
|
||||
*
|
||||
@ -248,7 +248,7 @@ public class CallableStatement extends org.postgresql.jdbc2.PreparedStatement im
|
||||
//return null;
|
||||
//}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Get the value of a SQL DATE parameter as a java.sql.Date object
|
||||
*
|
||||
* @param parameterIndex the first parameter is 1, the second is 2,...
|
||||
@ -260,7 +260,7 @@ public class CallableStatement extends org.postgresql.jdbc2.PreparedStatement im
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Get the value of a SQL TIME parameter as a java.sql.Time object.
|
||||
*
|
||||
* @param parameterIndex the first parameter is 1, the second is 2,...
|
||||
@ -272,7 +272,7 @@ public class CallableStatement extends org.postgresql.jdbc2.PreparedStatement im
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Get the value of a SQL TIMESTAMP parameter as a java.sql.Timestamp object.
|
||||
*
|
||||
* @param parameterIndex the first parameter is 1, the second is 2,...
|
||||
@ -296,7 +296,7 @@ public class CallableStatement extends org.postgresql.jdbc2.PreparedStatement im
|
||||
|
||||
// getObject returns a Java object for the parameter.
|
||||
// See the JDBC spec's "Dynamic Programming" chapter for details.
|
||||
/**
|
||||
/*
|
||||
* Get the value of a parameter as a Java object.
|
||||
*
|
||||
* <p>This method returns a Java object whose type coresponds to the
|
||||
|
@ -16,8 +16,8 @@ import org.postgresql.fastpath.*;
|
||||
import org.postgresql.largeobject.*;
|
||||
import org.postgresql.util.*;
|
||||
|
||||
/**
|
||||
* $Id: Connection.java,v 1.14 2001/10/25 05:59:59 momjian Exp $
|
||||
/*
|
||||
* $Id: Connection.java,v 1.15 2001/11/19 22:33:38 momjian Exp $
|
||||
*
|
||||
* A Connection represents a session with a specific database. Within the
|
||||
* context of a Connection, SQL statements are executed and results are
|
||||
@ -39,12 +39,12 @@ public class Connection extends org.postgresql.Connection implements java.sql.Co
|
||||
// This is a cache of the DatabaseMetaData instance for this connection
|
||||
protected DatabaseMetaData metadata;
|
||||
|
||||
/**
|
||||
/*
|
||||
* The current type mappings
|
||||
*/
|
||||
protected java.util.Map typemap;
|
||||
|
||||
/**
|
||||
/*
|
||||
* SQL statements without parameters are normally executed using
|
||||
* Statement objects. If the same SQL statement is executed many
|
||||
* times, it is more efficient to use a PreparedStatement
|
||||
@ -59,7 +59,7 @@ public class Connection extends org.postgresql.Connection implements java.sql.Co
|
||||
return createStatement(java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE, java.sql.ResultSet.CONCUR_READ_ONLY);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* SQL statements without parameters are normally executed using
|
||||
* Statement objects. If the same SQL statement is executed many
|
||||
* times, it is more efficient to use a PreparedStatement
|
||||
@ -78,7 +78,7 @@ public class Connection extends org.postgresql.Connection implements java.sql.Co
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
/*
|
||||
* A SQL statement with or without IN parameters can be pre-compiled
|
||||
* and stored in a PreparedStatement object. This object can then
|
||||
* be used to efficiently execute this statement multiple times.
|
||||
@ -109,7 +109,7 @@ public class Connection extends org.postgresql.Connection implements java.sql.Co
|
||||
return s;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* A SQL stored procedure call statement is handled by creating a
|
||||
* CallableStatement for it. The CallableStatement provides methods
|
||||
* for setting up its IN and OUT parameters and methods for executing
|
||||
@ -142,7 +142,7 @@ public class Connection extends org.postgresql.Connection implements java.sql.Co
|
||||
//return s;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Tests to see if a Connection is closed.
|
||||
*
|
||||
* Peter Feb 7 2000: Now I've discovered that this doesn't actually obey the
|
||||
@ -187,7 +187,7 @@ public class Connection extends org.postgresql.Connection implements java.sql.Co
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* A connection's database is able to provide information describing
|
||||
* its tables, its supported SQL grammar, its stored procedures, the
|
||||
* capabilities of this connection, etc. This information is made
|
||||
@ -203,7 +203,7 @@ public class Connection extends org.postgresql.Connection implements java.sql.Co
|
||||
return metadata;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* This overides the method in org.postgresql.Connection and returns a
|
||||
* ResultSet.
|
||||
*/
|
||||
@ -237,7 +237,7 @@ public class Connection extends org.postgresql.Connection implements java.sql.Co
|
||||
typemap = map;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* This overides the standard internal getObject method so that we can
|
||||
* check the jdbc2 type map first
|
||||
*
|
||||
@ -280,7 +280,7 @@ public class Connection extends org.postgresql.Connection implements java.sql.Co
|
||||
return sqlType;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* This table holds the org.postgresql names for the types supported.
|
||||
* Any types that map to Types.OTHER (eg POINT) don't go into this table.
|
||||
* They default automatically to Types.OTHER
|
||||
@ -310,7 +310,7 @@ public class Connection extends org.postgresql.Connection implements java.sql.Co
|
||||
"_bytea"
|
||||
};
|
||||
|
||||
/**
|
||||
/*
|
||||
* This table holds the JDBC type for each entry above.
|
||||
*
|
||||
* Note: This must be in the same order as above
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -3,7 +3,7 @@ package org.postgresql.jdbc2;
|
||||
import org.postgresql.util.*;
|
||||
import java.sql.*;
|
||||
|
||||
/**
|
||||
/*
|
||||
* This class extends java.sql.BatchUpdateException, and provides our
|
||||
* internationalisation handling.
|
||||
*/
|
||||
|
@ -13,7 +13,7 @@ import java.util.*;
|
||||
import org.postgresql.largeobject.*;
|
||||
import org.postgresql.util.*;
|
||||
|
||||
/**
|
||||
/*
|
||||
* A SQL Statement is pre-compiled and stored in a PreparedStatement object.
|
||||
* This object can then be used to efficiently execute this statement multiple
|
||||
* times.
|
||||
@ -44,7 +44,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
|
||||
private static ThreadLocal tl_df = new ThreadLocal(); // setDate() SimpleDateFormat
|
||||
private static ThreadLocal tl_tsdf = new ThreadLocal(); // setTimestamp() SimpleDateFormat
|
||||
|
||||
/**
|
||||
/*
|
||||
* Constructor for the PreparedStatement class.
|
||||
* Split the SQL statement into segments - separated by the arguments.
|
||||
* When we rebuild the thing with the arguments, we can substitute the
|
||||
@ -87,7 +87,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
|
||||
templateStrings[i] = (String)v.elementAt(i);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* A Prepared SQL query is executed and its ResultSet is returned
|
||||
*
|
||||
* @return a ResultSet that contains the data produced by the
|
||||
@ -99,7 +99,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
|
||||
return super.executeQuery(compileQuery()); // in Statement class
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Execute a SQL INSERT, UPDATE or DELETE statement. In addition,
|
||||
* SQL statements that return nothing such as SQL DDL statements can
|
||||
* be executed.
|
||||
@ -113,7 +113,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
|
||||
return super.executeUpdate(compileQuery()); // in Statement class
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Helper - this compiles the SQL query from the various parameters
|
||||
* This is identical to toString() except it throws an exception if a
|
||||
* parameter is unused.
|
||||
@ -134,7 +134,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
|
||||
return sbuf.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Set a parameter to SQL NULL
|
||||
*
|
||||
* <p><B>Note:</B> You must specify the parameters SQL type (although
|
||||
@ -149,7 +149,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
|
||||
set(parameterIndex, "null");
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Set a parameter to a Java boolean value. The driver converts this
|
||||
* to a SQL BIT value when it sends it to the database.
|
||||
*
|
||||
@ -162,7 +162,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
|
||||
set(parameterIndex, x ? "'t'" : "'f'");
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Set a parameter to a Java byte value. The driver converts this to
|
||||
* a SQL TINYINT value when it sends it to the database.
|
||||
*
|
||||
@ -175,7 +175,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
|
||||
set(parameterIndex, Integer.toString(x));
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Set a parameter to a Java short value. The driver converts this
|
||||
* to a SQL SMALLINT value when it sends it to the database.
|
||||
*
|
||||
@ -188,7 +188,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
|
||||
set(parameterIndex, Integer.toString(x));
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Set a parameter to a Java int value. The driver converts this to
|
||||
* a SQL INTEGER value when it sends it to the database.
|
||||
*
|
||||
@ -201,7 +201,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
|
||||
set(parameterIndex, Integer.toString(x));
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Set a parameter to a Java long value. The driver converts this to
|
||||
* a SQL BIGINT value when it sends it to the database.
|
||||
*
|
||||
@ -214,7 +214,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
|
||||
set(parameterIndex, Long.toString(x));
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Set a parameter to a Java float value. The driver converts this
|
||||
* to a SQL FLOAT value when it sends it to the database.
|
||||
*
|
||||
@ -227,7 +227,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
|
||||
set(parameterIndex, Float.toString(x));
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Set a parameter to a Java double value. The driver converts this
|
||||
* to a SQL DOUBLE value when it sends it to the database
|
||||
*
|
||||
@ -240,7 +240,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
|
||||
set(parameterIndex, Double.toString(x));
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Set a parameter to a java.lang.BigDecimal value. The driver
|
||||
* converts this to a SQL NUMERIC value when it sends it to the
|
||||
* database.
|
||||
@ -254,7 +254,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
|
||||
set(parameterIndex, x.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Set a parameter to a Java String value. The driver converts this
|
||||
* to a SQL VARCHAR or LONGVARCHAR value (depending on the arguments
|
||||
* size relative to the driver's limits on VARCHARs) when it sends it
|
||||
@ -292,7 +292,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Set a parameter to a Java array of bytes. The driver converts this
|
||||
* to a SQL VARBINARY or LONGVARBINARY (depending on the argument's
|
||||
* size relative to the driver's limits on VARBINARYs) when it sends
|
||||
@ -332,7 +332,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Set a parameter to a java.sql.Date value. The driver converts this
|
||||
* to a SQL DATE value when it sends it to the database.
|
||||
*
|
||||
@ -368,7 +368,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
|
||||
//set(parameterIndex, df.format(new java.util.Date(x.getTime()+86400000)));
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Set a parameter to a java.sql.Time value. The driver converts
|
||||
* this to a SQL TIME value when it sends it to the database.
|
||||
*
|
||||
@ -388,7 +388,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Set a parameter to a java.sql.Timestamp value. The driver converts
|
||||
* this to a SQL TIMESTAMP value when it sends it to the database.
|
||||
*
|
||||
@ -426,7 +426,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* When a very large ASCII value is input to a LONGVARCHAR parameter,
|
||||
* it may be more practical to send it via a java.io.InputStream.
|
||||
* JDBC will read the data from the stream as needed, until it reaches
|
||||
@ -476,7 +476,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* When a very large Unicode value is input to a LONGVARCHAR parameter,
|
||||
* it may be more practical to send it via a java.io.InputStream.
|
||||
* JDBC will read the data from the stream as needed, until it reaches
|
||||
@ -528,7 +528,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* When a very large binary value is input to a LONGVARBINARY parameter,
|
||||
* it may be more practical to send it via a java.io.InputStream.
|
||||
* JDBC will read the data from the stream as needed, until it reaches
|
||||
@ -607,7 +607,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* In general, parameter values remain in force for repeated used of a
|
||||
* Statement. Setting a parameter value automatically clears its
|
||||
* previous value. However, in coms cases, it is useful to immediately
|
||||
@ -624,7 +624,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
|
||||
inStrings[i] = null;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Set the value of a parameter using an object; use the java.lang
|
||||
* equivalent objects for integral values.
|
||||
*
|
||||
@ -707,7 +707,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
|
||||
setObject(parameterIndex, x, targetSqlType, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* This stores an Object into a parameter.
|
||||
* <p>New for 6.4, if the object is not recognised, but it is
|
||||
* Serializable, then the object is serialised using the
|
||||
@ -751,7 +751,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
|
||||
setSerialize(parameterIndex, connection.putObject(x), x.getClass().getName() );
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Some prepared statements return multiple results; the execute method
|
||||
* handles these complex statements as well as the simpler form of
|
||||
* statements handled by executeQuery and executeUpdate
|
||||
@ -765,7 +765,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
|
||||
return super.execute(compileQuery()); // in Statement class
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Returns the SQL statement with the current template values
|
||||
* substituted.
|
||||
* NB: This is identical to compileQuery() except instead of throwing
|
||||
@ -795,7 +795,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
|
||||
// END OF PUBLIC INTERFACE
|
||||
// **************************************************************
|
||||
|
||||
/**
|
||||
/*
|
||||
* There are a lot of setXXX classes which all basically do
|
||||
* the same thing. We need a method which actually does the
|
||||
* set for us.
|
||||
@ -811,7 +811,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
|
||||
inStrings[paramIndex - 1] = s;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Set a parameter to a tablerow-type oid reference.
|
||||
*
|
||||
* @param parameterIndex the first parameter is 1...
|
||||
@ -836,7 +836,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
|
||||
|
||||
// ** JDBC 2 Extensions **
|
||||
|
||||
/**
|
||||
/*
|
||||
* This parses the query and adds it to the current batch
|
||||
*/
|
||||
public void addBatch() throws SQLException
|
||||
@ -844,7 +844,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
|
||||
super.addBatch(compileQuery());
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Not sure what this one does, so I'm saying this returns the MetaData for
|
||||
* the last ResultSet returned!
|
||||
*/
|
||||
@ -863,7 +863,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
|
||||
setString(i, x.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Sets a Blob
|
||||
*/
|
||||
public void setBlob(int i, Blob x) throws SQLException
|
||||
@ -897,7 +897,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
|
||||
setInt(i, oid);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* This is similar to setBinaryStream except it uses a Reader instead of
|
||||
* InputStream.
|
||||
*/
|
||||
@ -956,7 +956,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* New in 7.1
|
||||
*/
|
||||
public void setClob(int i, Clob x) throws SQLException
|
||||
@ -990,7 +990,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
|
||||
setInt(i, oid);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* At least this works as in PostgreSQL null represents anything null ;-)
|
||||
*
|
||||
* New in 7,1
|
||||
@ -1005,7 +1005,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
|
||||
throw org.postgresql.Driver.notImplemented();
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* New in 7,1
|
||||
*/
|
||||
public void setDate(int i, java.sql.Date d, java.util.Calendar cal) throws SQLException
|
||||
@ -1019,7 +1019,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* New in 7,1
|
||||
*/
|
||||
public void setTime(int i, Time t, java.util.Calendar cal) throws SQLException
|
||||
@ -1033,7 +1033,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* New in 7,1
|
||||
*/
|
||||
public void setTimestamp(int i, Timestamp t, java.util.Calendar cal) throws SQLException
|
||||
|
@ -16,7 +16,7 @@ import org.postgresql.largeobject.*;
|
||||
import org.postgresql.util.*;
|
||||
import org.postgresql.core.Encoding;
|
||||
|
||||
/**
|
||||
/*
|
||||
* A ResultSet provides access to a table of data generated by executing a
|
||||
* Statement. The table rows are retrieved in sequence. Within a row its
|
||||
* column values can be accessed in any order.
|
||||
@ -63,7 +63,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
|
||||
|
||||
private StringBuffer sbuf = null;
|
||||
|
||||
/**
|
||||
/*
|
||||
* Create a new ResultSet - Note that we create ResultSets to
|
||||
* represent the results of everything.
|
||||
*
|
||||
@ -79,7 +79,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
|
||||
super(conn, fields, tuples, status, updateCount, insertOID, binaryCursor);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Create a new ResultSet - Note that we create ResultSets to
|
||||
* represent the results of everything.
|
||||
*
|
||||
@ -95,7 +95,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
|
||||
super(conn, fields, tuples, status, updateCount, 0, false);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* A ResultSet is initially positioned before its first row,
|
||||
* the first call to next makes the first row the current row;
|
||||
* the second call makes the second row the current row, etc.
|
||||
@ -116,7 +116,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* In some cases, it is desirable to immediately release a ResultSet
|
||||
* database and JDBC resources instead of waiting for this to happen
|
||||
* when it is automatically closed. The close method provides this
|
||||
@ -139,7 +139,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* A column may have the value of SQL NULL; wasNull() reports whether
|
||||
* the last column read had this special value. Note that you must
|
||||
* first call getXXX on a column to try to read its value and then
|
||||
@ -153,7 +153,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
|
||||
return wasNullFlag;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Get the value of a column in the current row as a Java String
|
||||
*
|
||||
* @param columnIndex the first column is 1, the second is 2...
|
||||
@ -173,7 +173,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
|
||||
return encoding.decode(this_row[columnIndex - 1]);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Get the value of a column in the current row as a Java boolean
|
||||
*
|
||||
* @param columnIndex the first column is 1, the second is 2...
|
||||
@ -185,7 +185,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
|
||||
return toBoolean( getString(columnIndex) );
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Get the value of a column in the current row as a Java byte.
|
||||
*
|
||||
* @param columnIndex the first column is 1, the second is 2,...
|
||||
@ -210,7 +210,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
|
||||
return 0; // SQL NULL
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Get the value of a column in the current row as a Java short.
|
||||
*
|
||||
* @param columnIndex the first column is 1, the second is 2,...
|
||||
@ -235,7 +235,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
|
||||
return 0; // SQL NULL
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Get the value of a column in the current row as a Java int.
|
||||
*
|
||||
* @param columnIndex the first column is 1, the second is 2,...
|
||||
@ -247,7 +247,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
|
||||
return toInt( getFixedString(columnIndex) );
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Get the value of a column in the current row as a Java long.
|
||||
*
|
||||
* @param columnIndex the first column is 1, the second is 2,...
|
||||
@ -259,7 +259,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
|
||||
return toLong( getFixedString(columnIndex) );
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Get the value of a column in the current row as a Java float.
|
||||
*
|
||||
* @param columnIndex the first column is 1, the second is 2,...
|
||||
@ -271,7 +271,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
|
||||
return toFloat( getFixedString(columnIndex) );
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Get the value of a column in the current row as a Java double.
|
||||
*
|
||||
* @param columnIndex the first column is 1, the second is 2,...
|
||||
@ -283,7 +283,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
|
||||
return toDouble( getFixedString(columnIndex) );
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Get the value of a column in the current row as a
|
||||
* java.math.BigDecimal object
|
||||
*
|
||||
@ -298,7 +298,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
|
||||
return toBigDecimal( getFixedString(columnIndex), scale );
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Get the value of a column in the current row as a Java byte array.
|
||||
*
|
||||
* <p>In normal use, the bytes represent the raw values returned by the
|
||||
@ -359,7 +359,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Get the value of a column in the current row as a java.sql.Date
|
||||
* object
|
||||
*
|
||||
@ -372,7 +372,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
|
||||
return toDate( getString(columnIndex) );
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Get the value of a column in the current row as a java.sql.Time
|
||||
* object
|
||||
*
|
||||
@ -385,7 +385,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
|
||||
return toTime( getString(columnIndex) );
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Get the value of a column in the current row as a
|
||||
* java.sql.Timestamp object
|
||||
*
|
||||
@ -398,7 +398,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
|
||||
return toTimestamp( getString(columnIndex), this );
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* A column value can be retrieved as a stream of ASCII characters
|
||||
* and then read in chunks from the stream. This method is
|
||||
* particular suitable for retrieving large LONGVARCHAR values.
|
||||
@ -452,7 +452,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* A column value can also be retrieved as a stream of Unicode
|
||||
* characters. We implement this as a binary stream.
|
||||
*
|
||||
@ -497,7 +497,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* A column value can also be retrieved as a binary strea. This
|
||||
* method is suitable for retrieving LONGVARBINARY values.
|
||||
*
|
||||
@ -540,7 +540,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* The following routines simply convert the columnName into
|
||||
* a columnIndex and then call the appropriate routine above.
|
||||
*
|
||||
@ -589,7 +589,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
|
||||
return getDouble(findColumn(columnName));
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* @deprecated
|
||||
*/
|
||||
public BigDecimal getBigDecimal(String columnName, int scale) throws SQLException
|
||||
@ -622,7 +622,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
|
||||
return getAsciiStream(findColumn(columnName));
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
*
|
||||
* ** DEPRECATED IN JDBC 2 **
|
||||
*
|
||||
@ -638,7 +638,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
|
||||
return getBinaryStream(findColumn(columnName));
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* The first warning reported by calls on this ResultSet is
|
||||
* returned. Subsequent ResultSet warnings will be chained
|
||||
* to this SQLWarning.
|
||||
@ -659,7 +659,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
|
||||
return warnings;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* After this call, getWarnings returns null until a new warning
|
||||
* is reported for this ResultSet
|
||||
*
|
||||
@ -670,7 +670,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
|
||||
warnings = null;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Get the name of the SQL cursor used by this ResultSet
|
||||
*
|
||||
* <p>In SQL, a result table is retrieved though a cursor that is
|
||||
@ -693,7 +693,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
|
||||
return connection.getCursorName();
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* The numbers, types and properties of a ResultSet's columns are
|
||||
* provided by the getMetaData method
|
||||
*
|
||||
@ -705,7 +705,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
|
||||
return new ResultSetMetaData(rows, fields);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Get the value of a column in the current row as a Java object
|
||||
*
|
||||
* <p>This method will return the value of the given column as a
|
||||
@ -783,7 +783,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Get the value of a column in the current row as a Java object
|
||||
*
|
||||
*<p> This method will return the value of the given column as a
|
||||
@ -803,7 +803,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
|
||||
return getObject(findColumn(columnName));
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Map a ResultSet column name to a ResultSet column index
|
||||
*
|
||||
* @param columnName the name of the column
|
||||
@ -964,7 +964,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* New in 7.1
|
||||
*/
|
||||
public Clob getClob(String columnName) throws SQLException
|
||||
@ -972,7 +972,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
|
||||
return getClob(findColumn(columnName));
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* New in 7.1
|
||||
*/
|
||||
public Clob getClob(int i) throws SQLException
|
||||
@ -1046,7 +1046,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
|
||||
return getObject(findColumn(columnName), map);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* This checks against map for the type of column i, and if found returns
|
||||
* an object based on that mapping. The class must implement the SQLData
|
||||
* interface.
|
||||
@ -1058,7 +1058,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
|
||||
String t = getTypeName(i);
|
||||
SQLData o = (SQLData) map.get(t);
|
||||
// If the type is not in the map, then pass to the existing code
|
||||
if(o==null)
|
||||
if (o==null)
|
||||
return getObject(i);
|
||||
o.readSQL(s,t);
|
||||
return o;
|
||||
@ -1446,7 +1446,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
|
||||
throw new PSQLException("postgresql.noupdate");
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* This is called by Statement to register itself with this statement.
|
||||
* It's used currently by getStatement() but may also with the new core
|
||||
* package.
|
||||
|
@ -11,7 +11,7 @@ import java.util.*;
|
||||
import org.postgresql.*;
|
||||
import org.postgresql.util.*;
|
||||
|
||||
/**
|
||||
/*
|
||||
* A ResultSetMetaData object can be used to find out about the types and
|
||||
* properties of the columns in a ResultSet
|
||||
*
|
||||
@ -22,7 +22,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
|
||||
Vector rows;
|
||||
Field[] fields;
|
||||
|
||||
/**
|
||||
/*
|
||||
* Initialise for a result with a tuple set and
|
||||
* a field descriptor set
|
||||
*
|
||||
@ -35,7 +35,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
|
||||
this.fields = fields;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Whats the number of columns in the ResultSet?
|
||||
*
|
||||
* @return the number
|
||||
@ -46,7 +46,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
|
||||
return fields.length;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Is the column automatically numbered (and thus read-only)
|
||||
* I believe that PostgreSQL does not support this feature.
|
||||
*
|
||||
@ -59,7 +59,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Does a column's case matter? ASSUMPTION: Any field that is
|
||||
* not obviously case insensitive is assumed to be case sensitive
|
||||
*
|
||||
@ -87,7 +87,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Can the column be used in a WHERE clause? Basically for
|
||||
* this, I split the functions into two types: recognised
|
||||
* types (which are always useable), and OTHER types (which
|
||||
@ -114,7 +114,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Is the column a cash value? 6.1 introduced the cash/money
|
||||
* type, which haven't been incorporated as of 970414, so I
|
||||
* just check the type name for both 'cash' and 'money'
|
||||
@ -130,7 +130,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
|
||||
return type_name.equals("cash") || type_name.equals("money");
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Indicates the nullability of values in the designated column.
|
||||
*
|
||||
* @param column the first column is 1, the second is 2...
|
||||
@ -147,7 +147,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
|
||||
return columnNullableUnknown;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Is the column a signed number? In PostgreSQL, all numbers
|
||||
* are signed, so this is trivial. However, strings are not
|
||||
* signed (duh!)
|
||||
@ -177,7 +177,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* What is the column's normal maximum width in characters?
|
||||
*
|
||||
* @param column the first column is 1, the second is 2, etc.
|
||||
@ -233,7 +233,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
|
||||
return f.getLength();
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* What is the suggested column title for use in printouts and
|
||||
* displays? We suggest the ColumnName!
|
||||
*
|
||||
@ -246,7 +246,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
|
||||
return getColumnName(column);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* What's a column's name?
|
||||
*
|
||||
* @param column the first column is 1, the second is 2, etc.
|
||||
@ -261,7 +261,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
|
||||
return "field" + column;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* What is a column's table's schema? This relies on us knowing
|
||||
* the table name....which I don't know how to do as yet. The
|
||||
* JDBC specification allows us to return "" if this is not
|
||||
@ -276,7 +276,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* What is a column's number of decimal digits.
|
||||
*
|
||||
* @param column the first column is 1, the second is 2...
|
||||
@ -312,7 +312,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* What is a column's number of digits to the right of the
|
||||
* decimal point?
|
||||
*
|
||||
@ -349,7 +349,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Whats a column's table's name? How do I find this out? Both
|
||||
* getSchemaName() and getCatalogName() rely on knowing the table
|
||||
* Name, so we need this before we can work on them.
|
||||
@ -363,7 +363,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* What's a column's table's catalog name? As with getSchemaName(),
|
||||
* we can say that if getTableName() returns n/a, then we can too -
|
||||
* otherwise, we need to work on it.
|
||||
@ -377,7 +377,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* What is a column's SQL Type? (java.sql.Type int)
|
||||
*
|
||||
* @param column the first column is 1, the second is 2, etc.
|
||||
@ -391,7 +391,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
|
||||
return getField(column).getSQLType();
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Whats is the column's data source specific type name?
|
||||
*
|
||||
* @param column the first column is 1, the second is 2, etc.
|
||||
@ -403,7 +403,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
|
||||
return getField(column).getPGType();
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Is the column definitely not writable? In reality, we would
|
||||
* have to check the GRANT/REVOKE stuff for this to be effective,
|
||||
* and I haven't really looked into that yet, so this will get
|
||||
@ -418,7 +418,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Is it possible for a write on the column to succeed? Again, we
|
||||
* would in reality have to check the GRANT/REVOKE stuff, which
|
||||
* I haven't worked with as yet. However, if it isn't ReadOnly, then
|
||||
@ -433,7 +433,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
|
||||
return !isReadOnly(column);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Will a write on this column definately succeed? Hmmm...this
|
||||
* is a bad one, since the two preceding functions have not been
|
||||
* really defined. I cannot tell is the short answer. I thus
|
||||
@ -452,7 +452,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
|
||||
// END OF PUBLIC INTERFACE
|
||||
// ********************************************************
|
||||
|
||||
/**
|
||||
/*
|
||||
* For several routines in this package, we need to convert
|
||||
* a columnIndex into a Field[] descriptor. Rather than do
|
||||
* the same code several times, here it is.
|
||||
|
@ -9,7 +9,7 @@ import java.sql.*;
|
||||
import java.util.Vector;
|
||||
import org.postgresql.util.*;
|
||||
|
||||
/**
|
||||
/*
|
||||
* A Statement object is used for executing a static SQL statement and
|
||||
* obtaining the results produced by it.
|
||||
*
|
||||
@ -29,7 +29,7 @@ public class Statement extends org.postgresql.Statement implements java.sql.Stat
|
||||
private int resultsettype; // the resultset type to return
|
||||
private int concurrency; // is it updateable or not?
|
||||
|
||||
/**
|
||||
/*
|
||||
* Constructor for a Statement. It simply sets the connection
|
||||
* that created us.
|
||||
*
|
||||
@ -42,7 +42,7 @@ public class Statement extends org.postgresql.Statement implements java.sql.Stat
|
||||
concurrency = java.sql.ResultSet.CONCUR_READ_ONLY;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Execute a SQL statement that retruns a single ResultSet
|
||||
*
|
||||
* @param sql typically a static SQL SELECT statement
|
||||
@ -59,7 +59,7 @@ public class Statement extends org.postgresql.Statement implements java.sql.Stat
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Execute a SQL INSERT, UPDATE or DELETE statement. In addition
|
||||
* SQL statements that return nothing such as SQL DDL statements
|
||||
* can be executed
|
||||
@ -76,7 +76,7 @@ public class Statement extends org.postgresql.Statement implements java.sql.Stat
|
||||
return this.getUpdateCount();
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* setCursorName defines the SQL cursor name that will be used by
|
||||
* subsequent execute methods. This name can then be used in SQL
|
||||
* positioned update/delete statements to identify the current row
|
||||
@ -100,7 +100,7 @@ public class Statement extends org.postgresql.Statement implements java.sql.Stat
|
||||
connection.setCursorName(name);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Execute a SQL statement that may return multiple results. We
|
||||
* don't have to worry about this since we do not support multiple
|
||||
* ResultSets. You can use getResultSet or getUpdateCount to
|
||||
@ -135,7 +135,7 @@ public class Statement extends org.postgresql.Statement implements java.sql.Stat
|
||||
return (result != null && ((org.postgresql.ResultSet)result).reallyResultSet());
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* getUpdateCount returns the current result as an update count,
|
||||
* if the result is a ResultSet or there are no more results, -1
|
||||
* is returned. It should only be called once per result.
|
||||
@ -152,7 +152,7 @@ public class Statement extends org.postgresql.Statement implements java.sql.Stat
|
||||
return ((org.postgresql.ResultSet)result).getResultCount();
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* getMoreResults moves to a Statement's next result. If it returns
|
||||
* true, this result is a ResulSet.
|
||||
*
|
||||
@ -249,7 +249,7 @@ public class Statement extends org.postgresql.Statement implements java.sql.Stat
|
||||
throw org.postgresql.Driver.notImplemented();
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* New in 7.1
|
||||
*/
|
||||
public void setResultSetConcurrency(int value) throws SQLException
|
||||
@ -257,7 +257,7 @@ public class Statement extends org.postgresql.Statement implements java.sql.Stat
|
||||
concurrency = value;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* New in 7.1
|
||||
*/
|
||||
public void setResultSetType(int value) throws SQLException
|
||||
|
@ -21,7 +21,7 @@ import org.postgresql.Field;
|
||||
import org.postgresql.largeobject.*;
|
||||
import org.postgresql.util.*;
|
||||
|
||||
/**
|
||||
/*
|
||||
* @see ResultSet
|
||||
* @see ResultSetMetaData
|
||||
* @see java.sql.ResultSet
|
||||
@ -29,7 +29,7 @@ import org.postgresql.util.*;
|
||||
public class UpdateableResultSet extends org.postgresql.jdbc2.ResultSet
|
||||
{
|
||||
|
||||
/**
|
||||
/*
|
||||
* Create a new ResultSet - Note that we create ResultSets to
|
||||
* represent the results of everything.
|
||||
*
|
||||
@ -45,7 +45,7 @@ public class UpdateableResultSet extends org.postgresql.jdbc2.ResultSet
|
||||
super(conn, fields, tuples, status, updateCount, insertOID, binaryCursor);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Create a new ResultSet - Note that we create ResultSets to
|
||||
* represent the results of everything.
|
||||
*
|
||||
|
Reference in New Issue
Block a user