mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-12 11:08:31 -05:00
Insert sql bindings into Azure Functions (#1224)
* getting table name from a script * add InsertSqlInputBindingOperation * cleanup * move azure functions stuff out of dacfx service * cleanup * add tests * add another test * cleanup * add comments and connection string setting * addressing comments * change name to use add instead of insert
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
//
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
//
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
|
||||
using Microsoft.SqlTools.ServiceLayer.SchemaCompare.Contracts;
|
||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.AzureFunctions.Contracts
|
||||
{
|
||||
/// <summary>
|
||||
/// Binding types for sql bindings for Azure Functions
|
||||
/// </summary>
|
||||
public enum BindingType
|
||||
{
|
||||
input,
|
||||
output
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Parameters for adding a sql binding
|
||||
/// </summary>
|
||||
public class AddSqlBindingParams
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the filePath
|
||||
/// </summary>
|
||||
public string filePath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the binding type
|
||||
/// </summary>
|
||||
public BindingType bindingType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the function name
|
||||
/// </summary>
|
||||
public string functionName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the object name
|
||||
/// </summary>
|
||||
public string objectName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the connection string setting
|
||||
/// </summary>
|
||||
public string connectionStringSetting { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Defines the Add Sql Binding request
|
||||
/// </summary>
|
||||
class AddSqlBindingRequest
|
||||
{
|
||||
public static readonly RequestType<AddSqlBindingParams, ResultStatus> Type =
|
||||
RequestType<AddSqlBindingParams, ResultStatus>.Create("azureFunctions/sqlBinding");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user