1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

JDBC indenting, comment cleanups.

This commit is contained in:
Bruce Momjian
2001-11-19 22:33:39 +00:00
parent 8f6f16929a
commit f3148bef9f
75 changed files with 1909 additions and 1864 deletions

View File

@ -8,7 +8,7 @@ package org.postgresql.jdbc1;
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 PreparedStatement implements java.sql.CallableStatement
{
/**
/*
* @exception SQLException on failure
*/
CallableStatement(Connection c, String q) throws SQLException
@ -49,7 +49,7 @@ public class CallableStatement extends PreparedStatement implements java.sql.Cal
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 PreparedStatement implements java.sql.Cal
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 PreparedStatement implements java.sql.Cal
//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 PreparedStatement implements java.sql.Cal
//return null;
//}
/**
/*
* Get the value of a CHAR, VARCHAR, or LONGVARCHAR parameter as a
* Java String.
*
@ -129,7 +129,7 @@ public class CallableStatement extends PreparedStatement implements java.sql.Cal
//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 PreparedStatement implements java.sql.Cal
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 PreparedStatement implements java.sql.Cal
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 PreparedStatement implements java.sql.Cal
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 PreparedStatement implements java.sql.Cal
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 PreparedStatement implements java.sql.Cal
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 PreparedStatement implements java.sql.Cal
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 PreparedStatement implements java.sql.Cal
return 0.0;
}
/**
/*
* Get the value of a NUMERIC parameter as a java.math.BigDecimal
* object.
*
@ -229,7 +229,7 @@ public class CallableStatement extends PreparedStatement implements java.sql.Cal
return null;
}
/**
/*
* Get the value of a SQL BINARY or VARBINARY parameter as a Java
* byte[]
*
@ -247,7 +247,7 @@ public class CallableStatement extends PreparedStatement implements java.sql.Cal
//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,...
@ -259,7 +259,7 @@ public class CallableStatement extends PreparedStatement implements java.sql.Cal
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,...
@ -271,7 +271,7 @@ public class CallableStatement extends PreparedStatement implements java.sql.Cal
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,...
@ -295,7 +295,7 @@ public class CallableStatement extends PreparedStatement implements java.sql.Cal
// 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

View File

@ -16,8 +16,8 @@ import org.postgresql.fastpath.*;
import org.postgresql.largeobject.*;
import org.postgresql.util.*;
/**
* $Id: Connection.java,v 1.12 2001/10/25 05:59:59 momjian Exp $
/*
* $Id: Connection.java,v 1.13 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,7 +39,7 @@ 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;
/**
/*
* 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
@ -52,7 +52,7 @@ public class Connection extends org.postgresql.Connection implements java.sql.Co
return new Statement(this);
}
/**
/*
* 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.
@ -75,7 +75,7 @@ public class Connection extends org.postgresql.Connection implements java.sql.Co
return new PreparedStatement(this, sql);
}
/**
/*
* 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
@ -100,7 +100,7 @@ public class Connection extends org.postgresql.Connection implements java.sql.Co
// return new CallableStatement(this, sql);
}
/**
/*
* Tests to see if a Connection is closed
*
* @return the status of the connection
@ -111,7 +111,7 @@ public class Connection extends org.postgresql.Connection implements java.sql.Co
return (pg_stream == null);
}
/**
/*
* 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
@ -127,7 +127,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.
*/
@ -157,7 +157,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
@ -183,7 +183,7 @@ public class Connection extends org.postgresql.Connection implements java.sql.Co
"abstime", "timestamp"
};
/**
/*
* This table holds the JDBC type for each entry above.
*
* Note: This must be in the same order as above

View File

@ -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.
@ -36,7 +36,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
String[] inStrings;
Connection connection;
/**
/*
* 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
@ -78,7 +78,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
@ -101,7 +101,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
return super.executeQuery(s.toString()); // 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.
@ -126,7 +126,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
return super.executeUpdate(s.toString()); // in Statement class
}
/**
/*
* Set a parameter to SQL NULL
*
* <p><B>Note:</B> You must specify the parameters SQL type (although
@ -141,7 +141,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.
*
@ -154,7 +154,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.
*
@ -167,7 +167,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.
*
@ -180,7 +180,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.
*
@ -193,7 +193,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.
*
@ -206,7 +206,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.
*
@ -219,7 +219,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
*
@ -232,7 +232,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.
@ -246,7 +246,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
@ -279,7 +279,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
@ -319,7 +319,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.
*
@ -350,7 +350,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.
*
@ -370,7 +370,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.
*
@ -394,7 +394,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
@ -444,7 +444,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
@ -493,7 +493,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
@ -572,7 +572,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
@ -589,7 +589,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.
*
@ -672,7 +672,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
@ -715,7 +715,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
setLong(parameterIndex, connection.putObject(x));
}
/**
/*
* 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
@ -740,7 +740,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
return super.execute(s.toString()); // in Statement class
}
/**
/*
* Returns the SQL statement with the current template values
* substituted.
*/
@ -765,7 +765,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.

View File

@ -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.
@ -59,7 +59,7 @@ import org.postgresql.core.Encoding;
*/
public class ResultSet extends org.postgresql.ResultSet implements java.sql.ResultSet
{
/**
/*
* Create a new ResultSet - Note that we create ResultSets to
* represent the results of everything.
*
@ -75,7 +75,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.
*
@ -91,7 +91,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.
@ -112,7 +112,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
@ -132,7 +132,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
rows.setSize(0);
}
/**
/*
* 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
@ -146,7 +146,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...
@ -166,7 +166,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 false; // SQL NULL
}
/**
/*
* 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,...
@ -260,7 +260,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 long.
*
* @param columnIndex the first column is 1, the second is 2,...
@ -285,7 +285,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 float.
*
* @param columnIndex the first column is 1, the second is 2,...
@ -310,7 +310,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 double.
*
* @param columnIndex the first column is 1, the second is 2,...
@ -335,7 +335,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.math.BigDecimal object
*
@ -371,7 +371,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
return null; // SQL NULL
}
/**
/*
* 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
@ -432,7 +432,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
*
@ -454,7 +454,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.sql.Time
* object
*
@ -485,7 +485,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
return null; // SQL NULL
}
/**
/*
* Get the value of a column in the current row as a
* java.sql.Timestamp object
*
@ -599,7 +599,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
}
}
/**
/*
* 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.
@ -653,7 +653,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.
*
@ -695,7 +695,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.
*
@ -738,7 +738,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.
*
@ -827,7 +827,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.
@ -848,7 +848,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
*
@ -859,7 +859,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
@ -882,7 +882,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
*
@ -894,7 +894,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
@ -966,7 +966,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
@ -986,7 +986,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

View File

@ -16,7 +16,7 @@ import org.postgresql.util.*;
import java.sql.SQLException;
import java.sql.Types;
/**
/*
* A ResultSetMetaData object can be used to find out about the types and
* properties of the columns in a ResultSet
*
@ -27,7 +27,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
*
@ -40,7 +40,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
this.fields = fields;
}
/**
/*
* Whats the number of columns in the ResultSet?
*
* @return the number
@ -51,7 +51,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.
*
@ -64,7 +64,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
*
@ -92,7 +92,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
@ -119,7 +119,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'
@ -135,7 +135,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...
@ -152,7 +152,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!)
@ -182,7 +182,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.
@ -238,7 +238,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!
*
@ -251,7 +251,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.
@ -266,7 +266,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
@ -281,7 +281,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...
@ -317,7 +317,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
}
}
/**
/*
* What is a column's number of digits to the right of the
* decimal point?
*
@ -354,7 +354,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.
@ -368,7 +368,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.
@ -382,7 +382,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.
@ -396,7 +396,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.
@ -408,7 +408,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
@ -423,7 +423,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
@ -438,7 +438,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
@ -457,7 +457,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.

View File

@ -9,7 +9,7 @@ import java.sql.*;
import org.postgresql.util.PSQLException;
/**
/*
* A Statement object is used for executing a static SQL statement and
* obtaining the results produced by it.
*
@ -26,7 +26,7 @@ public class Statement extends org.postgresql.Statement implements java.sql.Stat
{
private Connection connection; // The connection who created us
/**
/*
* Constructor for a Statement. It simply sets the connection
* that created us.
*
@ -37,7 +37,7 @@ public class Statement extends org.postgresql.Statement implements java.sql.Stat
connection = c;
}
/**
/*
* Execute a SQL statement that retruns a single ResultSet
*
* @param sql typically a static SQL SELECT statement
@ -54,7 +54,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
@ -71,7 +71,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
@ -95,7 +95,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
@ -114,7 +114,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.
@ -131,7 +131,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.
*