Querydeck Docs
  • 👋Welcome to Query Deck
  • Getting Started
    • 😃Get Started With QueryDeck
      • Quickstart With QueryDeck
    • How It Works?
  • REST
    • Select Method
      • Joins
      • Sorting
        • Ascending/ Descending ordering
        • Dynamic Sorting
      • Filter
        • Dynamic Filtering
        • Groups
        • Exists clause
      • Pagination
        • Offset
        • Limit
    • Insert/Upsert Method
      • Nested Inserts (Joins)
      • Conflicting Columns
    • Update Method
      • Filters
    • Delete Method
    • Authentication
    • Authorization
    • Select by Id
  • GraphQL
    • Introduction to GraphQL in QueryDeck
    • Enabling GraphQL for Columns in QueryDeck
  • Testing Endpoints
Powered by GitBook
On this page
  1. REST
  2. Update Method

Filters

PreviousUpdate MethodNextDelete Method

Last updated 4 months ago

Filters in Update Queries

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.

Applying Filters in Update Queries

Filters are specified in the request body under the where clause. They determine the subset of rows that the update operation should act upon.

Creating a Filter clause in an Update query

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

Testing 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

Example: Updating Customers With Last_name as 'Ely"

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