-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into users/sourabhjain/addpatchsupport
- Loading branch information
Showing
16 changed files
with
1,473 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
src/Core/Models/MultipleMutationEntityInputValidationContext.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
namespace Azure.DataApiBuilder.Core.Models | ||
{ | ||
/// <summary> | ||
/// Class to represent input for an entity in a multiple-create request. | ||
/// </summary> | ||
public class MultipleMutationEntityInputValidationContext | ||
{ | ||
/// <summary> | ||
/// Current entity name. | ||
/// </summary> | ||
public string EntityName { get; } | ||
|
||
/// <summary> | ||
/// Parent entity name. For the topmost entity, this will be set as an empty string. | ||
/// </summary> | ||
public string ParentEntityName { get; } | ||
|
||
/// <summary> | ||
/// Set of columns in the current entity whose values are derived from insertion in the parent entity | ||
/// (i.e. parent entity would have been the referenced entity). | ||
/// For the topmost entity, this will be an empty set.</param> | ||
/// </summary> | ||
public HashSet<string> ColumnsDerivedFromParentEntity { get; } | ||
|
||
/// <summary> | ||
/// Set of columns in the current entity whose values are to be derived from insertion in the entity or its subsequent | ||
/// referenced entities and returned to the parent entity so as to provide values for the corresponding referencing fields | ||
/// (i.e. parent entity would have been the referencing entity) | ||
/// For the topmost entity, this will be an empty set. | ||
/// </summary> | ||
public HashSet<string> ColumnsToBeDerivedFromEntity { get; } | ||
|
||
public MultipleMutationEntityInputValidationContext( | ||
string entityName, | ||
string parentEntityName, | ||
HashSet<string> columnsDerivedFromParentEntity, | ||
HashSet<string> columnsToBeDerivedFromEntity) | ||
{ | ||
EntityName = entityName; | ||
ParentEntityName = parentEntityName; | ||
ColumnsDerivedFromParentEntity = columnsDerivedFromParentEntity; | ||
ColumnsToBeDerivedFromEntity = columnsToBeDerivedFromEntity; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.