File tree 2 files changed +12
-0
lines changed
src/MongoDB.Driver.Core/Core/Misc
tests/MongoDB.Driver.Tests/Linq/Linq3ImplementationTests/Jira
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ public class Feature
69
69
private static readonly Feature __findAndModifyWriteConcern = new Feature ( "FindAndModifyWriteConcern" , WireVersion . Server32 ) ;
70
70
private static readonly Feature __findCommand = new Feature ( "FindCommand" , WireVersion . Server32 ) ;
71
71
private static readonly Feature __geoNearCommand = new Feature ( "GeoNearCommand" , WireVersion . Zero , WireVersion . Server42 ) ;
72
+ private static readonly Feature __getField = new Feature ( "GetField" , WireVersion . Server50 ) ;
72
73
private static readonly Feature __getMoreComment = new Feature ( "GetMoreComment" , WireVersion . Server44 ) ;
73
74
private static readonly Feature __groupCommand = new Feature ( "GroupCommand" , WireVersion . Zero , WireVersion . Server42 ) ;
74
75
private static readonly Feature __hedgedReads = new Feature ( "HedgedReads" , WireVersion . Server44 ) ;
@@ -369,6 +370,11 @@ public class Feature
369
370
/// </summary>
370
371
public static Feature GeoNearCommand => __geoNearCommand ;
371
372
373
+ /// <summary>
374
+ /// Gets the getField feature.
375
+ /// </summary>
376
+ public static Feature GetField => __getField ;
377
+
372
378
/// <summary>
373
379
/// Gets the getMore comment feature.
374
380
/// </summary>
Original file line number Diff line number Diff line change 16
16
using System . Linq ;
17
17
using FluentAssertions ;
18
18
using MongoDB . Bson ;
19
+ using MongoDB . Driver . Core . Misc ;
20
+ using MongoDB . Driver . Core . TestHelpers . XunitExtensions ;
19
21
using Xunit ;
20
22
21
23
namespace MongoDB . Driver . Tests . Linq . Linq3ImplementationTests . Jira
@@ -48,6 +50,8 @@ public void Should_not_use_getField(string fieldName)
48
50
[ InlineData ( "a." ) ]
49
51
public void Should_use_getField ( string fieldName )
50
52
{
53
+ RequireServer . Check ( ) . Supports ( Feature . GetField ) ;
54
+
51
55
var collection = GetCollection < BsonDocument > ( ) ;
52
56
CreateCollection ( collection , new BsonDocument ( fieldName , 123 ) ) ;
53
57
var queryable = collection . AsQueryable ( )
@@ -67,6 +71,8 @@ public void Should_use_getField(string fieldName)
67
71
[ InlineData ( "$a$" ) ]
68
72
public void Should_use_getField_with_literal ( string fieldName )
69
73
{
74
+ RequireServer . Check ( ) . Supports ( Feature . GetField ) ;
75
+
70
76
var collection = GetCollection < BsonDocument > ( ) ;
71
77
CreateCollection ( collection , new BsonDocument ( fieldName , 123 ) ) ;
72
78
var queryable = collection . AsQueryable ( )
You can’t perform that action at this time.
0 commit comments