You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.
Now we can only update the data but if we want to check the data before updating that's not possible currently.
Let's says we have {"a": [1, 2, 3, 4]} in our Base. Now we want to append some element in this list using update. But we also want to check if that value already exists in the list. In current way if we want to do it we have to fetch the data before hand the check and then update which takes 2 API calls.
Let's assume the user want to add 1 to the list but if 1 is already there it won't append. To do that in a single request we can send a __checks key "__checks": {"contains?" : 1} with the update payload where it will be automatically parsed and handled by backend and if the check passes 1 will be added to the list otherwise won't and request will be responded accordingly with proper status code .
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Now we can only update the data but if we want to check the data before updating that's not possible currently.
Let's says we have
{"a": [1, 2, 3, 4]}
in our Base. Now we want to append some element in this list using update. But we also want to check if that value already exists in the list. In current way if we want to do it we have to fetch the data before hand the check and then update which takes 2 API calls.Let's assume the user want to add
1
to the list but if1
isalready
there it won't append. To do that in a single request we can send a__checks
key"__checks": {"contains?" : 1}
with the update payload where it will be automatically parsed and handled by backend and if the check passes1
will be added to the list otherwise won't and request will be responded accordingly with proper status code .Sample Payload Structure:
Beta Was this translation helpful? Give feedback.
All reactions