mirror of
https://github.com/postgres/postgres.git
synced 2025-08-27 07:42:10 +03:00
Run pgjindent for Java folks.
This commit is contained in:
@@ -19,7 +19,7 @@ public abstract class AbstractJdbc2ResultSetMetaData extends org.postgresql.jdbc
|
||||
*/
|
||||
public AbstractJdbc2ResultSetMetaData(Vector rows, Field[] fields)
|
||||
{
|
||||
super(rows, fields);
|
||||
super(rows, fields);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -459,53 +459,53 @@ public abstract class AbstractJdbc2ResultSetMetaData extends org.postgresql.jdbc
|
||||
|
||||
// This can hook into our PG_Object mechanism
|
||||
/**
|
||||
* Returns the fully-qualified name of the Java class whose instances
|
||||
* Returns the fully-qualified name of the Java class whose instances
|
||||
* are manufactured if the method <code>ResultSet.getObject</code>
|
||||
* is called to retrieve a value from the column.
|
||||
*
|
||||
*
|
||||
* <code>ResultSet.getObject</code> may return a subclass of the class
|
||||
* returned by this method.
|
||||
*
|
||||
* @param column the first column is 1, the second is 2, ...
|
||||
* @return the fully-qualified name of the class in the Java programming
|
||||
* language that would be used by the method
|
||||
* <code>ResultSet.getObject</code> to retrieve the value in the specified
|
||||
* column. This is the class name used for custom mapping.
|
||||
* language that would be used by the method
|
||||
* <code>ResultSet.getObject</code> to retrieve the value in the specified
|
||||
* column. This is the class name used for custom mapping.
|
||||
* @exception SQLException if a database access error occurs
|
||||
*/
|
||||
public String getColumnClassName(int column) throws SQLException
|
||||
{
|
||||
/*
|
||||
The following data type mapping came from ../Field.java.
|
||||
/*
|
||||
The following data type mapping came from ../Field.java.
|
||||
|
||||
"int2",
|
||||
"int4","oid",
|
||||
"int8",
|
||||
"cash","money",
|
||||
"numeric",
|
||||
"float4",
|
||||
"float8",
|
||||
"bpchar","char","char2","char4","char8","char16",
|
||||
"varchar","text","name","filename",
|
||||
"bool",
|
||||
"date",
|
||||
"time",
|
||||
"abstime","timestamp"
|
||||
"int2",
|
||||
"int4","oid",
|
||||
"int8",
|
||||
"cash","money",
|
||||
"numeric",
|
||||
"float4",
|
||||
"float8",
|
||||
"bpchar","char","char2","char4","char8","char16",
|
||||
"varchar","text","name","filename",
|
||||
"bool",
|
||||
"date",
|
||||
"time",
|
||||
"abstime","timestamp"
|
||||
|
||||
Types.SMALLINT,
|
||||
Types.INTEGER,Types.INTEGER,
|
||||
Types.BIGINT,
|
||||
Types.DOUBLE,Types.DOUBLE,
|
||||
Types.NUMERIC,
|
||||
Types.REAL,
|
||||
Types.DOUBLE,
|
||||
Types.CHAR,Types.CHAR,Types.CHAR,Types.CHAR,Types.CHAR,Types.CHAR,
|
||||
Types.VARCHAR,Types.VARCHAR,Types.VARCHAR,Types.VARCHAR,
|
||||
Types.BIT,
|
||||
Types.DATE,
|
||||
Types.TIME,
|
||||
Types.TIMESTAMP,Types.TIMESTAMP
|
||||
*/
|
||||
Types.SMALLINT,
|
||||
Types.INTEGER,Types.INTEGER,
|
||||
Types.BIGINT,
|
||||
Types.DOUBLE,Types.DOUBLE,
|
||||
Types.NUMERIC,
|
||||
Types.REAL,
|
||||
Types.DOUBLE,
|
||||
Types.CHAR,Types.CHAR,Types.CHAR,Types.CHAR,Types.CHAR,Types.CHAR,
|
||||
Types.VARCHAR,Types.VARCHAR,Types.VARCHAR,Types.VARCHAR,
|
||||
Types.BIT,
|
||||
Types.DATE,
|
||||
Types.TIME,
|
||||
Types.TIMESTAMP,Types.TIMESTAMP
|
||||
*/
|
||||
|
||||
Field field = getField(column);
|
||||
int sql_type = field.getSQLType();
|
||||
@@ -513,40 +513,40 @@ public abstract class AbstractJdbc2ResultSetMetaData extends org.postgresql.jdbc
|
||||
switch (sql_type)
|
||||
{
|
||||
case Types.BIT:
|
||||
return("java.lang.Boolean");
|
||||
return ("java.lang.Boolean");
|
||||
case Types.SMALLINT:
|
||||
return("java.lang.Short");
|
||||
return ("java.lang.Short");
|
||||
case Types.INTEGER:
|
||||
return("java.lang.Integer");
|
||||
return ("java.lang.Integer");
|
||||
case Types.BIGINT:
|
||||
return("java.lang.Long");
|
||||
return ("java.lang.Long");
|
||||
case Types.NUMERIC:
|
||||
return("java.math.BigDecimal");
|
||||
return ("java.math.BigDecimal");
|
||||
case Types.REAL:
|
||||
return("java.lang.Float");
|
||||
return ("java.lang.Float");
|
||||
case Types.DOUBLE:
|
||||
return("java.lang.Double");
|
||||
return ("java.lang.Double");
|
||||
case Types.CHAR:
|
||||
case Types.VARCHAR:
|
||||
return("java.lang.String");
|
||||
return ("java.lang.String");
|
||||
case Types.DATE:
|
||||
return("java.sql.Date");
|
||||
return ("java.sql.Date");
|
||||
case Types.TIME:
|
||||
return("java.sql.Time");
|
||||
return ("java.sql.Time");
|
||||
case Types.TIMESTAMP:
|
||||
return("java.sql.Timestamp");
|
||||
return ("java.sql.Timestamp");
|
||||
case Types.BINARY:
|
||||
case Types.VARBINARY:
|
||||
return("[B");
|
||||
return ("[B");
|
||||
case Types.ARRAY:
|
||||
return("java.sql.Array");
|
||||
return ("java.sql.Array");
|
||||
default:
|
||||
String type = field.getPGType();
|
||||
if ("unknown".equals(type))
|
||||
{
|
||||
return("java.lang.String");
|
||||
return ("java.lang.String");
|
||||
}
|
||||
return("java.lang.Object");
|
||||
return ("java.lang.Object");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user