-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tGoMongoCollection.FindOne() has new overloads to find minimum or maximum value of a field. #20
Open
tuurke63
wants to merge
65
commits into
grijjy:master
Choose a base branch
from
tuurke63:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
These overloads are necessary to quickly find the largest or smallest value of a field in a collection, like the SQL commands SELECT MAX() and SELECT MIN().
…to development
Added new overloads to TgoMongoCollection.FindOne;
Merging grijji master into fork's development branch
… into development
Development
….Stats) Added method IgoMongoCursor.Stats to retrieve statistics of a collection, see https://www.mongodb.com/docs/manual/reference/command/collStats/
Added method IgoMongoDatabase.DBCommandDoc (needed for IgoMongoCursor…
…meters. Conversion of native Delphi strings to/from the UTF8 codepage takes place there where it is needed.
…goDB Wire Protocols in the constructor. This is a necessary first step to support the new wire protocol.
…ction name and database name as two separate parameters. Grijjy.MongoDB.pas - tGoMongoDatabase: Removed property "FullCommandCollectionName" - tgoMongoCursor: Removed property "FullCollectionName" - tGoMongoCollection: Removed property "FullName" and "FullCommandCollectionName" - Moved COLLECTION_COMMAND from Grijjy.Mongodb.pas to Grijjy.MongoDB.Protocol.pas - Renamed COLLECTION_ADMIN into DB_ADMIN and moved it from Grijjy.Mongodb.pas to Grijjy.MongoDB.Protocol.pas Grijjy.MongoDB.Protocol.pas - TMsgHeader now has basic format detection and validation tgoMongoProtocol: - all comms methods expect database name and collection name separately now. - Receive logic is now a bit more resilient against data corruption - New method RemoveReply - New Method Recover
But there's a lot of obsolete tuff that can be removed if the deprecated/unsupported "old" protocol can be removed!
Development
Bugfix: Unit test didn't pass
Renamed tgoMongoprotocol.opReplyMsgHeader into HaveReplyMsgHeader (Opcode op_reply is obsolete and will be removed.)
Older Wire Procotols REMOVED.
Development
…idateMessage) Insert and InsertMany now use Payload type 1 for documents as prescribed in https://github.com/mongodb/specifications/blob/master/source/message/OP_MSG.rst#command-arguments-as-payload
Better validation of msg format in comms buffer (TgoMongoMsgReply.Val…
"command" and "admincommand" now return a cursor instead of a single …
…goCollection, tgoMongoCursor
…ss overridden by setting "ReadPreference"
Development
…MongoFindOptions) for flexible specification of the query. This is much nicer that having tons of overloaded methods. function firstBatchToCursor() re-named to CreateCursor().
igoMongoCollection.Find() now supports uses a fluent query interface
These DLL's were created by MongoDB Inc.
- New object tgoConnectionPool - tgoMongoClient now has properties "Pooled" and "Available" - "fProtocol" member removed from tgoMongoDatabase and tgoMongoProtocol and replaced by property "Protocol" which has a getter. The shared tgoMongoProtocol is owned by tgoMongoClient. tgoMongoDatabase and tgoMongoCollection can access it by reference and don't need a copy. - Added some new methods to tgoCursorhelper
---------------- - Constructor Create() does not initiate the connection anymore, like Grijjy's original implementation. This is to prevent a blocked/hanging constructor and unwanted exceptions. - SEND() no longer does auto-connect. Instead, it is perfomed in OPMSG(). The reason: we need to know what compression methods the server supports before actually sending a message. - Broken/Disconnected connections are no longer returned to the ClientSocketManager but destroyed instead. - New property "Connected" with methods GetConnected and SetConnected, in case you want to do this manually. - New method "Disconnect". - Function "IsConnected" has been re-named to "EnsureConnected". - ConnectionState() is no longer inlined. - Function SupportsOPMSg() has been removed. OP_msg is the de-facto protocol in MongoDB now.
… should be done in the destructor.
Compression is now always true except during authentication/hello. Replytimeout is now a mandatory parameter for OPMSG. Increased default Replytimeout from 5 to 30 seconds.
Increased initial receive buffer size from 32 to 128 KB. Modified receive buffer growth strategy. It is no longer exponential and failures are recognized and caught. SocketRecv() no longer allows exceptions to escape. When SocketRecv () detects errors, it attempts to store an error notification packet in the replies buffer; this way the main thread can respond to it immediately instead of just being hit by a timeout. Grijjy.MongoDB.pas: Updated the list of known MongoDB errors. The list now corresponds to MongoDB version 8.0 Implemented several new exceptions HandleCommandReply() will throw more concise exceptions if necessary.
Added overloads for igoMongoCollection.Update and igoMongoCollection.UpdateMany that return an additional flag telling you if a new record was inserted.
test for merge
New class tgoMongoExpression for aggregates. New class factory "Aggregate". TgoDocCallback renamed into tgoDocEditor. More unit tests and docs will follow soon.
More overloads in igoAggregationPipeline.
igoAggregationPipeline:re-named "pipeline" into "stages".
tgoMongoExpression: Many new functions.
Added new aggregation operator "count"
Added several new tgoMongoExpression methods.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These overloads make it possible to find the maximum or minimum value of a field in a collection, similar to the SQL statement
SELECT MAX(Fieldname) from...
They simply return ONE document.