// // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. // namespace Microsoft.SqlTools.ServiceLayer.Scripting.Contracts { /// /// Defines the scripting options. /// public class ScriptOptions { /// /// Generate ANSI padding statements /// public virtual bool? ScriptAnsiPadding { get; set; } = false; /// /// Append the generated script to a file /// public virtual bool? AppendToFile { get; set; } = false; /// /// Continue to script if an error occurs. Otherwise, stop. /// /// /// The default is true. /// public virtual bool? ContinueScriptingOnError { get; set; } = true; /// /// Convert user-defined data types to base types. /// public virtual bool? ConvertUDDTToBaseType { get; set; } = false; /// /// Generate script for dependent objects for each object scripted. /// /// /// The default is false. /// public virtual bool? GenerateScriptForDependentObjects { get; set; } = false; /// /// Include descriptive headers for each object generated. /// /// /// The default is true. /// public virtual bool? IncludeDescriptiveHeaders { get; set; } = true; /// /// 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. /// public virtual bool? IncludeIfNotExists { get; set; } = false; /// /// Script options to set vardecimal storage format. /// public virtual bool? IncludeVarDecimal { get; set; } = true; /// /// Include system generated constraint names to enforce declarative referential integrity. /// public virtual bool? ScriptDriIncludeSystemNames { get; set; } = false; /// /// Include statements in the script that are not supported on the specified SQL Server database engine type. /// public virtual bool? IncludeUnsupportedStatements { get; set; } = true; /// /// Prefix object names with the object schema. /// /// /// The default is true. /// public virtual bool? SchemaQualify { get; set; } = true; /// /// Script options to set bindings option. /// public virtual bool? Bindings { get; set; } = false; /// /// Script the objects that use collation. /// public virtual bool? Collation { get; set; } = false; /// /// Script the default values. /// /// /// The default is true. /// public virtual bool? Default { get; set; } = true; /// /// Script Object CREATE/DROP statements. /// Possible values: /// ScriptCreate /// ScriptDrop /// ScriptCreateDrop /// /// /// The default is ScriptCreate. /// public virtual string ScriptCreateDrop { get; set; } = "ScriptCreate"; /// /// Script the Extended Properties for each object scripted. /// /// /// The default is true. /// public virtual bool? ScriptExtendedProperties { get; set; } = true; /// /// Script only features compatible with the specified version of SQL Server. Possible values: /// Script90Compat /// Script100Compat /// Script105Compat /// Script110Compat /// Script120Compat /// Script130Compat /// Script140Compat /// Script150Compat /// /// /// The default is Script140Compat. /// public virtual string ScriptCompatibilityOption { get; set; } = "Script140Compat"; /// /// Script only features compatible with the specified SQL Server database engine type. /// Possible Values: /// SingleInstance /// SqlAzure /// public virtual string TargetDatabaseEngineType { get; set; } = "SingleInstance"; /// /// Script only features compatible with the specified SQL Server database engine edition. /// Possible Values: /// SqlServerPersonalEdition /// SqlServerStandardEdition /// SqlServerEnterpriseEdition /// SqlServerExpressEdition /// SqlAzureDatabaseEdition /// SqlDatawarehouseEdition /// SqlServerStretchEdition /// SqlManagedInstanceEdition /// public virtual string TargetDatabaseEngineEdition { get; set; } = "SqlServerEnterpriseEdition"; /// /// Script all logins available on the server. Passwords will not be scripted. /// public virtual bool? ScriptLogins { get; set; } = false; /// /// Generate object-level permissions. /// public virtual bool? ScriptObjectLevelPermissions { get; set; } = false; /// /// Script owner for the objects. /// public virtual bool? ScriptOwner { get; set; } = false; /// /// Script statistics, and optionally include histograms, for each selected table or view. /// Possible values: /// ScriptStatsNone /// ScriptStatsDDL /// ScriptStatsAll /// /// /// The default value is ScriptStatsNone. /// public virtual string ScriptStatistics { get; set; } = "ScriptStatsNone"; /// /// Generate USE DATABASE statement. /// public virtual bool? ScriptUseDatabase { get; set; } = true; /// /// Generate script that contains schema only or schema and data. /// Possible Values: /// SchemaAndData /// DataOnly /// SchemaOnly /// /// /// The default value is SchemaOnly. /// public virtual string TypeOfDataToScript { get; set; } = "SchemaOnly"; /// /// Scripts the change tracking information. /// public virtual bool? ScriptChangeTracking { get; set; } = false; /// /// Script the check constraints for each table or view scripted. /// /// /// The default value is true. /// public virtual bool? ScriptCheckConstraints { get; set; } = true; /// /// Scripts the data compression information. /// public virtual bool? ScriptDataCompressionOptions { get; set; } = false; /// /// Script the foreign keys for each table scripted. /// /// /// The default value is true. /// public virtual bool? ScriptForeignKeys { get; set; } = true; /// /// Script the full-text indexes for each table or indexed view scripted. /// public virtual bool? ScriptFullTextIndexes { get; set; } = true; /// /// Script the indexes (including XML and clustered indexes) for each table or indexed view scripted. /// /// /// The default value is true. /// public virtual bool? ScriptIndexes { get; set; } = true; /// /// Script the primary keys for each table or view scripted /// /// /// The default value is true. /// public virtual bool? ScriptPrimaryKeys { get; set; } = true; /// /// Script the triggers for each table or view scripted /// public virtual bool? ScriptTriggers { get; set; } = true; /// /// Script the unique keys for each table or view scripted. /// /// /// The default value is true. /// public virtual bool? UniqueKeys { get; set; } = true; } }