Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optional ORDER hints for SqlBulkCopy #540

Merged
merged 42 commits into from
Jun 10, 2020
Merged
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
e431f08
order hint implementation
Apr 24, 2020
84ec1ab
minor changes
Apr 24, 2020
bef48f6
minor changes
Apr 27, 2020
51b37d8
Update Microsoft.Data.SqlClient.sln
johnnypham Apr 27, 2020
eb82141
modified tests
Apr 27, 2020
d214355
modified tests
Apr 27, 2020
b25e3c8
Tests now use DataTestUtility to drop tables. Added tests for WriteTo…
Apr 28, 2020
8834023
Merge branch 'bulkCopyOrderHints' of https://github.com/johnnypham/Sq…
Apr 28, 2020
5328079
assigned task number to order hint identity column test
Apr 29, 2020
d88cb03
Collection class reworked to handle duplicate columns
johnnypham May 9, 2020
d7f3deb
spacing
johnnypham May 9, 2020
9e737cd
Updated tests for duplicate column names, updated documentation
johnnypham May 11, 2020
4cd38d5
Added couple asserts
johnnypham May 11, 2020
25f352f
Clean up tests
johnnypham May 18, 2020
9900f72
Remove NameChanging event in ref
johnnypham May 18, 2020
b9416ee
Update doc/snippets/Microsoft.Data.SqlClient/SqlBulkCopy.xml
May 19, 2020
9e4f02d
Update doc/snippets/Microsoft.Data.SqlClient/SqlBulkCopyColumnOrderHi…
May 19, 2020
cf680d9
Update doc/snippets/Microsoft.Data.SqlClient/SqlBulkCopyColumnOrderHi…
May 19, 2020
968bd26
Addressing review comments
johnnypham May 19, 2020
de47b64
Merge branch 'bulkCopyOrderHints' of https://github.com/johnnypham/Sq…
johnnypham May 19, 2020
cb2eef3
spacing
johnnypham May 19, 2020
2afb1a8
Added test for consecutive WriteToServer calls
johnnypham May 19, 2020
9ed653d
Fixed test
johnnypham May 20, 2020
18d5d7d
Merge branch 'master' into bulkCopyOrderHints
May 20, 2020
d9b4141
Merge branch 'master' into bulkCopyOrderHints
May 22, 2020
985662f
Update Microsoft.Data.SqlClient.ManualTesting.Tests.csproj
May 22, 2020
477913c
Update SqlBulkCopy_ColumnOrderHintCollectionClear.cs
May 22, 2020
5d9b9f5
Update SqlBulkCopyColumnOrderHint.xml
May 22, 2020
d5fe90d
Update SqlBulkCopyColumnOrderHintCollection.xml
May 22, 2020
9cde0c4
Addressing comments
johnnypham May 29, 2020
0093a06
Merge branch 'bulkCopyOrderHints' of https://github.com/johnnypham/Sq…
johnnypham May 29, 2020
2140fd7
Revert "Addressing comments"
johnnypham May 29, 2020
465fa74
Revert "Merge branch 'bulkCopyOrderHints' of https://github.com/johnn…
johnnypham May 29, 2020
242b1c3
Merge branch 'master' into bulkCopyOrderHints
johnnypham May 29, 2020
ecb43a7
Addressing comments
johnnypham May 29, 2020
982a802
Addressing comments
johnnypham Jun 4, 2020
d5b8620
Addressing comments
johnnypham Jun 4, 2020
fd9183d
Update SqlBulkCopy.xml
Jun 5, 2020
d8a44b3
Addressing comments
johnnypham Jun 9, 2020
3b8652f
Merge branch 'master' into bulkCopyOrderHints
johnnypham Jun 9, 2020
8ceb9fb
XML comments
johnnypham Jun 10, 2020
9c71b2f
Update SqlBulkCopyColumnOrderHintCollection.cs
johnnypham Jun 10, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Addressing comments
  • Loading branch information
johnnypham committed Jun 4, 2020
commit d5b862020ce54b63868b93bedd27dd0c8de838da
63 changes: 61 additions & 2 deletions doc/snippets/Microsoft.Data.SqlClient/SqlBulkCopy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,11 @@ the <xref:Microsoft.Data.SqlClient.SqlBulkCopy> object's `Finalize` method.
<remarks>
To be added.
</remarks>
<exception cref="T:System.InvalidOperationException">
A
<see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnOrderHint" />
did not specify a valid destination column name.
</exception>
</WriteToServer>
<WriteToServer name="IDataReaderParameter">
<param name="reader">
Expand Down Expand Up @@ -590,6 +595,11 @@ Transact-SQL `INSERT … SELECT` statement to copy the data.
[!code-csharp[SqlBulkCopy.ConnectionString#1](~/../sqlclient/doc/samples/SqlBulkCopy_ConnectionString.cs#1)]
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">
A
<see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnOrderHint" />
did not specify a valid destination column name.
</exception>
</WriteToServer>
<WriteToServer name="DataTableParameter">
<param name="table">
Expand Down Expand Up @@ -628,6 +638,11 @@ This code is provided to demonstrate the syntax for using **SqlBulkCopy** only.
[!code-csharp[SqlBulkCopy.DataTable#1](~/../sqlclient/doc/samples/SqlBulkCopy_DataTable.cs#1)]
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">
A
<see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnOrderHint" />
did not specify a valid destination column name.
</exception>
<related type="Article" href="https://msdn.microsoft.com/library/83a7a0d2-8018-4354-97b9-0b1d99f8342b">
Performing Bulk Copy Operations
</related>
Expand Down Expand Up @@ -682,6 +697,11 @@ The <xref:Microsoft.Data.SqlClient.SqlBulkCopy.WriteToServer%2A> method is calle
[!code-csharp[SqlBulkCopy.DataRowState#1](~/../sqlclient/doc/samples/SqlBulkCopy_DataRowState.cs#1)]
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">
A
<see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnOrderHint" />
did not specify a valid destination column name.
</exception>
</WriteToServer>
<WriteToServer name="DataRowParameter">
<param name="rows">An array of <see cref="T:System.Data.DataRow" /> objects that will be copied to the destination table.</param>
Expand All @@ -706,6 +726,11 @@ In this example, a <xref:System.Data.DataTable> is created at run time. A single

]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">
A
<see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnOrderHint" />
did not specify a valid destination column name.
</exception>
</WriteToServer>
<WriteToServerAsync name="DataRowParameter">
<param name="rows">
Expand Down Expand Up @@ -758,6 +783,10 @@ For more information about asynchronous programming in the .NET Framework Data P
object is closed before method execution.
<see langword="Context Connection=true" />
is specified in the connection string.

A
<see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnOrderHint" />
did not specify a valid destination column name.
</exception>
<exception cref="T:Microsoft.Data.SqlClient.SqlException">
Returned in the task object, any error returned by SQL Server that occurred while opening the connection.
Expand Down Expand Up @@ -815,6 +844,9 @@ For more information about asynchronous programming in the .NET Framework Data P
object is closed before method execution.
<see langword="Context Connection=true" />
is specified in the connection string.
A
<see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnOrderHint" />
did not specify a valid destination column name.
</exception>
<exception cref="T:Microsoft.Data.SqlClient.SqlException">
Returned in the task object, any error returned by SQL Server that occurred while opening the connection.
Expand Down Expand Up @@ -875,6 +907,9 @@ For more information about asynchronous programming in the .NET Framework Data P
returned.
<see langword="Context Connection=true" />
is specified in the connection string.
A
<see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnOrderHint" />
did not specify a valid destination column name.
</exception>
<exception cref="T:Microsoft.Data.SqlClient.SqlException">
Returned in the task object, any error returned by SQL Server that occurred while opening the connection.
Expand Down Expand Up @@ -978,6 +1013,10 @@ For more information about asynchronous programming in the .NET Framework Data P
returned.
<see langword="Context Connection=true" />
is specified in the connection string.

A
<see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnOrderHint" />
did not specify a valid destination column name.
</exception>
<exception cref="T:Microsoft.Data.SqlClient.SqlException">
Returned in the task object, any error returned by SQL Server that occurred while opening the connection.
Expand Down Expand Up @@ -1055,6 +1094,10 @@ For more information about asynchronous programming in the .NET Framework Data P
returned.
<see langword="Context Connection=true" />
is specified in the connection string.

A
<see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnOrderHint" />
did not specify a valid destination column name.
</exception>
<exception cref="T:Microsoft.Data.SqlClient.SqlException">
Returned in the task object, any error returned by SQL Server that occurred while opening the connection.
Expand Down Expand Up @@ -1112,8 +1155,12 @@ For more information about asynchronous programming in the .NET Framework Data P
object is closed before method execution.
<see langword="Context Connection=true" />
is specified in the connection string.
</exception>
<exception cref="T:Microsoft.Data.SqlClient.SqlException">

A
<see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnOrderHint" />
did not specify a valid destination column name.
</exception>l
johnnypham marked this conversation as resolved.
Show resolved Hide resolved
<exception cref="T:Microsoft.Data.SqlCient.SqlException">
Returned in the task object, any error returned by SQL Server that occurred while opening the connection.
</exception>
</WriteToServerAsync>
Expand Down Expand Up @@ -1178,6 +1225,10 @@ For more information about asynchronous programming in the .NET Framework Data P
object is closed before method execution.
<see langword="Context Connection=true" />
is specified in the connection string.

A
<see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnOrderHint" />
did not specify a valid destination column name.
</exception>
<exception cref="T:Microsoft.Data.SqlClient.SqlException">
Returned in the task object, any error returned by SQL Server that occurred while opening the connection.
Expand Down Expand Up @@ -1237,6 +1288,10 @@ For more information about asynchronous programming in the .NET Framework Data P
object is closed before method execution.
<see langword="Context Connection=true" />
is specified in the connection string.

A
<see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnOrderHint" />
did not specify a valid destination column name.
</exception>
<exception cref="T:Microsoft.Data.SqlClient.SqlException">
Returned in the task object, any error returned by SQL Server that occurred while opening the connection.
Expand Down Expand Up @@ -1309,6 +1364,10 @@ For more information about asynchronous programming in the .NET Framework Data P
object is closed before method execution.
<see langword="Context Connection=true" />
is specified in the connection string.

A
<see cref="T:Microsoft.Data.SqlClient.SqlBulkCopyColumnOrderHint" />
did not specify a valid destination column name.
</exception>
<exception cref="T:Microsoft.Data.SqlClient.SqlException">
Returned in the task object, any error returned by SQL Server that occurred while opening the connection.
Expand Down