Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding support and tests for virtual property count.
- Loading branch information
1 parent
2ef3fc9
commit c0c6006
Showing
10 changed files
with
125 additions
and
3 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
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
27 changes: 27 additions & 0 deletions
27
src/Microsoft.OData.Core/UriParser/SemanticAst/CountVirtualPropertyNode.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,27 @@ | ||
using Microsoft.OData.Edm; | ||
|
||
namespace Microsoft.OData.UriParser | ||
{ | ||
/// <summary> | ||
/// Dummy class that allows virtual property $count | ||
/// to work like any other aggregation method. | ||
/// </summary> | ||
public sealed class CountVirtualPropertyNode : SingleValueNode | ||
{ | ||
public CountVirtualPropertyNode() { } | ||
|
||
public override QueryNodeKind Kind | ||
{ | ||
get | ||
{ | ||
return QueryNodeKind.None; | ||
} | ||
} | ||
|
||
public override IEdmTypeReference TypeReference { | ||
get { | ||
return EdmCoreModel.Instance.GetPrimitive(EdmPrimitiveTypeKind.Int64, false); | ||
} | ||
} | ||
} | ||
} |
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