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

Undo changes made in PR #2218 and optimize copying query results #2385

Merged
merged 8 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from 6 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
1 change: 1 addition & 0 deletions Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
<PackageReference Update="Microsoft.SqlServer.XEvent.XELite" Version="2023.1.30.3" />
<PackageReference Update="SkiaSharp" Version="2.88.6" />
<PackageReference Update="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="2.88.6" Condition="$([MSBuild]::IsOsPlatform('Linux'))" />
<PackageReference Update="TextCopy" Version="6.2.1" />
lewis-sanchez marked this conversation as resolved.
Show resolved Hide resolved
</ItemGroup>

<!-- When updating version of Dependencies in the below section, please also update the version in the following files:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
<PackageReference Include="Microsoft.SqlServer.TransactSql.ScriptDom.NRT">
<Aliases>ASAScriptDom</Aliases>
</PackageReference>
<PackageReference Include="TextCopy" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="../Microsoft.SqlTools.Hosting/Microsoft.SqlTools.Hosting.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public class CopyResultsRequestParams : SubsetParams
/// </summary>
public class CopyResultsRequestResult
{
public string Results { get; set; }
lewis-sanchez marked this conversation as resolved.
Show resolved Hide resolved
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
using Microsoft.SqlTools.ServiceLayer.Workspace.Contracts;
using Microsoft.SqlTools.ServiceLayer.Workspace;
using Microsoft.SqlTools.Utility;
using TextCopy;

namespace Microsoft.SqlTools.ServiceLayer.QueryExecution
{
Expand Down Expand Up @@ -871,11 +872,8 @@ internal async Task HandleCopyResultsRequest(CopyResultsRequestParams requestPar
pageStartRowIndex += rowsToFetch;
} while (pageStartRowIndex < rowRange.End);
}
CopyResultsRequestResult result = new CopyResultsRequestResult
{
Results = builder.ToString()
};
await requestContext.SendResult(result);
await ClipboardService.SetTextAsync(builder.ToString());
await requestContext.SendResult(new CopyResultsRequestResult());
}

#endregion
Expand Down
Loading