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
|
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
|
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
|
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 |
rstam
|
a45bce5239
|
Moved condition parameter of Add to end so that name and value will consistently be the first two arguments.
|
15 years ago |
rstam
|
338c5d1cf8
|
Use "getlasterrror" all lowercase for backward compatibility with older servers.
|
15 years ago |
rstam
|
1eb76fdc92
|
Renamed TResult to TDocument and TResultDefault to TDefaultDocument (they read much better).
|
15 years ago |
rstam
|
ac3e632377
|
Changed order of projects in CSharpDriver.sln. Renamed FindPrimary to FindServer in MongoServer.
|
15 years ago |
rstam
|
b114d8ee45
|
The recommended naming convention for type names in generic classes and methods is "T" followed by a descriptive word. Accordingly, renamed C to TCommand, D to TResultDefault, F to TFields, I to TDocument, K to TIndexKeys or TGroupBy, O to TIndexOptions or TMapReduceOptions, Q to TQuery, R to TResult, RNew to TResultNew, S to TScope or TSortBy, T to TDocument, U to TUpdate.
|
15 years ago |
rstam
|
1a17901f3e
|
Removed "where T : new()" type constraint from generic classes and methods.
|
15 years ago |
rstam
|
e790cc3c87
|
Replaced MongoException with ArgumentException, FileFormatException, FileNotFoundException, InvalidOperationException, MongoAuthenticationException, MongoCommandException, MongoConnectionException, MongoGridFSException, MongoInternalException, MongoQueryFailureException or MongoSafeModeException as appropriate.
|
15 years ago |
rstam
|
4e5e7b778d
|
Added BuilderBase to share methods among all builders. Removed fields argument from any overloads of Find, FindAll and FindOne (to avoid conflicts between overloads; use Fields fluent interface on MongoCursor instead). Modified all methods that take a query parameter to be generic on the query type <Q> so that any document that can ultimately be serialized to BSON can serve as a query object. Modified FieldsBuilder to be a subclass of BuilderBase and to implement IBsonSerializable (so now it doesn't have to be converted to a BsonDocument first to be serialized). Added serializeIdFirst parameter to Serialize methods and calls to it. Removed overloads of Find and FindOne that took a BsonJavaScript parameter to avoid overload resolution conflicts in light of the new generic overloads (use Query.where instead).
|
15 years ago |
rstam
|
ce816744d1
|
Modified to use BsonBuffer for read operations also.
|
15 years ago |
rstam
|
b1c61b73c8
|
Some minor renamings. Revised QueryBuilder and added support for $not.
|
15 years ago |
rstam
|
b53a1c3a79
|
MongoRequestMessage is now Disposable so that BsonBuffer can release its chunks back to the chunk pool.
|
15 years ago |
rstam
|
5eb7f23253
|
Changes related to adding BsonBuffer to the BsonLibrary.
|
15 years ago |
rstam
|
a62fddf18e
|
Finalized DLL filenames and source code namespaces for release.
|
15 years ago |
rstam
|
3a4f48bc93
|
Minor changes to adapt to latest version of BsonLibrary.
|
15 years ago |
rstam
|
c8db07ace8
|
Replaced some <T> in generic classes and methods with a more descriptive letter: R for result, I for insert and D for default.
|
15 years ago |
rstam
|
d43f3677d4
|
Minor changes to conform to latest version of the BSON Library.
|
15 years ago |
rstam
|
9bdb9db85e
|
MongoConnection is no longer IDisposable (use Close instead of Dispose). Modifed void methods of MongoCollection that execute a database command to return the command results in a BsonDocument. Reviewed thread safety of MongoServer, MongoDatabase, MongoCollection and MongoGridFS.
|
15 years ago |
rstam
|
979e9c3459
|
Implemented RequestStart/RequestDone. Changed connection pool logic so that a connection can be authenticated against multiple databases using different credentials (required by RequestStart).
|
15 years ago |
rstam
|
d7ea35409e
|
Implemented authentication and modified connection pooling to play nicely with authentication.
|
15 years ago |
rstam
|
f805e25805
|
Initial version of replica set failover support. For now we assume that a SocketException on any connection is reason enough to close all other connections to the same server and search for a new primary.
|
15 years ago |
rstam
|
b7c3a1d10d
|
Implemented connecting to a replica set by querying all servers in the seed list in parallel. Improved thread safety of major classes.
|
15 years ago |
rstam
|
f99bd9cd38
|
Fixed visibility and other minor refactorings of classes in the Internal folder.
|
15 years ago |
rstam
|
01069e4c20
|
SafeMode is now a class, not just a bool. That allows us to specify more complicated safemodes as in waiting for n slaves to complete replication.
|
15 years ago |
rstam
|
7e2b69f557
|
Added GetLastError to MongoDatabase (but it requires UseDedicatedConnection to be true). Implemented RenameCollection in MongoServer.
|
15 years ago |
rstam
|
79161a1029
|
Changed write operations to return a BsonDocument (in safemode they return the result of GetLastError, otherwise they return null). Insert returns an array of GetLastError results in safemode IF multiple batches were required, otherwise it just returns the result of GetLastError. Added UseDedicatedConnection and ReleaseDedicatedConnection to MongoDatabase.
|
15 years ago |
rstam
|
b941188eff
|
Minor changes related to getLastError processing. Implemented RemoveLastDocument and Reset in MongoInsertMessage.
|
15 years ago |
rstam
|
ff67f91d5c
|
Improved and debugged implementation of SafeMode. Reworked how MongoRequestMessage class uses MemoryStream to facilitate AddDocument in MongoInsertMessage (see AsMemoryStream etc...).
|
15 years ago |
rstam
|
a79a6a7f48
|
Tested and fixed some bugs in Insert with and without safemode.
|
15 years ago |
rstam
|
ec95b13a31
|
Turned off Nagle and increased socket buffer sizes. Implemented piggy backing of GetLastError command when sending request in safeMode. Implemented MongoInsertMessage and breaking up insert messages into 16MB maximum each. Readjusted the MongoMessage class hierarchy and methods a bit. Implemented Insert in MongoCollection.
|
15 years ago |
rstam
|
181040594a
|
Deleted MongoCommandResult. Implemented Limit in MongoCursor. Implemented DropCollection in MongoDatabase. Modified RunCommand to throw an exception when command fails. Implemented DropDatabase in MongoServer.
|
15 years ago |
rstam
|
46c3fe1b5c
|
Worked on the design of the C# API by creating lots of skeleton methods (look for NotImplementedException). Added some new auxiliary classes.
|
15 years ago |
rstam
|
cccde388f3
|
Initial version of MongoCursor working.
|
15 years ago |
rstam
|
05c6772755
|
Added MongoCollection<T> for collections where it is known that all documents are of the same type.
|
15 years ago |
rstam
|
792168a4a3
|
Cleanup and consolidation. Avoid extra copy of reply buffer in memory.
|
15 years ago |
rstam
|
55a44b0d9f
|
Work in progress. Tested MongoCollection.Find().
|
15 years ago |