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

Remove SqlCommand code paths for context connections #2996

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -775,19 +775,14 @@
<Compile Include="Microsoft\Data\SqlClient\SqlBuffer.netfx.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlBulkCopy.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlClientPermission.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlClientWrapperSmiStream.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlClientWrapperSmiStreamChars.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlCommand.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlConnection.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlConnectionFactory.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlConnectionHelper.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlDataReader.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlDataReaderSmi.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlDelegatedTransaction.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlInternalConnectionSmi.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlInternalConnectionTds.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlSequentialStreamSmi.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlSequentialTextReaderSmi.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlTransaction.cs" />
<Compile Include="Microsoft\Data\SqlClient\TdsParser.cs" />
<Compile Include="Microsoft\Data\SqlClient\TdsParserStateObject.netfx.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ public SourceColumnMetadata(ValueMethod method, bool isSqlType, bool isDataFeed)

private object _rowSource;
private SqlDataReader _sqlDataReaderRowSource;
private bool _rowSourceIsSqlDataReaderSmi;
private DbDataReader _dbDataReaderRowSource;
private DataTable _dataTableSource;

Expand Down Expand Up @@ -1258,7 +1257,7 @@ private SourceColumnMetadata GetColumnMetadata(int ordinal)
}
}
// Check for data streams
else if ((_enableStreaming) && ((metadata.length == MAX_LENGTH) || metadata.metaType.SqlDbType == SqlDbTypeExtensions.Json) && (!_rowSourceIsSqlDataReaderSmi))
else if ((_enableStreaming) && ((metadata.length == MAX_LENGTH) || metadata.metaType.SqlDbType == SqlDbTypeExtensions.Json))
{
isSqlType = false;

Expand Down Expand Up @@ -1702,10 +1701,6 @@ public void WriteToServer(DbDataReader reader)
_dbDataReaderRowSource = reader;
_sqlDataReaderRowSource = reader as SqlDataReader;

if (_sqlDataReaderRowSource != null)
{
_rowSourceIsSqlDataReaderSmi = _sqlDataReaderRowSource is SqlDataReaderSmi;
}
_rowSourceType = ValueSourceType.DbDataReader;

WriteRowSourceToServerAsync(reader.FieldCount, CancellationToken.None); //It returns null since _isAsyncBulkCopy = false;
Expand Down Expand Up @@ -1738,10 +1733,6 @@ public void WriteToServer(IDataReader reader)
ResetWriteToServerGlobalVariables();
_rowSource = reader;
_sqlDataReaderRowSource = _rowSource as SqlDataReader;
if (_sqlDataReaderRowSource != null)
{
_rowSourceIsSqlDataReaderSmi = _sqlDataReaderRowSource is SqlDataReaderSmi;
}
_dbDataReaderRowSource = _rowSource as DbDataReader;
_rowSourceType = ValueSourceType.IDataReader;
WriteRowSourceToServerAsync(reader.FieldCount, CancellationToken.None); //It returns null since _isAsyncBulkCopy = false;
Expand Down

This file was deleted.

This file was deleted.

Loading
Loading