You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Docs/reference/content/index.md
+2-5Lines changed: 2 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,14 +10,11 @@ type = "index"
10
10
The [Getting Started]({{< relref "getting_started\index.md" >}}) guide contains information about system requirements, installation, and a simple tutorial to get up and running quickly.
11
11
12
12
13
-
## What's new in 2.3
13
+
## What's new in 2.4
14
14
15
15
The [What's New]({{< relref "what_is_new.md" >}}) section contains the major new features of the driver.
16
16
17
-
The main new feature is support for .NET Core.
18
-
19
-
The Nuget packages target two versions of the .NET frameworks: net45 and netstandard1.5. The net45 target allows the driver to be used with the full .NET Framework
20
-
version 4.5 and later, and the netstandard1.5 target allows the driver to be used with any framework that supports netstandard1.5, which includes .NET Core 1.0.
17
+
The main new feature is support for version 3.4 of the server.
Copy file name to clipboardExpand all lines: Docs/reference/content/what_is_new.md
+117-6Lines changed: 117 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,13 +8,124 @@ title = "What's New"
8
8
pre = "<i class='fa fa-star'></i>"
9
9
+++
10
10
11
-
## What's new in 2.3
11
+
## What's new in 2.4.0
12
12
13
-
The 2.3.0 driver is a minor release with few new features. The most notable is discussed below.
13
+
The 2.4.0 driver is a minor release that adds support for new features introduced in server 3.4 and fixes bugs reported since 2.3.0 was released.
14
14
15
-
##Support for .NET Core
15
+
### Decimal128 data type
16
16
17
-
You can now use the .NET driver with .NET Core.
17
+
Server 3.4 introduces the new decimal BSON data type. Version 2.4.0 of the .NET Driver adds support for the decimal BSON data type with the new BsonDecimal128
18
+
and Decimal128 classes. BsonDecimal128 is the subclass of BsonValue for Decimal128 values, and the Decimal128 struct holds the actual value. This is the same
19
+
relationship that exists between the BsonObjectId and ObjectId classes.
18
20
19
-
The Nuget packages target two versions of the .NET frameworks: net45 and netstandard1.5. The net45 target allows the driver to be used with the full .NET Framework
20
-
version 4.5 and later, and the netstandard1.5 target allows the driver to be used with any framework that supports netstandard1.5, which includes .NET Core 1.0.
21
+
There are no arithmetic operations provided on Decimal128 values, but Decimal128 values can be converted to C# decimal or double values and you can operate on those.
22
+
23
+
### New convention for automapping immutable classes for serialization
24
+
25
+
The new ImmutableTypeClassMapConvention supports automapping immutable classes for automatic serialization using the BsonClassMapSerializer.
26
+
27
+
### EnumRepresentationConvention now applies to nullable enums also
28
+
29
+
The EnumRepresentationConvention can be used to specify the representation of enum values, but prior to 2.4.0 it did not apply to nullable enums.
30
+
This convention has been enhanced to apply to both nullable and regular enums.
31
+
32
+
### Drivers now identify themselves to the server when connecting
33
+
34
+
Drivers now identify themselves to the server when they connect and this information is logged by the server. Applications can add an application name to the
35
+
information sent to the server, either by adding "applicationName=xyz" to the connection string or by using the ApplicationName property of MongoClientSettings.
36
+
37
+
### ReadPreference support for MaxStaleness
38
+
39
+
ReadPreference has a new MaxStaleness property that can be used when reading from secondaries to prevent reading from secondaries that are too far behind the primary.
40
+
41
+
### New Linearizable ReadConcernLevel
42
+
43
+
There is a new ReadConcernLevel called Linearizable in addition to the existing Local and Majority levels. You specify the read concern level by assigning a value to
44
+
the ReadConcernLevel property of a ReadConcern value.
45
+
46
+
### Support for collations
47
+
48
+
The following database methods now support collations:
49
+
50
+
- CreateCollection/CreateCollectionAsync
51
+
52
+
The following collection methods now support collations:
53
+
54
+
- Aggregate fluent API
55
+
- Aggregate/AggregateAsync
56
+
- BulkWrite/BulkWriteAsync
57
+
- Count/CountAsync
58
+
- DeleteMany/DeleteManyAsync
59
+
- DeleteOne/DeleteOneAsync
60
+
- Distinct/DistincAsync
61
+
- Find fluent API
62
+
- FindSync/FindAsync
63
+
- FindOneAndDelete/FindOneAndDeleteAsync
64
+
- FindOneAndReplace/FindOneAndReplaceAsync
65
+
- FindOneAndUpdate/FindOneAndUpdateAsync
66
+
- MapReduce/MapReduceAsync
67
+
- ReplaceOne/ReplaceOneAsync
68
+
- UpdateMany/UpdateManyAsync
69
+
- UpdateOne/UpdateOneAsync
70
+
71
+
The following index management metods now support collations:
72
+
73
+
- CreateMany/CreateManyAsync
74
+
75
+
All new methods support collations where appropriate as well.
76
+
77
+
### Support for creating read-only views
78
+
79
+
The IMongoDatabase interface has new CreateView/CreateViewAsync methods that support creating read-only views.
80
+
81
+
### Support for new aggregation framework pipeline operators
82
+
83
+
The aggregate fluent API supports the following new aggregation pipeline operators:
84
+
85
+
- Bucket ($bucket)
86
+
- BucketAuto ($bucketAuto)
87
+
- Count ($count)
88
+
- Facet ($facet)
89
+
- GraphLookup ($graphLookup)
90
+
- ReplaceRoot ($replaceRoot)
91
+
- SortByCount ($sortByCount)
92
+
93
+
LINQ now supports the following additional LINQ methods and maps them to equivalent aggregation pipeline operator(s):
94
+
95
+
- Aggregate ($reduce)
96
+
- Average ($avg)
97
+
- IndexOf ($indexOfBytes or $indexOfCP)
98
+
- Length ($strLenBytes or $strLenCP)
99
+
- Range ($range)
100
+
- Reverse ($reverseArray)
101
+
- Split ($split)
102
+
- Substr ($substr or $substrCP)
103
+
- Zip ($zip)
104
+
105
+
### New Aggregate Pipeline and Stage builders
106
+
107
+
In earlier versions of the driver the aggregate fluent API had methods supporting creating a pipeline to be
108
+
executed when the aggregate fluent object was executed, but there was no way to build a standalone pipeline value.
109
+
110
+
With the introduction of the CreateView method and Facet pipeline operators there is now a need to create
111
+
pipelines separately from the aggregate fluent API.
112
+
113
+
The new PipelineDefinitionBuilder class can be used to create pipelines.
114
+
115
+
### Aggregate and LINQ expressions now use the underlying field serializer to serialize constant values
116
+
117
+
When building pipelines and converting LINQ expressions to pipelines constants are now serialized using the
118
+
underlying field serializer so that the values are serialized the same way that they are stored in the database.
119
+
120
+
### ClusterRegistry has a new UnregisterAndDisposeCluster method
121
+
122
+
Normally the driver creates a pool of connections to a server the first time that server is used. This is
123
+
advantageous because it speeds up subsequent uses of that server since there are already open connections
124
+
that can be re-used.
125
+
126
+
But sometimes users write applications that connect to hundreds of servers. If these applications only use
127
+
these servers for a brief period of time and then don't use them anymore the resulting connection pool will
128
+
continue to hold a number of open connections that are no longer needed.
129
+
130
+
If you find yourself needing to shut down a connection pool you can use the new UnregisterAndDisposeCluster
0 commit comments