-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Fixes #1126: enable built-in expression in $orderby * Fixes the failing test case * Add the comments * Update src/Microsoft.AspNetCore.OData/Query/Validator/OrderByQueryValidator.cs Co-authored-by: John Gathogo <john.gathogo@microsoft.com> * Apply suggestions from code review Co-authored-by: John Gathogo <john.gathogo@microsoft.com> --------- Co-authored-by: John Gathogo <john.gathogo@microsoft.com>
- Loading branch information
Showing
26 changed files
with
1,626 additions
and
76 deletions.
There are no files selected for viewing
248 changes: 247 additions & 1 deletion
248
src/Microsoft.AspNetCore.OData/Microsoft.AspNetCore.OData.xml
Large diffs are not rendered by default.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
src/Microsoft.AspNetCore.OData/Properties/SRResources.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
37 changes: 37 additions & 0 deletions
37
src/Microsoft.AspNetCore.OData/Query/Nodes/OrderByClauseNode.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,37 @@ | ||
//----------------------------------------------------------------------------- | ||
// <copyright file="OrderByClauseNode.cs" company=".NET Foundation"> | ||
// Copyright (c) .NET Foundation and Contributors. All rights reserved. | ||
// See License.txt in the project root for license information. | ||
// </copyright> | ||
//------------------------------------------------------------------------------ | ||
|
||
using Microsoft.OData.UriParser; | ||
|
||
namespace Microsoft.AspNetCore.OData.Query | ||
{ | ||
/// <summary> | ||
/// Represents the order by expression in the $orderby clause. | ||
/// Use this to represent other $orderby except 'Property,OpenProperty,$count, $it' orderBy expression. | ||
/// </summary> | ||
/// <remarks> | ||
/// Again, in the next major release, we don't need this class. | ||
/// Track on it at: https://github.com/OData/AspNetCoreOData/issues/1153 | ||
/// </remarks> | ||
public class OrderByClauseNode : OrderByNode | ||
{ | ||
/// <summary> | ||
/// Instantiates a new instance of <see cref="OrderByClauseNode"/> class. | ||
/// </summary> | ||
/// <param name="orderByClause">The order by clause.</param> | ||
public OrderByClauseNode(OrderByClause orderByClause) | ||
: base(orderByClause) | ||
{ | ||
OrderByClause = orderByClause; | ||
} | ||
|
||
/// <summary> | ||
/// Gets the <see cref="OrderByClause"/> of this node. | ||
/// </summary> | ||
public OrderByClause OrderByClause { get; } | ||
} | ||
} |
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
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.