org.apache.derby.impl.load
Class ColumnInfo
java.lang.Object
org.apache.derby.impl.load.ColumnInfo
- class ColumnInfo
- extends java.lang.Object
This class provides supportto create casting/conversions required to
perform import. Import VTI gives all the data in VARCHAR type becuase data
in the files is in CHAR format. There is no implicit cast availabile from
VARCHAR to some of the types. In cases where explicit casting is allowed,
columns are casted with explict cast to the type of table column; in case of
double/real explicit casting is also not allowd , scalar fuction DOUBLE is
used in those cases.
- Author:
- suresht
Constructor Summary |
ColumnInfo(java.sql.Connection conn,
java.lang.String sName,
java.lang.String tName,
java.lang.String insertColumnList,
java.lang.String vtiColumnIndexes,
java.lang.String vtiColumnPrefix)
Initialize the column type and name information |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
vtiColumnNames
private java.util.ArrayList vtiColumnNames
insertColumnNames
private java.util.ArrayList insertColumnNames
columnTypes
private java.util.ArrayList columnTypes
noOfColumns
private int noOfColumns
columnPositions
private java.util.ArrayList columnPositions
createolumnNames
private boolean createolumnNames
expectedNumberOfCols
private int expectedNumberOfCols
conn
private java.sql.Connection conn
tableName
private java.lang.String tableName
schemaName
private java.lang.String schemaName
ColumnInfo
public ColumnInfo(java.sql.Connection conn,
java.lang.String sName,
java.lang.String tName,
java.lang.String insertColumnList,
java.lang.String vtiColumnIndexes,
java.lang.String vtiColumnPrefix)
throws java.sql.SQLException
- Initialize the column type and name information
- Parameters:
conn
- - connection to use for metadata queriessName
- - table's schematName
- - table NamevtiColumnPrefix
- - Prefix to use to generate column names to select from VTI
- Throws:
java.lang.Exception
- on error
java.sql.SQLException
initializeColumnInfo
private boolean initializeColumnInfo(java.lang.String columnPattern)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
importExportSupportedType
public static final boolean importExportSupportedType(int type)
getTypeOption
private java.lang.String getTypeOption(java.lang.String type,
int length,
int precision,
int scale)
getColumnNamesWithCasts
public java.lang.String getColumnNamesWithCasts()
getInsertColumnNames
public java.lang.String getInsertColumnNames()
getExpectedNumberOfColumnsInFile
public int getExpectedNumberOfColumnsInFile()
tableExists
private boolean tableExists()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
Apache Derby V10.0 Engine Documentation - Copyright © 1997,2004 The Apache Software Foundation or its licensors, as applicable.