-
Notifications
You must be signed in to change notification settings - Fork 425
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix | Added ISQLServerBulkData to remove implementation details from …
…ISQLServerBulkRecord (#1099)
- Loading branch information
1 parent
94beeac
commit 02da869
Showing
17 changed files
with
383 additions
and
384 deletions.
There are no files selected for viewing
79 changes: 79 additions & 0 deletions
79
src/main/java/com/microsoft/sqlserver/jdbc/ISQLServerBulkData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
/* | ||
* Microsoft JDBC Driver for SQL Server Copyright(c) Microsoft Corporation All rights reserved. This program is made | ||
* available under the terms of the MIT License. See the LICENSE file in the project root for more information. | ||
*/ | ||
|
||
package com.microsoft.sqlserver.jdbc; | ||
|
||
import java.io.Serializable; | ||
|
||
/** | ||
* Provides an interface used to create classes that read in data from any source (such as a file) and allows a | ||
* SQLServerBulkCopy class to write the data to SQL Server tables. | ||
*/ | ||
public interface ISQLServerBulkData extends Serializable { | ||
|
||
/** | ||
* Returns the ordinals for each of the columns represented in this data record. | ||
* | ||
* @return Set of ordinals for the columns. | ||
*/ | ||
java.util.Set<Integer> getColumnOrdinals(); | ||
|
||
/** | ||
* Returns the name of the given column. | ||
* | ||
* @param column | ||
* Column ordinal | ||
* @return Name of the column | ||
*/ | ||
String getColumnName(int column); | ||
|
||
/** | ||
* Returns the JDBC data type of the given column. | ||
* | ||
* @param column | ||
* Column ordinal | ||
* @return JDBC data type of the column | ||
*/ | ||
int getColumnType(int column); | ||
|
||
/** | ||
* Returns the precision for the given column. | ||
* | ||
* @param column | ||
* Column ordinal | ||
* @return Precision of the column | ||
*/ | ||
int getPrecision(int column); | ||
|
||
/** | ||
* Returns the scale for the given column. | ||
* | ||
* @param column | ||
* Column ordinal | ||
* @return Scale of the column | ||
*/ | ||
int getScale(int column); | ||
|
||
/** | ||
* Returns the data for the current row as an array of Objects. | ||
* | ||
* Each Object must match the Java language Type that is used to represent the indicated JDBC data type for the | ||
* given column. For more information, see 'Understanding the JDBC Driver Data Types' for the appropriate mappings. | ||
* | ||
* @return The data for the row. | ||
* @throws SQLServerException | ||
* If there are any errors in obtaining the data. | ||
*/ | ||
Object[] getRowData() throws SQLServerException; | ||
|
||
/** | ||
* Advances to the next data row. | ||
* | ||
* @return True if rows are available; false if there are no more rows | ||
* @throws SQLServerException | ||
* If there are any errors in advancing to the next row. | ||
*/ | ||
boolean next() throws SQLServerException; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.