Syntax
Arguments
List of arguments to provide.An object containing the fields to update
Optargs
No optional arguments.Returns
Information about the operation.
Behavior
- Updates only the specified fields, leaving other fields unchanged.
- Can update multiple documents when applied to a selection (
filter,getAll, etc.). - If a document doesn’t exist, the update operation skips it (no error thrown).
Notes & Caveats
- Cannot update primary key (
id) fields. - Use
insertdefining the same primary key (id) instead ofupdatewhen you need to replace the entire document.
Example
Update a single document by ID
Update a specific user’s information.Update multiple documents with filter
Update all users from a specific city.Related Functions
get- Get a document by primary keygetAll- Get multiple documentsfilter- Filter documents for updatesinsert- Insert new documentsdelete- Delete documents
Found a typo? Or maybe a broken link? RuloDB is open-source, help us fix it!

