diff --git a/src/main/java/com/microsoft/sqlserver/jdbc/ISQLServerConnection.java b/src/main/java/com/microsoft/sqlserver/jdbc/ISQLServerConnection.java index 24dbae335..7ab7772d7 100644 --- a/src/main/java/com/microsoft/sqlserver/jdbc/ISQLServerConnection.java +++ b/src/main/java/com/microsoft/sqlserver/jdbc/ISQLServerConnection.java @@ -497,4 +497,19 @@ CallableStatement prepareCall(String sql, int nType, int nConcur, int nHold, * A boolean that indicates if the driver should calculate precision from inputted big decimal values. */ void setCalcBigDecimalPrecision(boolean calcBigDecimalPrecision); + + /** + * Specifies the flag for using Bulk Copy API for batch insert operations. + * + * @param useBulkCopyForBatchInsert + * boolean value for useBulkCopyForBatchInsert. + */ + void setUseBulkCopyForBatchInsert(boolean useBulkCopyForBatchInsert) ; + + /** + * Returns the useBulkCopyForBatchInsert value. + * + * @return flag for using Bulk Copy API for batch insert operations. + */ + boolean getUseBulkCopyForBatchInsert(); } diff --git a/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java b/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java index 80310b188..31b1d4c14 100644 --- a/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java +++ b/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java @@ -788,6 +788,7 @@ final int getSocketTimeoutMilliseconds() { * * @return flag for using Bulk Copy API for batch insert operations. */ + @Override public boolean getUseBulkCopyForBatchInsert() { return useBulkCopyForBatchInsert; } @@ -798,6 +799,7 @@ public boolean getUseBulkCopyForBatchInsert() { * @param useBulkCopyForBatchInsert * boolean value for useBulkCopyForBatchInsert. */ + @Override public void setUseBulkCopyForBatchInsert(boolean useBulkCopyForBatchInsert) { this.useBulkCopyForBatchInsert = useBulkCopyForBatchInsert; } diff --git a/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnectionPoolProxy.java b/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnectionPoolProxy.java index 33b8b7cf8..4c40b01c6 100644 --- a/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnectionPoolProxy.java +++ b/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnectionPoolProxy.java @@ -712,4 +712,24 @@ public boolean getCalcBigDecimalPrecision() { public void setCalcBigDecimalPrecision(boolean calcBigDecimalPrecision) { wrappedConnection.setCalcBigDecimalPrecision(calcBigDecimalPrecision); } + /** + * Returns the useBulkCopyForBatchInsert value. + * + * @return flag for using Bulk Copy API for batch insert operations. + */ + @Override + public boolean getUseBulkCopyForBatchInsert() { + return wrappedConnection.getUseBulkCopyForBatchInsert(); + } + + /** + * Specifies the flag for using Bulk Copy API for batch insert operations. + * + * @param useBulkCopyForBatchInsert + * boolean value for useBulkCopyForBatchInsert. + */ + @Override + public void setUseBulkCopyForBatchInsert(boolean useBulkCopyForBatchInsert) { + wrappedConnection.setUseBulkCopyForBatchInsert(useBulkCopyForBatchInsert); + } }