forked from mongodb/mongo-csharp-driver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRelease Notes v0.9.txt
198 lines (193 loc) · 7.81 KB
/
Release Notes v0.9.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
C# Driver Version 0.9 Release Notes
Summary:
Simplified and improved serialization
(see IBsonSerializable and IBsonSerializer)
Serialization support for more .NET classes (including Dictionary)
Many bug fixes and usability enhancements
Some classes now immutable (MongoServer, MongoDatabase, etc...)
Other classes become immutable after Freeze is called
Redesigned low level I/O classes (to simplify serialization)
Improved compile time type safety
BSON Library Changes:
ArraySerializer
is now a generic serializer
serializers for 1-3 dimensional arrays
BsonBuffer
Read/WriteObjectId changed to match new ObjectId internal representation
added Skip and SkipCString methods
BsonClassMap
added Freeze method (immutable once frozen)
added SetIdMember method
added UnmapField, UnmapMember and UnmapProperty methods
BsonClassMapSerializer
Support new GetDocumentId/SetDocumentId methods
BsonDefaultSerializer
GetSerializer method
return serializers for 1-3 dimensional arrays
return serializer for enums
if invalid serialization options were provided use default options
BsonDocument
renamed Count to ElementCount
BsonDocumentWrapper
wrap nominalType also
added CreateMultiple method
BsonElement
moved serialization logic to BsonValue
BsonMemberMap
added SetRepresentation method
better error messages for missing get/set accessors
BsonObjectId
changed to match new ObjectId internal representation
BsonReader (and BsonBinaryReader)
added CurrentBsonType property
removed HasElement and PeekBsonType (were causing duplicate reads)
revised bookmark API (GetBookmark/ReturnToBookmark)
element name and value can now be read separately
(needed to unify DeserializeDocument/DeserializeElement)
ReadObjectId changed to match new ObjectId internal representation
added SkipName and SkipValue methods
added ReadBsonType and ReadName methods
added new array methods (ReadStartArray, ReadEndArray)
separated Bookmark class from Context class
BsonRegularExpression
detects options in pattern (e.g. "/Hello/i")
BsonSerializer
Same changes as IBsonSerializer
Added RegisterIdConvention (moved from BsonDefaultSerializer)
BsonValue
added serialization logic (moved from BsonElement)
BsonWriter (and BsonBinaryWriter, BsonJsonWriter)
element name and value can now be written separately
(needed to unify SerializeDocument/SerializeElement)
added WriteName method
WriteObjectId changed to match new ObjectId internal representation
added new array methods (WriteStartArray, WriteEndArray)
Document ID detection and handling
replaced DocumentHasIdMember, DocumentHasIdValue and GenerateDocumentId
with GetDocumentId and SetDocumentId
IBsonIdGeneratorConvention
shortened to IIdGeneratorConvention
IBsonSerializable/IBsonSerializer
Document/Element distinction removed from serialization
DeserializeDocument/DeserializeElement now just Deserialize
SerializeDocument/SerializeElement now just Serialize
IDiscriminatorConvention
GetActualDocumentType/GetActualElementType combined into single GetActualType
Improved Enum serialization
added 64 bit representation
forgiving deserialization automatically converts between numeric types
doubles supported during deserialization (JavaScript related)
New IdGenerators
NullIdChecker
ZeroIdChecker
Nullable type serialization
now uses a generic serializer
ObjectId
new internal representation:
int: timestamp
int: machine (only low order 3 bytes used)
short: pid
int: increment (only low order 3 bytes used)
new representation is much more efficient (no shifting and masking)
new representation serializes correctly to JavaScript clients
only two bytes larger (and additional bytes are not on heap but embedded in object)
PublicMemberFinderConvention
ignore indexers
ignore overridden properties (base class already serializes them)
Serialization support for additional .NET classes
legacy Dictionary classes
generic Dictionary classess
BitArray
ByteArray
Uri
Version
Driver Changes:
Builders
Most have a Null static property
All have a new Wrap method (see marker interfaces)
CommandResult (and subclasses)
Subclass of BsonDocument
Holds results of RunCommand
Subclasses used to pick out details of results in a type safe way
MongoCollection
Improved compile time type safety
Replaced TQuery with IMongoQuery
Replaced TIndexKeys/Options with IMongoIndexKeys/Options
Replaced TSortBy with IMongoSortBy
Replaced TUpdate with IMongoUpdate
Replaced TFields with IMongoFields
Replaced TGroupBy with IMongoGroupBy
Update methods now return a SafeModeResult
Added FindOneById and FindOneByIdAs
GetStats now returns CollectionStatsResult
Implemented GetTotalDataSize and GetTotalStorageSize
Fixed IdGenerator related bugs
MongoCommandException
CommandResult is now added to Data property
MongoConnection
Use IPEndPoint instead of MongoServerAddress
new RunCommand internal helper method
MongoConnectionPool
use IPEndPoint instead of MongoServerAddress
moved RequestStart/Done to MongoServer
MongoConnectionSettings removed
a similar class is MongoUrlBuilder
MongoCursor
Type is now MongoCursor<TDocument> not MongoCursor<TQuery, TDocument>
SetFields parameter is now IMongoFields
SetSortOrder parameter is now IMongoSortBy
Added support to distribute reads to replica set secondaries when slaveok=true
MongoDatabase
Now immutable (e.g. can't change SafeMode once created)
Route commands to primary even when slaveok=true
RunCommand parameter now IMongoCommand
RunCommand now returns CommandResult
RunCommandAs used to return subclass of CommandResult
GetStats now returns DatabaseStatsResult
MongoDelete/Insert/Query/UpdateMessage
Replaced TQuery with IMongoQuery
Replaced TFields with IMongoFields
Replaced TUpdate with IMongoUpdate
MongoGridFS
Immutable (e.g. can't change SafeMode once created)
Replace TQuery with IMongoQuery
New methods: AppendText, CopyTo, Create, CreateText, ExistsById, FindOneById, FindAll,
MoveTo, Open, OpenRead, OpenText, OpenWrite, SetAliases, SetContentType, SetMetadata
(note: not all implemented yet)
MongoGridFSCreateOptions
Used when creating new MongoGridFSStreams
MongoGridFSFileInfo
Added Aliases, ContentType and Metadata
Implemented !=, ==
Implemented GetHashcode, Equals (can be used as Dictionary key)
MongoGridFSSettings
Added Freeze method
MongoGridFSStream
Initial implementation of Stream interface to GridFS files
MongoServer
Now immutable (e.g. can't change SafeMode once created)
MongoUrl is used as identity of server instance
Support multiple connection pools (used when distributing reads to secondaries)
Added support for connection modes: direct and replica set
Added RequestStart/RequestDone (moved from MongoConnectionPool)
RunAdminCommand parameter now IMongoCommnad
RunAdminCommand now returns CommandResult
RunAdminCommandAs used to return subclass of CommandResult
MongoUrl
Support new connection string options
Immutable
Implements GetHashcode and Equals (can be used as Dictionary key)
MongoUrlBuilder
Used to build MongoUrls
Mutable
New connection mode classes
DirectConnector and ReplicaConnector
classes encapsulate connection mode logic
New marker interfaces
These are used to give parameters strong types while still allowing
many actual types to be used as arguments
Each marker interface has a new subclass of BsonDocument
Each marker interface has a new wrapper class
Replaces unconstrained generic type parameters
QueryFlags
Enum values were all wrong (shifted one bit to the right)