Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ private string CreateInitialQuery()
string[] parts;
try
{
parts = MultipartIdentifier.ParseMultipartIdentifier(DestinationTableName, "[\"", "]\"", Strings.SQL_BulkCopyDestinationTableName, true);
parts = MultipartIdentifier.ParseMultipartIdentifier(DestinationTableName, Strings.SQL_BulkCopyDestinationTableName, true);
}
catch (Exception e)
{
Expand Down Expand Up @@ -542,7 +542,7 @@ private string AnalyzeTargetAndCreateUpdateBulkCommand(BulkCopySimpleResultSet i
throw SQL.BulkLoadNoCollation();
}

string[] parts = MultipartIdentifier.ParseMultipartIdentifier(DestinationTableName, "[\"", "]\"", Strings.SQL_BulkCopyDestinationTableName, true);
string[] parts = MultipartIdentifier.ParseMultipartIdentifier(DestinationTableName, Strings.SQL_BulkCopyDestinationTableName, true);
updateBulkCommandText.AppendFormat("insert bulk {0} (", ADP.BuildMultiPartName(parts));

// Throw if there is a transaction but no flag is set
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1291,11 +1291,9 @@ internal void DeriveParameters()
// Use common parser for SqlClient and OleDb - parse into 4 parts - Server, Catalog,
// Schema, ProcedureName
string[] parsedSProc = MultipartIdentifier.ParseMultipartIdentifier(
name: CommandText,
leftQuote: "[\"",
rightQuote: "]\"",
identifier: CommandText,
property: Strings.SQL_SqlCommandCommandText,
ThrowOnEmptyMultipartName: false);
throwOnEmptyMultipartIdentifier: false);

if (string.IsNullOrEmpty(parsedSProc[3]))
{
Expand Down Expand Up @@ -2809,10 +2807,8 @@ private void SetUpRPCParameters(_SqlRPC rpc, bool inSchema, SqlParameterCollecti
{
string[] parts = MultipartIdentifier.ParseMultipartIdentifier(
parameter.TypeName,
leftQuote: "[\"",
rightQuote: "]\"",
property: Strings.SQL_TDSParserTableName,
ThrowOnEmptyMultipartName: false);
throwOnEmptyMultipartIdentifier: false);
// @TODO: Combine this and inner if statement
if (parts?.Length == 4)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2514,7 +2514,7 @@ internal static string[] ParseTypeName(string typeName, bool isUdtTypeName)
try
{
string errorMsg = isUdtTypeName ? Strings.SQL_UDTTypeName : Strings.SQL_TypeName;
return MultipartIdentifier.ParseMultipartIdentifier(typeName, "[\"", "]\"", '.', 3, true, errorMsg, true);
return MultipartIdentifier.ParseMultipartIdentifier(typeName, errorMsg, true, limit: 3);
}
catch (ArgumentException)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ private void ParseMultipartName()
{
if (_multipartName != null)
{
string[] parts = MultipartIdentifier.ParseMultipartIdentifier(_multipartName, "[\"", "]\"", Strings.SQL_TDSParserTableName, false);
string[] parts = MultipartIdentifier.ParseMultipartIdentifier(_multipartName, Strings.SQL_TDSParserTableName, false);
_serverName = parts[0];
_catalogName = parts[1];
_schemaName = parts[2];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
<Compile Include="DataCommon\SystemDataResourceManager.cs" />
<Compile Include="DataCommon\TestUtility.cs" />
<Compile Include="LocalizationTest.cs" />
<Compile Include="MultipartIdentifierTests.cs" />
<Compile Include="MultiplexerTests.cs" />
<Compile Include="SqlAuthenticationProviderTest.cs" />
<Compile Include="SqlClientLoggerTest.cs" />
Expand Down Expand Up @@ -64,7 +63,6 @@
<Compile Include="SerializeSqlTypesTest.cs" />
<Compile Include="TdsParserStateObject.TestHarness.cs" />
<Compile Include="SqlHelperTest.cs" />
<Compile Include="..\..\src\Microsoft\Data\Common\MultipartIdentifier.cs" />
<Compile Include="..\..\src\Microsoft\Data\SqlClient\TdsParserStateObject.Multiplexer.cs" />
<Compile Include="..\..\src\Microsoft\Data\SqlClient\Packet.cs" />
</ItemGroup>
Expand Down

This file was deleted.

Loading