ISQLServerBulkRecordpublic class SQLServerBulkBatchInsertRecord
extends java.lang.Object
| Modifier and Type | Field | Description |
|---|---|---|
protected java.util.Map<java.lang.Integer,com.microsoft.sqlserver.jdbc.SQLServerBulkCommon.ColumnMetadata> |
columnMetadata |
|
protected java.lang.String[] |
columnNames |
|
protected java.time.format.DateTimeFormatter |
dateTimeFormatter |
|
protected java.time.format.DateTimeFormatter |
timeFormatter |
| Constructor | Description |
|---|---|
SQLServerBulkBatchInsertRecord(java.util.ArrayList<com.microsoft.sqlserver.jdbc.Parameter[]> batchParam,
java.util.ArrayList<java.lang.String> columnList,
java.util.ArrayList<java.lang.String> valueList,
java.lang.String encoding) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addColumnMetadata(int positionInSource,
java.lang.String name,
int jdbcType,
int precision,
int scale) |
Adds metadata for the given column in the file.
|
void |
addColumnMetadata(int positionInSource,
java.lang.String name,
int jdbcType,
int precision,
int scale,
java.time.format.DateTimeFormatter dateTimeFormatter) |
Adds metadata for the given column in the file.
|
protected void |
checkDuplicateColumnName(int positionInTable,
java.lang.String colName) |
|
java.time.format.DateTimeFormatter |
getColumnDateTimeFormatter(int column) |
Retreives
dateTimeFormatter for the given column |
java.lang.String |
getColumnName(int column) |
Get the name of the given column.
|
java.util.Set<java.lang.Integer> |
getColumnOrdinals() |
Get the ordinals for each of the columns represented in this data record.
|
int |
getColumnType(int column) |
Get the JDBC data type of the given column.
|
int |
getPrecision(int column) |
Get the precision for the given column.
|
java.lang.Object[] |
getRowData() |
Gets the data for the current row as an array of Objects.
|
int |
getScale(int column) |
Get the scale for the given column.
|
boolean |
isAutoIncrement(int column) |
Indicates whether the column represents an identity column.
|
boolean |
next() |
Advances to the next data row.
|
void |
setTimestampWithTimezoneFormat(java.lang.String dateTimeFormat) |
Set the format for reading in dates from the file.
|
void |
setTimestampWithTimezoneFormat(java.time.format.DateTimeFormatter dateTimeFormatter) |
Set the format for reading in dates from the file.
|
void |
setTimeWithTimezoneFormat(java.lang.String timeFormat) |
Set the format for reading in dates from the file.
|
void |
setTimeWithTimezoneFormat(java.time.format.DateTimeFormatter dateTimeFormatter) |
Set the format for reading in dates from the file.
|
protected void |
throwInvalidArgument(java.lang.String argument) |
protected java.lang.String[] columnNames
protected java.util.Map<java.lang.Integer,com.microsoft.sqlserver.jdbc.SQLServerBulkCommon.ColumnMetadata> columnMetadata
protected java.time.format.DateTimeFormatter dateTimeFormatter
protected java.time.format.DateTimeFormatter timeFormatter
public SQLServerBulkBatchInsertRecord(java.util.ArrayList<com.microsoft.sqlserver.jdbc.Parameter[]> batchParam,
java.util.ArrayList<java.lang.String> columnList,
java.util.ArrayList<java.lang.String> valueList,
java.lang.String encoding)
throws SQLServerException
SQLServerExceptionpublic java.time.format.DateTimeFormatter getColumnDateTimeFormatter(int column)
ISQLServerBulkRecorddateTimeFormatter for the given columncolumn - Column ordinalpublic java.util.Set<java.lang.Integer> getColumnOrdinals()
ISQLServerBulkRecordpublic java.lang.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 java.lang.Object[] getRowData()
throws SQLServerException
ISQLServerBulkRecordSQLServerException - If there are any errors in obtaining the data.public void setTimestampWithTimezoneFormat(java.lang.String dateTimeFormat)
ISQLServerBulkRecordsetTimestampWithTimezoneFormat in interface ISQLServerBulkRecorddateTimeFormat - format to parse data sent as java.sql.Types.TIMESTAMP_WITH_TIMEZONEpublic void setTimestampWithTimezoneFormat(java.time.format.DateTimeFormatter dateTimeFormatter)
ISQLServerBulkRecordsetTimestampWithTimezoneFormat in interface ISQLServerBulkRecorddateTimeFormatter - format to parse data sent as java.sql.Types.TIMESTAMP_WITH_TIMEZONEpublic void setTimeWithTimezoneFormat(java.lang.String timeFormat)
ISQLServerBulkRecordsetTimeWithTimezoneFormat in interface ISQLServerBulkRecordtimeFormat - format to parse data sent as java.sql.Types.TIME_WITH_TIMEZONEpublic void setTimeWithTimezoneFormat(java.time.format.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,
java.lang.String name,
int jdbcType,
int precision,
int scale,
java.time.format.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,
java.lang.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(java.lang.String argument)
throws SQLServerException
SQLServerExceptionprotected void checkDuplicateColumnName(int positionInTable,
java.lang.String colName)
throws SQLServerException
SQLServerExceptionCopyright © 2018 Microsoft Corporation. All rights reserved.