fix: add check_document_exists; rename do_upsert -> upsert

added check_document_exists(collection, target) -> bool (count_documents(target, limit=1) > 0) — it existed only in the talos origin and was not carried over, but the talos caller relies on it. renamed the do_upsert param to upsert on update_document/find_one_and_update/find_one_and_replace, standardizing on motor's name (the talos caller already passes upsert=). param rename is breaking; patch is fine under the no-consumer policy. bump to v0.1.1.

Signed-off-by: disqualifier <dev@disqualifier.me>
This commit is contained in:
2026-06-29 03:25:17 -04:00
parent eabfe0cbc3
commit 3ceef9c4a8
3 changed files with 17 additions and 9 deletions
+2 -2
View File
@@ -8,13 +8,13 @@ helpers for the common paths, with a raw escape hatch for everything else.
`requirements.txt`:
```
mongo @ git+ssh://git@git.rethinkstudios.io/rethink-public/mongo.git@v0.1.0
mongo @ git+ssh://git@git.rethinkstudios.io/rethink-public/mongo.git@v0.1.1
```
Direct:
```bash
pip install "mongo @ git+ssh://git@git.rethinkstudios.io/rethink-public/mongo.git@v0.1.0"
pip install "mongo @ git+ssh://git@git.rethinkstudios.io/rethink-public/mongo.git@v0.1.1"
```
Requires `motor` and `pymongo` (pulled transitively).