| Modifier and Type | Field and Description |
|---|---|
| private static int | |
| private static Hashtable | |
| private String | |
| private static short |
| Access | Constructor and Description |
|---|---|
| public | Import(String
The URL of the ASCII file from which import will happen inputFileName, String columnDelimiter, String characterDelimiter, String codeset, int noOfColumnsExpected, String columnTypes, boolean lobsInExtFile, int importCounter, String columnTypeNames, String udtClassNamesString)Constructor to Invoke Import from a select statement |
| Modifier and Type | Method and Description |
|---|---|
| private static synchronized int | |
| private void | |
| private static SQLException | |
| pack-priv ImportReadData | getImportReadData()
Implements abstract org. virtual method from the abstract class |
| public static void | importData(Connection
The Derby database connection URL for the database containing the table connection, String The name of the schema where table to import exists schemaName, String Name of the Table the data has to be imported to. tableName, String Comma Seperated column name list to which data
has to be imported from file.eg: 'c2,c2,'c3'. insertColumnList, String Comma sepearted Lit Index of the columns in the file(first column
starts at 1). eg: '3 ,4 , 5' columnIndexes, String Name of the file from which data has to be imported. inputFileName, String Delimiter that seperates columns in the file columnDelimiter, String Delimiter that is used to quiote non-numeric types characterDelimiter, String Codeset of the data in the file codeset, short Indicates whether the data in table has to be replaced or
appended.(0 - append , > 0 Replace the data) replace, boolean true, if the lobs data is stored in an external file,
and the reference is stored in the main import file. lobsInExtFile, short... extraArgs)SYSCS_IMPORT_DATA system Procedure from ij or from a Java application invokes this method to perform import to a table from a file. |
| public static void | importTable(Connection
The Derby database connection URL for the database containing the table connection, String The name of the schema where table to import exists schemaName, String Name of the Table the data has to be imported to. tableName, String Name of the file from which data has to be imported. inputFileName, String Delimiter that seperates columns in the file columnDelimiter, String Delimiter that is used to quiote non-numeric types characterDelimiter, String Codeset of the data in the file codeset, short Indicates whether the data in table has to be replaced or
appended.(0 - append , > 0 Replace the data) replace, boolean true, if the lobs data is stored in an external file,
and the reference to it is stored in the main import file. lobsInExtFile, short... extraArgs)SYSCS_IMPORT_TABLE system Procedure from ij or from a Java application invokes this method to perform import to a table from a file. |
| private static void | performImport(Connection connection, String schemaName, String insertColumnList, String columnIndexes, String tableName, String inputFileName, String columnDelimiter, String characterDelimiter, String codeset, short replace, boolean lobsInExtFile)
|
| private static String | Returns: the string in quotes and with proper escape sequences for special characters, or "NULL" if the string isnulla string or string)nullQuote a string argument so that it can be used as a literal in an SQL statement. |
| private static String[] | readHeaders(String inputFileName, String characterDelimiter, String columnDelimiter, String codeset)
|
| _importCounter | back to summary |
|---|---|
| private static int _importCounter | |
| _importers | back to summary |
|---|---|
| private static Hashtable<Integer, Import> _importers | |
| inputFileName | back to summary |
|---|---|
| private String inputFileName | |
| skip | back to summary |
|---|---|
| private static short skip | |
| Import | back to summary |
|---|---|
| public Import(String inputFileName, String columnDelimiter, String characterDelimiter, String codeset, int noOfColumnsExpected, String columnTypes, boolean lobsInExtFile, int importCounter, String columnTypeNames, String udtClassNamesString) throws SQLException Constructor to Invoke Import from a select statement
| |
| bumpImportCounter | back to summary |
|---|---|
| private static synchronized int bumpImportCounter() | |
| doImport | back to summary |
|---|---|
| private void doImport() throws Exception | |
| formatImportError | back to summary |
|---|---|
| private static SQLException formatImportError(Import importer, String inputFile, Throwable t) | |
| getImportReadData | back to summary |
|---|---|
| pack-priv ImportReadData getImportReadData() throws Exception Implements abstract org. virtual method from the abstract class
| |
| importData | back to summary |
|---|---|
| public static void importData(Connection connection, String schemaName, String tableName, String insertColumnList, String columnIndexes, String inputFileName, String columnDelimiter, String characterDelimiter, String codeset, short replace, boolean lobsInExtFile, short... extraArgs) throws SQLException SYSCS_IMPORT_DATA system Procedure from ij or from a Java application invokes this method to perform import to a table from a file.
| |
| importTable | back to summary |
|---|---|
| public static void importTable(Connection connection, String schemaName, String tableName, String inputFileName, String columnDelimiter, String characterDelimiter, String codeset, short replace, boolean lobsInExtFile, short... extraArgs) throws SQLException SYSCS_IMPORT_TABLE system Procedure from ij or from a Java application invokes this method to perform import to a table from a file. The extraArgs parameter is variadic, and is used when this method is called from SYSCS_IMPORT_TABLE_BULK, in which case extraArgs[0] specifies the number of header lines to skip.
| |
| performImport | back to summary |
|---|---|
| private static void performImport(Connection connection, String schemaName, String insertColumnList, String columnIndexes, String tableName, String inputFileName, String columnDelimiter, String characterDelimiter, String codeset, short replace, boolean lobsInExtFile) throws SQLException | |
| quoteStringArgument | back to summary |
|---|---|
| private static String quoteStringArgument(String string) Quote a string argument so that it can be used as a literal in an
SQL statement. If the string argument is | |
| readHeaders | back to summary |
|---|---|
| private static String[] readHeaders(String inputFileName, String characterDelimiter, String columnDelimiter, String codeset) throws SQLException | |