Adding new handler for script as requests (#552)

* added new scripting handler for script as request
*change the language service to get the peek definition using scripting as operatin
This commit is contained in:
Leila Lali
2017-11-27 15:04:17 -08:00
committed by GitHub
parent b8e46ce65f
commit 530b66fc54
10 changed files with 851 additions and 160 deletions

View File

@@ -15,6 +15,11 @@ namespace Microsoft.SqlTools.ServiceLayer.Scripting.Contracts
/// </summary>
public bool? ScriptAnsiPadding { get; set; } = false;
/// <summary>
/// Returns Generate ANSI padding statements
/// </summary>
public bool? AnsiPadding { get { return ScriptAnsiPadding; } }
/// <summary>
/// Append the generated script to a file
/// </summary>
@@ -33,6 +38,11 @@ namespace Microsoft.SqlTools.ServiceLayer.Scripting.Contracts
/// </summary>
public bool? ConvertUDDTToBaseType { get; set; } = false;
/// <summary>
/// Returns ConvertUDDTToBaseType
/// </summary>
public bool? ConvertUserDefinedDataTypesToBaseType { get { return ConvertUDDTToBaseType; } }
/// <summary>
/// Generate script for dependent objects for each object scripted.
/// </summary>
@@ -49,6 +59,11 @@ namespace Microsoft.SqlTools.ServiceLayer.Scripting.Contracts
/// </remarks>
public bool? IncludeDescriptiveHeaders { get; set; } = true;
/// <summary>
/// Returns IncludeDescriptiveHeaders
/// </summary>
public bool? IncludeHeaders { get { return IncludeDescriptiveHeaders; } }
/// <summary>
/// Check that an object with the given name exists before dropping or altering or that an object with the given name does not exist before creating.
/// </summary>
@@ -64,6 +79,11 @@ namespace Microsoft.SqlTools.ServiceLayer.Scripting.Contracts
/// </summary>
public bool? ScriptDriIncludeSystemNames { get; set; } = false;
/// <summary>
/// Returns ScriptDriIncludeSystemNames
/// </summary>
public bool? DriIncludeSystemNames { get { return ScriptDriIncludeSystemNames; } }
/// <summary>
/// Include statements in the script that are not supported on the specified SQL Server database engine type.
/// </summary>
@@ -77,6 +97,11 @@ namespace Microsoft.SqlTools.ServiceLayer.Scripting.Contracts
/// </remarks>
public bool? SchemaQualify { get; set; } = true;
/// <summary>
/// Returns SchemaQualify
/// </summary>
public bool? SchemaQualifyForeignKeysReferences { get { return SchemaQualify; } }
/// <summary>
/// Script options to set bindings option.
/// </summary>
@@ -87,6 +112,11 @@ namespace Microsoft.SqlTools.ServiceLayer.Scripting.Contracts
/// </summary>
public bool? Collation { get; set; } = false;
/// <summary>
/// Returns false if Collation is true
/// </summary>
public bool? NoCollation { get { return !Collation; } }
/// <summary>
/// Script the default values.
/// </summary>
@@ -95,6 +125,12 @@ namespace Microsoft.SqlTools.ServiceLayer.Scripting.Contracts
/// </remarks>
public bool? Default { get; set; } = true;
/// <summary>
/// Returns the value of Default Property
/// </summary>
public bool? DriDefaults { get { return Default; } }
/// <summary>
/// Script Object CREATE/DROP statements.
/// Possible values:
@@ -116,6 +152,12 @@ namespace Microsoft.SqlTools.ServiceLayer.Scripting.Contracts
/// </remarks>
public bool? ScriptExtendedProperties { get; set; } = true;
/// <summary>
/// Returns the value of ScriptExtendedProperties Property
/// </summary>
public bool? ExtendedProperties { get { return ScriptExtendedProperties; } }
/// <summary>
/// Script only features compatible with the specified version of SQL Server. Possible values:
/// Script90Compat
@@ -162,6 +204,11 @@ namespace Microsoft.SqlTools.ServiceLayer.Scripting.Contracts
/// </summary>
public bool? ScriptObjectLevelPermissions { get; set; } = false;
/// <summary>
/// Returns the value of ScriptObjectLevelPermissions Property
/// </summary>
public bool? Permissions { get { return ScriptObjectLevelPermissions; } }
/// <summary>
/// Script owner for the objects.
/// </summary>
@@ -179,6 +226,12 @@ namespace Microsoft.SqlTools.ServiceLayer.Scripting.Contracts
/// </remarks>
public string ScriptStatistics { get; set; } = "ScriptStatsNone";
/// <summary>
/// Returns the value of ScriptStatistics Property
/// </summary>
public string Statistics { get { return ScriptStatistics; } }
/// <summary>
/// Generate USE DATABASE statement.
/// </summary>
@@ -201,6 +254,12 @@ namespace Microsoft.SqlTools.ServiceLayer.Scripting.Contracts
/// </summary>
public bool? ScriptChangeTracking { get; set; } = false;
/// <summary>
/// Returns the value of ScriptChangeTracking Property
/// </summary>
public bool? ChangeTracking { get { return ScriptChangeTracking; } }
/// <summary>
/// Script the check constraints for each table or view scripted.
/// </summary>
@@ -209,11 +268,22 @@ namespace Microsoft.SqlTools.ServiceLayer.Scripting.Contracts
/// </remarks>
public bool? ScriptCheckConstraints { get; set; } = true;
/// <summary>
/// Returns the value of ScriptCheckConstraints Property
/// </summary>
public bool? DriChecks { get { return ScriptCheckConstraints; } }
/// <summary>
/// Scripts the data compression information.
/// </summary>
public bool? ScriptDataCompressionOptions { get; set; } = false;
/// <summary>
/// Returns the value of ScriptDataCompressionOptions Property
/// </summary>
public bool? ScriptDataCompression { get { return ScriptDataCompressionOptions; } }
/// <summary>
/// Script the foreign keys for each table scripted.
/// </summary>
@@ -222,11 +292,23 @@ namespace Microsoft.SqlTools.ServiceLayer.Scripting.Contracts
/// </remarks>
public bool? ScriptForeignKeys { get; set; } = true;
/// <summary>
/// Returns the value of ScriptForeignKeys Property
/// </summary>
public bool? DriForeignKeys { get { return ScriptForeignKeys; } }
/// <summary>
/// Script the full-text indexes for each table or indexed view scripted.
/// </summary>
public bool? ScriptFullTextIndexes { get; set; } = true;
/// <summary>
/// Returns the value of ScriptFullTextIndexes Property
/// </summary>
public bool? FullTextIndexes { get { return ScriptFullTextIndexes; } }
/// <summary>
/// Script the indexes (including XML and clustered indexes) for each table or indexed view scripted.
/// </summary>
@@ -235,6 +317,12 @@ namespace Microsoft.SqlTools.ServiceLayer.Scripting.Contracts
/// </remarks>
public bool? ScriptIndexes { get; set; } = true;
/// <summary>
/// Returns the value of ScriptIndexes Property
/// </summary>
public bool? DriIndexes { get { return ScriptIndexes; } }
/// <summary>
/// Script the primary keys for each table or view scripted
/// </summary>
@@ -243,11 +331,23 @@ namespace Microsoft.SqlTools.ServiceLayer.Scripting.Contracts
/// </remarks>
public bool? ScriptPrimaryKeys { get; set; } = true;
/// <summary>
/// Returns the value of ScriptPrimaryKeys Property
/// </summary>
public bool? DriPrimaryKey { get { return ScriptPrimaryKeys; } }
/// <summary>
/// Script the triggers for each table or view scripted
/// </summary>
public bool? ScriptTriggers { get; set; } = true;
/// <summary>
/// Returns the value of ScriptTriggers Property
/// </summary>
public bool? Triggers { get { return ScriptTriggers; } }
/// <summary>
/// Script the unique keys for each table or view scripted.
/// </summary>
@@ -255,5 +355,11 @@ namespace Microsoft.SqlTools.ServiceLayer.Scripting.Contracts
/// The default value is true.
/// </remarks>
public bool? UniqueKeys { get; set; } = true;
/// <summary>
/// Returns the value of UniqueKeys Property
/// </summary>
public bool? DriUniqueKeys { get { return UniqueKeys; } }
}
}