rstam
|
d2b72a19c9
|
Implemented DictionaryGenericSerializer.
|
15 years ago |
rstam
|
dfd0a07b34
|
Implemented DictionarySerializer.
|
15 years ago |
rstam
|
4afb1fbd05
|
Added more explicit mappings to MapToBsonValue and added unit tests for this overload of MapToBsonValue.
|
15 years ago |
rstam
|
3bcbd156ec
|
Added support for Enums to BsonTypeMapper. Added unit tests for BsonTypeMapper.
|
15 years ago |
rstam
|
720b42e91b
|
Added ByteArraySerializer so byte arrays are serialized as BsonBinary. Fixed bugs in BsonDocument handling of IdGenerators.
|
15 years ago |
rstam
|
92ff7e8757
|
Added low level RunCommand method to MongoConnection to encapsulate repeated logic. Implemented verification of replica set name in ReplicaSetConnector.
|
15 years ago |
rstam
|
73533fc8df
|
Changed BsonDocument to find an IdGenerator for a few more BsonValue types.
|
15 years ago |
rstam
|
9b187785dc
|
Modified CurrentBsonType in BsonBinaryReader to return BsonType.Document when ReadState is Initial, Done or ScopeDocument. Modified Deserialize for Int64 to succeed when actual value is an Int32.
|
15 years ago |
rstam
|
ca90c768f3
|
Moved GetConnection, GetLastError, ReleaseConnection, RequestNestingLevel, RequestStart and RequestDone to MongoServer. Replaced connectionPool in MongoServer with primaryConnectionPool and secondaryConnectionPools (MongoServer now handles multiple connection pools when connecting to a replica set with slaveOk true). GetConnection and GetConnectionPool methods now take a slaveOk parameter. GetConnection in MongoServer distributes reads to replica set secondaries when slaveOk is true. ReplicaSetConnector now connects to all secondaries when slaveOk is true (if not it stops as soon as the primary is found).
|
15 years ago |
rstam
|
71e1836d45
|
Fixed CSHARP-98. GetActualType needs to be a little more precise about where the reader is sitting when it is called.
|
15 years ago |
rstam
|
4b01b9c37d
|
Moved connection logic out of MongoServer and into DirectConnector and ReplicaSetConnector. The connection logic is now different for direct connections and connections to replica sets.
|
15 years ago |
rstam
|
040818a7b4
|
Fixed a bug that only happens when the very first call to LookupDiscriminatorConventions passes typeof(object) as the value of the type parameter.
|
15 years ago |
rstam
|
e20a117207
|
Changed default TcpClient ReceiveBufferSize and SendBufferSize to 64KB. Doesn't seem to reduce performance and large buffer sizes were failing on the Mac using Mono. Some other minor fixes also.
|
15 years ago |
rstam
|
1ae3d36d20
|
Got BsonUnitTests to pass in mono.
|
15 years ago |
rstam
|
39853b46ca
|
SafeMode is now readonly in MongoDatabase and MongoCollection (required for thread safety). SafeMode value is set when object is created.
|
15 years ago |
rstam
|
aca61ac568
|
The AdminCredentials, DefaultCredentials, SafeMode and SlaveOk properties of MongoServer are now read only (this is important because otherwise threads sharing a MongoServer instance could experience unexpected behavior). Admin commands now have an overload with an adminCredentials parameter.
|
15 years ago |
rstam
|
b6bb2d3bbf
|
MongoUrl is now immutable. Added MongoUrlBuilder. Removed MongoConnectionSettings (replaced by immutable MongoUrl). MongoUrl is now identity of MongoServer objects. Cache MongoUrls to avoid repeating URL parsing.
|
15 years ago |
rstam
|
aaf25455aa
|
Added SetRepresentation to BsonMemberMap. Added ConnectionMode, ReplicaSetName, SafeMode, and SlaveOk to MongoConnectionSettings, MongoUrl and MongoConnectionStringBuilder. Implemented new connection string options (in both MongoUrl and MongoConnectionStringBuilder). Added FSync to SafeMode and changed names of Replications and Timeout to W and WTimeout to closely match the documentation of getlasterror. Added unit tests for MongoConnectionStringBuilder. Improved unit tests for MongoUrl (and added some new ones).
|
15 years ago |
rstam
|
202716383a
|
Implemented IgnoreField and IgnoreProperty.
|
15 years ago |
rstam
|
67b80eac29
|
When Serialize calls LookupDiscriminatorConvention it should look up the convention for the nominalType not the actualType.
|
15 years ago |
rstam
|
957f91ded8
|
Added DeserializeMember method to refactor some code out into this method.
|
15 years ago |
rstam
|
c047dde798
|
Added MagicDiscriminatorConvention sample. It shows how to use a discriminator convention to figure out the actual type by looking at the names of the elements present (so no _t element is needed).
|
15 years ago |
rstam
|
92e058e1f7
|
Fix bug in MongoCursor when last message from server contains zero documents.
|
15 years ago |
rstam
|
8e7a944581
|
This commit is about simplifying serialization and improving performance at the same time. At the lowest level, the API for BsonReader and BsonWriter has changed to support the higher level changes. The DeserializeDocument/DeserializeElement and SerializeDocument/SerializeElement paired methods have been simplified to just Deserialize and Serialize. Similarly, the GetActualDocumentType/GetActualElementType paired methods in IDiscriminatorConvention have been simplified to a single GetActualType method. The HasElement methods in BsonReader have been removed because using them resulted in BsonTypes and Names being read twice. The support for bookmarks in BsonReader has been decoupled from the context stack. BsonWriter now allows the Name to be written before the BsonType is known (in the BSON binary form the BsonType comes before the Name) and delays physically writing the name to the BSON output stream until the value is written at which point the BsonType is known.
|
15 years ago |
rstam
|
e45c3ee905
|
Implemented IndexExists in MongoCollection.
|
15 years ago |
rstam
|
62bf20fe68
|
Minor performance improvements in FindElement by not reading BsonType and element name twice.
|
15 years ago |
rstam
|
7505ec6987
|
A profiling test of deserialization showed that 34% of all CPU time was spent in GetMemberMapForElement in BsonClassMap. Reduced that to 4% by moving some work to LoadBaseClassMap and by adding dictionaries to lookup member maps by memberName or elementName.
|
15 years ago |
rstam
|
dc45355f4e
|
Added more unit tests for MongoCollection.
|
15 years ago |
rstam
|
fba1af5757
|
Fixed CSHARP-93. Bug was stack overflow in DropAllIndexes.
|
15 years ago |
rstam
|
0d0aeeca0c
|
Fixed a bug in BsonRegularExpression constructor when string containing a JavaScript syntax regular expression has escaped slashes.
|
15 years ago |
rstam
|
2dec3ca8f9
|
Fixed CSHARP-92. If there is no IIdGenerator for a particular type the driver will just leave the Id value alone (so it's up to the client code to generate unique Ids).
|
15 years ago |
rstam
|
20d9ee8998
|
Partial work on GridFS getting ready to implement support for Streams.
|
15 years ago |
rstam
|
8f9aace2de
|
BsonRegularExpression constructor now recognizes "/pattern/opt" as a JavaScript style regular expression and parses out the pattern and the options.
|
15 years ago |
rstam
|
0444845fe4
|
Changes to get serialization of structs to work. Some tests are still failing in deserialization (resolution pending).
|
15 years ago |
rstam
|
a13269009a
|
And this time added the release notes to the zip file too (details, details...).
|
15 years ago |
rstam
|
f8da1a078b
|
BUMP v0.7.0.3959 (again). Added release notes to setup and moved obsolete tutorial documents to Obsolete folder (new tutorial is online).
|
15 years ago |
rstam
|
13a011c88e
|
BUMP 0.7.0.3959.
|
15 years ago |
rstam
|
d91148cac4
|
Minor changes.
|
15 years ago |
rstam
|
52de25c2ef
|
Fixed CSHARP-78 unit test (and fixed SerializeElement for Int16Serializer).
|
15 years ago |
rstam
|
39e7a95c09
|
Added unit tests for FetchDBRef.
|
15 years ago |
rstam
|
4dcf112627
|
Replaced FetchAs with FetchDBRef and FetchDBRefAs.
|
15 years ago |
rstam
|
bfa542bf57
|
Restored maxMessageLength to 16MB.
|
15 years ago |
rstam
|
0c6d76f338
|
Turns out no initialization at all is needed before deserializing instances of Animal subclasses when attributes are used to set the root class and known types.
|
15 years ago |
rstam
|
cb87ee541e
|
Set AssemblyVersion to 0.7.0.*.
|
15 years ago |
rstam
|
2cebee144e
|
Finished implementing HierarchicalDiscriminatorConvention. Added IsRootClass and HasRootClass to BsonClassMap and added RootClass to BsonDiscriminatorAttribute. Changed DeserializeDocument in ObjectSerializer to look at the discriminator and delegate the deserialization to the serializer for the actual type. Changed the BsonKnownTypeAttribute to plural to allow specifying multiple known types in one attribute.
|
15 years ago |
rstam
|
c45d4d052d
|
Relax the restriction that a class must have a public default constructor in order to be deserialized (now a default constructor, public or private, will be used if it exists, otherwise FormatterServices.GetUninitializedObject will be used to create a zero filled instance).
|
15 years ago |
rstam
|
748dfb3468
|
Added DiscriminatorConventions to allow more flexibility in how discriminators are used. Includes partial support for hierarchical discriminators (but a little more work is required to know when hierarchical discriminators should be used and where the hierarchy should be rooted).
|
15 years ago |
rstam
|
745dce7f9b
|
Added support for serializing LinkedList<T>.
|
15 years ago |
rstam
|
9a240bab8c
|
Modified CollectionSerializerTests and CollectionSerializerGenericTests to be as similar as possible. Added unit tests for serializing HashSet<T>.
|
15 years ago |
rstam
|
e918733496
|
Consolidated collection serializers in CollectionSerializers.cs and CollectionSerializersGeneric.cs (and similarly for the unit tests). Added unit tests for more generic collection types.
|
15 years ago |