Filters
Last updated
Last updated
Filters in update queries are essential for specifying which rows should be modified. QueryDeck provides a powerful filtering mechanism to apply conditions directly on the data being updated. This allows for targeted updates without affecting unrelated records.
Filters are specified in the request body under the where
clause. They determine the subset of rows that the update
operation should act upon.
First, choose the filter button in the left pane
in the pop up that appears, choose desired filter to apply. The first filter is there by default (customer_id). Here we are adding another filter which only shows queries with last_name as 'Ely'
Now save and close the pop-up
Copy the endpoint URL for testing from the right corner
Save the endpoint
Open postman and chosse method as PUT, and paste the URL in the input bar with required parameter, here we use customer_id=524
We goto the body tab and choose raw(json) as type, then use our desired request body as given below
Click the Send button to make the request
Verify the response. Here's an example of a successful response