// // 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.ServiceLayer.Formatter; using Newtonsoft.Json; using Newtonsoft.Json.Converters; namespace Microsoft.SqlTools.ServiceLayer.SqlContext { /// /// Contract for receiving formatter-specific settings as part of workspace settings /// public class FormatterSettings { /// /// Should names be escaped, for example converting dbo.T1 to [dbo].[T1] /// public bool? UseBracketForIdentifiers { get; set; } /// /// Should comma separated lists have the comma be at the start of a new line. /// /// CREATE TABLE T1 ( /// C1 INT /// , C2 INT) /// /// public bool? PlaceCommasBeforeNextStatement { get; set; } /// /// Should each reference be on its own line or should references to multiple objects /// be kept on a single line /// /// SELECT * /// FROM T1, /// T2 /// /// public bool? PlaceSelectStatementReferencesOnNewLine { get; set; } /// /// Should keyword casing be ignored, converted to all uppercase, or /// converted to all lowercase /// [JsonConverter(typeof(StringEnumConverter))] public CasingOptions KeywordCasing { get; set; } /// /// Should data type casing be ignored, converted to all uppercase, or /// converted to all lowercase /// [JsonConverter(typeof(StringEnumConverter))] public CasingOptions DatatypeCasing { get; set; } /// /// Should column definitions be aligned or left non-aligned? /// public bool? AlignColumnDefinitionsInColumns { get; set; } } }