mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-27 09:35:38 -05:00
* Add contract to get all metadata request * Add new metadata service request endpoint * Adds factory to make database server scripts * Minor clean up * Corrects filename typo * Cleans up SmoScripterFactory * Stubs out metadata cacher * Method clean up * Add writing and reading to script cache * Cleans up request endpoint flow * Add missing edge case when cache isn't empty * Remove unused code * Remove unneeded null check * Read to end of stream * Passes correct parameter to write cache * Adds integration test to get all scripts * Renames new request endpoint * Rename request class to AllServerMetadataRequest * Renames server metadata request endpoints * Refresh cache and adjusts return obj type * Clean up * Assert table script generation * Minor cache refresh adjustment * Ensure test create table script is accurate * Code review changes * Additional code review changes * Swap logger write for logger warning * Renames generate request endpoint methods * Remove unused using statement * Remove unnecessary create table check * Check if previous script file is valid for reuse * Pascal case for method name * Code review changes * Fix PR issues * Update doc comment * Fixes tests after code review changes * Fix failing int. test due to 30 day temp file expiry * Generalize type names and update request endpoint * Updates doc comment. * Remove 'database' from type and method names * Code review changes * Code review changes * Issues with background thread. * Remove thread sleep for test reliability * Remove reflection from int. tests
32 lines
1019 B
C#
32 lines
1019 B
C#
//
|
|
// Copyright (c) Microsoft. All rights reserved.
|
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
//
|
|
|
|
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
|
|
|
|
namespace Microsoft.SqlTools.ServiceLayer.Metadata.Contracts
|
|
{
|
|
public class GetServerContextualizationParams
|
|
{
|
|
/// <summary>
|
|
/// The URI of the connection to generate scripts for.
|
|
/// </summary>
|
|
public string OwnerUri { get; set; }
|
|
}
|
|
|
|
public class GetServerContextualizationResult
|
|
{
|
|
/// <summary>
|
|
/// An array containing the generated server context.
|
|
/// </summary>
|
|
public string[] Context { get; set; }
|
|
}
|
|
|
|
public class GetServerContextualizationRequest
|
|
{
|
|
public static readonly RequestType<GetServerContextualizationParams, GetServerContextualizationResult> Type =
|
|
RequestType<GetServerContextualizationParams, GetServerContextualizationResult>.Create("metadata/getServerContext");
|
|
}
|
|
}
|