{{ message }}
Repository navigation
Commit 4b7e0af
Merge commits until 161.8817.2 nuget version (microsoft#41)
* Merged PR 1046749: Removing warnings for missing xml doc in test projects
Removing warnings for missing xml doc in test projects
* Merged PR 1048435: Defining a new property for AST.XML for connecting a single item to a collection
Sometimes we need to change an existing SQL object property, which we already have support in Scriptdom, from one item property to a collection. This PR introduces a new property for AST file for adding a collection and connecting it to the existing property. This is to make sure we don't introduce breaking changes in. So using this new feature, we add a new collection and keep the current property but set CollectionFirstItem to true so in the generated file it gets and sets the first value of the collection.
This is how generated code will look like using the new xml property:
` private List<Identifier> _distributionColumns = new List<Identifier>();
/// <summary>
/// The column reference in the HASH option for a table distribution policy.
/// </summary>
public IList<Identifier> DistributionColumns
{
get { return _distributionColumns; }
}
/// <summary>
/// The column reference in the HASH option for a table distribution policy.
/// </summary>
public Identifier DistributionColumn
{
get { return DistributionColumns.Count > 0 ? DistributionColumns[0] : null; }
set
{
if (DistributionColumns.Count == 0)
{
DistributionColumns.Add(value);
}
else
{
DistributionColumns[0] = value;
}
}
}`
* Merged PR 1050712: Multiple Column Distribution Support in ScriptDom for Dw SqlTable
Multiple Column Distribution Support in ScriptDom for Dw SqlTable
1. Added DistributionColumns member with Collection="true" attribute in TableHashDistributionPolicy class in AST.xml
2. CollectionFirstItem="true" attribute added in DistributionColumn member of TableHashDistributionPolicy class in AST.xml
3. tableHashDistributionPolicy updated with multiple columns(AddAndUpdateTokenInfo) in TSql130.g,TSql140.g,TSql150.g and TSql160.g
4. SqlScriptGeneratorVisitor.TableHashDistributionPolicy is modified with DistributionColumns
5. Modified CreateTableGeneratedAlwaysNegativeTest test method in ParserErrorsTests.cs DISTRIBUTION = HASH(COL1,,COL2)
5. Added create table scripts with MCD in following scripts files
a. CreateTableTests*.sql in Baselines* and TestScripts folder.
Related work items: #2346322
* Merged PR 1051494: Adding NetStandard2.0 target
Adding NetStandard2.0 target
---------
Co-authored-by: Leila Lali <llali@microsoft.com>
Co-authored-by: Elavarasan Dhayalan <v-edhayalan@microsoft.com>1 parent 7ffc71e commit 4b7e0af
26 files changed
Lines changed: 381 additions & 39 deletions
File tree
- SqlScriptDom
- Parser/TSql
- ScriptDom/SqlServer/ScriptGenerator
- Test
- AssemblyTools
- SqlDom
- Baselines130
- Baselines140
- Baselines150
- Baselines160
- TestScripts
- tools/AstGen
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2697 | 2697 | | |
2698 | 2698 | | |
2699 | 2699 | | |
2700 | | - | |
| 2700 | + | |
| 2701 | + | |
2701 | 2702 | | |
2702 | 2703 | | |
2703 | 2704 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25173 | 25173 | | |
25174 | 25174 | | |
25175 | 25175 | | |
25176 | | - | |
25177 | | - | |
25178 | | - | |
25179 | | - | |
25180 | | - | |
25181 | | - | |
25182 | | - | |
25183 | | - | |
25184 | | - | |
25185 | | - | |
| 25176 | + | |
| 25177 | + | |
| 25178 | + | |
| 25179 | + | |
| 25180 | + | |
| 25181 | + | |
| 25182 | + | |
| 25183 | + | |
| 25184 | + | |
| 25185 | + | |
| 25186 | + | |
| 25187 | + | |
| 25188 | + | |
| 25189 | + | |
| 25190 | + | |
| 25191 | + | |
| 25192 | + | |
| 25193 | + | |
25186 | 25194 | | |
25187 | 25195 | | |
25188 | 25196 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25741 | 25741 | | |
25742 | 25742 | | |
25743 | 25743 | | |
25744 | | - | |
25745 | | - | |
25746 | | - | |
25747 | | - | |
25748 | | - | |
25749 | | - | |
25750 | | - | |
25751 | | - | |
25752 | | - | |
25753 | | - | |
| 25744 | + | |
| 25745 | + | |
| 25746 | + | |
| 25747 | + | |
| 25748 | + | |
| 25749 | + | |
| 25750 | + | |
| 25751 | + | |
| 25752 | + | |
| 25753 | + | |
| 25754 | + | |
| 25755 | + | |
| 25756 | + | |
| 25757 | + | |
| 25758 | + | |
| 25759 | + | |
| 25760 | + | |
| 25761 | + | |
25754 | 25762 | | |
25755 | 25763 | | |
25756 | 25764 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26572 | 26572 | | |
26573 | 26573 | | |
26574 | 26574 | | |
26575 | | - | |
| 26575 | + | |
26576 | 26576 | | |
26577 | 26577 | | |
26578 | | - | |
26579 | 26578 | | |
26580 | 26579 | | |
| 26580 | + | |
| 26581 | + | |
| 26582 | + | |
| 26583 | + | |
| 26584 | + | |
| 26585 | + | |
| 26586 | + | |
| 26587 | + | |
| 26588 | + | |
26581 | 26589 | | |
26582 | 26590 | | |
26583 | 26591 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26802 | 26802 | | |
26803 | 26803 | | |
26804 | 26804 | | |
26805 | | - | |
| 26805 | + | |
26806 | 26806 | | |
26807 | 26807 | | |
26808 | | - | |
26809 | 26808 | | |
26810 | 26809 | | |
| 26810 | + | |
| 26811 | + | |
| 26812 | + | |
| 26813 | + | |
| 26814 | + | |
| 26815 | + | |
| 26816 | + | |
| 26817 | + | |
| 26818 | + | |
26811 | 26819 | | |
26812 | 26820 | | |
26813 | 26821 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
17 | 22 | | |
18 | 23 | | |
19 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
612 | 612 | | |
613 | 613 | | |
614 | 614 | | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |

0 commit comments