txmongo icon indicating copy to clipboard operation
txmongo copied to clipboard

new-style wire protocol implementation for find*() methods

Open IlyaSkriblovsky opened this issue 4 years ago • 1 comments

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.

IlyaSkriblovsky avatar Apr 02 '20 13:04 IlyaSkriblovsky

Coverage Status

Coverage decreased (-2.9%) to 90.754% when pulling 4a6a6fa596ffa3d272068d7658cca1d48c77fc0b on IlyaSkriblovsky:new-style-find into 1a1ee6e9be9d922b2a17cfc3337d2276a1ed23bd on twisted:master.

coveralls avatar Apr 02 '20 13:04 coveralls

Still want to move this forward?

psi29a avatar Sep 30 '24 10:09 psi29a

No, this will be superseded by OP_MSG implementation on which we are working here: https://github.com/IlyaSkriblovsky/txmongo/tree/op-msg-support

IlyaSkriblovsky avatar Sep 30 '24 12:09 IlyaSkriblovsky