ISQLServerBulkRecordpublic class SQLServerBulkBatchInsertRecord extends Object
| Modifier and Type | Field | Description |
|---|---|---|
protected Map<Integer,com.microsoft.sqlserver.jdbc.SQLServerBulkCommon.ColumnMetadata> |
columnMetadata |
|
protected String[] |
columnNames |
|
protected DateTimeFormatter |
dateTimeFormatter |
|
protected DateTimeFormatter |
timeFormatter |
| Constructor | Description |
|---|---|
SQLServerBulkBatchInsertRecord(ArrayList<com.microsoft.sqlserver.jdbc.Parameter[]> batchParam,
ArrayList<String> columnList,
ArrayList<String> valueList,
String encoding) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addColumnMetadata(int positionInSource,
String name,
int jdbcType,
int precision,
int scale) |
Adds metadata for the given column in the file.
|
void |
addColumnMetadata(int positionInSource,
String name,
int jdbcType,
int precision,
int scale,
DateTimeFormatter dateTimeFormatter) |
Adds metadata for the given column in the file.
|
protected void |
checkDuplicateColumnName(int positionInTable,
String colName) |
|
DateTimeFormatter |
getColumnDateTimeFormatter(int column) |
Returns the
dateTimeFormatter for the given column. |
String |
getColumnName(int column) |
Returns the name of the given column.
|
Set<Integer> |
getColumnOrdinals() |
Returns the ordinals for each of the columns represented in this data record.
|
int |
getColumnType(int column) |
Returns the JDBC data type of the given column.
|
int |
getPrecision(int column) |
Returns the precision for the given column.
|
Object[] |
getRowData() |
Returns the data for the current row as an array of Objects.
|
int |
getScale(int column) |
Returns the scale for the given column.
|
boolean |
isAutoIncrement(int column) |
Returns whether the column represents an identity column.
|
boolean |
next() |
Advances to the next data row.
|
void |
setTimestampWithTimezoneFormat(String dateTimeFormat) |
Sets the format for reading in dates from the file.
|
void |
setTimestampWithTimezoneFormat(DateTimeFormatter dateTimeFormatter) |
Sets the format for reading in dates from the file.
|
void |
setTimeWithTimezoneFormat(String timeFormat) |
Sets the format for reading in dates from the file.
|
void |
setTimeWithTimezoneFormat(DateTimeFormatter dateTimeFormatter) |
Sets the format for reading in dates from the file.
|
protected void |
throwInvalidArgument(String argument) |
protected String[] columnNames
protected Map<Integer,com.microsoft.sqlserver.jdbc.SQLServerBulkCommon.ColumnMetadata> columnMetadata
protected DateTimeFormatter dateTimeFormatter
protected DateTimeFormatter timeFormatter
public SQLServerBulkBatchInsertRecord(ArrayList<com.microsoft.sqlserver.jdbc.Parameter[]> batchParam, ArrayList<String> columnList, ArrayList<String> valueList, String encoding) throws SQLServerException
SQLServerExceptionpublic DateTimeFormatter getColumnDateTimeFormatter(int column)
ISQLServerBulkRecorddateTimeFormatter for the given column.column - Column ordinalpublic Set<Integer> getColumnOrdinals()
ISQLServerBulkRecordpublic String getColumnName(int column)
ISQLServerBulkRecordcolumn - Column ordinalpublic int getColumnType(int column)
ISQLServerBulkRecordcolumn - Column ordinalpublic int getPrecision(int column)
ISQLServerBulkRecordcolumn - Column ordinalpublic int getScale(int column)
ISQLServerBulkRecordcolumn - Column ordinalpublic boolean isAutoIncrement(int column)
ISQLServerBulkRecordcolumn - Column ordinalpublic Object[] getRowData() throws SQLServerException
ISQLServerBulkRecordSQLServerException - If there are any errors in obtaining the data.public void setTimestampWithTimezoneFormat(String dateTimeFormat)
ISQLServerBulkRecordsetTimestampWithTimezoneFormat in interface ISQLServerBulkRecorddateTimeFormat - format to parse data sent as java.sql.Types.TIMESTAMP_WITH_TIMEZONEpublic void setTimestampWithTimezoneFormat(DateTimeFormatter dateTimeFormatter)
ISQLServerBulkRecordsetTimestampWithTimezoneFormat in interface ISQLServerBulkRecorddateTimeFormatter - format to parse data sent as java.sql.Types.TIMESTAMP_WITH_TIMEZONEpublic void setTimeWithTimezoneFormat(String timeFormat)
ISQLServerBulkRecordsetTimeWithTimezoneFormat in interface ISQLServerBulkRecordtimeFormat - format to parse data sent as java.sql.Types.TIME_WITH_TIMEZONEpublic void setTimeWithTimezoneFormat(DateTimeFormatter dateTimeFormatter)
ISQLServerBulkRecordsetTimeWithTimezoneFormat in interface ISQLServerBulkRecorddateTimeFormatter - format to parse data sent as java.sql.Types.TIME_WITH_TIMEZONEpublic boolean next()
throws SQLServerException
ISQLServerBulkRecordSQLServerException - If there are any errors in advancing to the next row.public void addColumnMetadata(int positionInSource,
String name,
int jdbcType,
int precision,
int scale,
DateTimeFormatter dateTimeFormatter)
throws SQLServerException
ISQLServerBulkRecordaddColumnMetadata in interface ISQLServerBulkRecordpositionInSource - Indicates which column the metadata is for. Columns start at 1.name - Name for the column (optional if only using column ordinal in a mapping for SQLServerBulkCopy operation)jdbcType - JDBC data type of the columnprecision - Precision for the column (ignored for the appropriate data types)scale - Scale for the column (ignored for the appropriate data types)dateTimeFormatter - format to parse data that is sentSQLServerException - when an error occurspublic void addColumnMetadata(int positionInSource,
String name,
int jdbcType,
int precision,
int scale)
throws SQLServerException
ISQLServerBulkRecordaddColumnMetadata in interface ISQLServerBulkRecordpositionInSource - Indicates which column the metadata is for. Columns start at 1.name - Name for the column (optional if only using column ordinal in a mapping for SQLServerBulkCopy operation)jdbcType - JDBC data type of the columnprecision - Precision for the column (ignored for the appropriate data types)scale - Scale for the column (ignored for the appropriate data types)SQLServerException - when an error occursprotected void throwInvalidArgument(String argument) throws SQLServerException
SQLServerExceptionprotected void checkDuplicateColumnName(int positionInTable,
String colName)
throws SQLServerException
SQLServerExceptionCopyright © 2018 Microsoft Corporation. All rights reserved.