PoloDB: Can not update collection UnknownUpdateOperation(...)
collection
.update(
Some(&mk_document! { "_key": key_name }),
&mk_document! { "value": value },
)
.unwrap();
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: UnknownUpdateOperation("value")', src/db.rs:143:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
I want to update the entry with the “_key” as key_name’s value field, however, it displays the above error. any help?
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 30
Commits related to this issue
- Merge pull request #44 from vincentdchan/feature/exclusive-lock Fix #42: cache conflict one the same database file — committed to PoloDB/PoloDB by vincentdchan 3 years ago
Use newer version will be more safe:
It’s about database initiation.
Thank you very much. I will impliment this later. You may also want to add a warning to the readme to not access a database in this way to prevent corruption.
I’ve reproduced successfully, I’ll see what happened.
I will soon.
You need to specific the update operation, so try:
Other operation can be found at
docs/en-US/Update.md