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>
21 lines
1.0 KiB
Markdown
21 lines
1.0 KiB
Markdown
# mongo — ledger
|
|
|
|
## v0.1.1
|
|
|
|
- **fidelity fix (MEDIUM):** 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; the talos caller (`local.py:157`) relies on it.
|
|
- **param rename (breaking):** `update_document` / `find_one_and_update` /
|
|
`find_one_and_replace` now take `upsert=` (was `do_upsert=`), standardizing on the
|
|
motor name. Consumers passing `do_upsert=` must switch to `upsert=` on migration; the
|
|
talos caller already uses `upsert=` and is now correct as-is.
|
|
- README install line corrected to the `git+ssh` form (was `git+https`).
|
|
- `close()` is synchronous (motor's close is sync) — not awaited.
|
|
- `get_document_hashmap` / `get_document_fields` skip docs missing the key (was an
|
|
unguarded `doc[key]` that swallowed a KeyError to `{}`/`[]`).
|
|
|
|
## v0.1.0
|
|
|
|
- initial: async MongoDB wrapper over motor; wrapped methods log-and-swallow to safe
|
|
defaults; raw `.collection()` / `db[name]` escape hatch raises.
|