table designer - support indexes and write operations (#1363)

* support indexes

* column properties
This commit is contained in:
Alan Ren
2022-01-18 17:15:22 -08:00
committed by GitHub
parent 01ab08fd6d
commit 1cdb2b94ac
9 changed files with 646 additions and 80 deletions

View File

@@ -0,0 +1,32 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Newtonsoft.Json;
namespace Microsoft.SqlTools.ServiceLayer.TableDesigner.Contracts
{
/// <summary>
/// The view model of index.
/// </summary>
public class IndexViewModel : ObjectViewModelBase
{
public CheckBoxProperties Enabled { get; set; } = new CheckBoxProperties();
public CheckBoxProperties IsClustered { get; set; } = new CheckBoxProperties();
public CheckBoxProperties IsUnique { get; set; } = new CheckBoxProperties();
public InputBoxProperties ColumnsDisplayValue { get; set; } = new InputBoxProperties();
public TableComponentProperties<IndexedColumnSpecification> Columns { get; set; } = new TableComponentProperties<IndexedColumnSpecification>();
}
public class IndexedColumnSpecification
{
public DropdownProperties Column { get; set; } = new DropdownProperties();
public CheckBoxProperties Ascending { get; set; } = new CheckBoxProperties();
}
}

View File

@@ -22,6 +22,8 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner.Contracts
public TableComponentProperties<CheckConstraintViewModel> CheckConstraints { get; set; } = new TableComponentProperties<CheckConstraintViewModel>();
public TableComponentProperties<IndexViewModel> Indexes { get; set; } = new TableComponentProperties<IndexViewModel>();
public InputBoxProperties Script { get; set; } = new InputBoxProperties();
}
}