28 Commits (92ff7e8757a513cd7defcb5e156e82f8c29bfd96)

Author SHA1 Message Date
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 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 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 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 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 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 fba1af5757 Fixed CSHARP-93. Bug was stack overflow in DropAllIndexes. 15 years ago
rstam 20d9ee8998 Partial work on GridFS getting ready to implement support for Streams. 15 years ago
rstam 13a011c88e BUMP 0.7.0.3959. 15 years ago
rstam d91148cac4 Minor changes. 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 cb87ee541e Set AssemblyVersion to 0.7.0.*. 15 years ago
rstam 6315e5203f Fixed CSHARP-88. All methods in MongoDatabase take and return plain collection names (not full collection names prefixed with the database name). Moved RenameCollection method from MongoServer to MongoDatabase. 15 years ago
Testo 3f45e055d5 - fix large message 15 years ago
rstam 9c250395d0 Replaced UseCompactRepresentation with a more general mechanism based on serialization options. Added BsonRepresentationAttribute. Serializers are now registered using a combined type/options key because the serialization options are stored in the serializer instance. 15 years ago
craiggwilson d21bd9f8e2 completed changes to accomodate fields as well as properties. 15 years ago
rstam ffc11dc220 Added solution files for Visual Studio 2008 and 2010 (they share the same set of project files). 15 years ago
rstam 0999243603 Fixed CSHARP-77 by improving Id detection algorithm but also by fixing how documents without an Id property are handled. Added DocumentHasIdProperty, DocumentHasIdValue and GenerateDocumentId to IBsonSerializer and IBsonSerializable. Added new IBsonIdGenerator interface and registration/lookup methods for Id generators to BsonSerializer. Implemented Id generators for ObjectId and Guid. Moved lots of common code to BuilderBase. Fixed Insert and Save methods to properly detect and/or assign Ids to documents. 15 years ago
rstam 668110faf6 Added initial version of DriverOnlineTests project. These tests differ from the tests in DriverUnitTests because they connect to localhost to test against a live database. 15 years ago
rstam 3900d3f0db Renamed MongoDB.BsonLibrary namespace to MongoDB.Bson and MongoDB.CSharpDriver to MongoDB.Driver (Library was redundant and VB users might not want to see CSharp in the namespace). Renamed Bson static class BsonConstants (because it a class can't have the same name as the namespace it is in). 15 years ago