txmongo
txmongo copied to clipboard
new-style wire protocol implementation for find*() methods
Starting from maxWireVersion=4 (v3.2) MongoDB migrated to new implementation of CRUD methods based on commands commands instead of OP_*
low-level message codes.
We already support new-style commands for insert, update, replace and delete (when called as *_one
/*_many
). This patch adds support for find*() methods too and uses it by default if maxWireVersion ≥ 4.
This also (hopefully) makes txmongo compatible with Azure's Cosmos DB that only supports new-style API.
In future this will allow us to support sessions and transactions because it only supported for new-style queries.
Coverage decreased (-2.9%) to 90.754% when pulling 4a6a6fa596ffa3d272068d7658cca1d48c77fc0b on IlyaSkriblovsky:new-style-find into 1a1ee6e9be9d922b2a17cfc3337d2276a1ed23bd on twisted:master.
Still want to move this forward?
No, this will be superseded by OP_MSG implementation on which we are working here: https://github.com/IlyaSkriblovsky/txmongo/tree/op-msg-support