From e2ca998ca913e4c8d0369e5f945a2734d9258a02 Mon Sep 17 00:00:00 2001 From: guvra Date: Thu, 8 Feb 2024 16:01:41 +0100 Subject: [PATCH] Add an example that shows how to implement a filter with or conditions --- app/config/example.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/config/example.yaml b/app/config/example.yaml index 4fd30695..82ad1701 100644 --- a/app/config/example.yaml +++ b/app/config/example.yaml @@ -22,12 +22,12 @@ tables: filters: - ['created_at', 'gt', 'expr: date_sub(now(), interval 60 day)'] - # Dump only recent orders + # Dump only recent orders or orders with specific emails (this example shows how to implement OR conditions) sales_order: filters: - - ['created_at', 'gt', 'expr: date_sub(now(), interval 60 day)'] + - ['entity_id', 'in', 'expr: select entity_id from sales_order where updated_at > date_sub(now(), interval 60 day) or email like "%@acme.fr"'] - # Dump only CMS pages without "FAQ" in their meta title + # Dump only CMS pages without "FAQ" in their meta title (COALESCE keeps null values) cms_page: filters: - ["expr: COALESCE(meta_title, '')", 'notLike', '%FAQ%']