How to use multiple filters in filter queries
- Last Updated: March 24, 2022
- 1 minute read
- Corticon
- Version 6.3
- Documentation
One or more filters can be set as a database filter. When multiple filters
are set as database filters, Corticon
logically combines them with the AND operator to form one
database query.
Customer.age > 18Customer.status = ‘GOLD’
The result is one database query:
Select * from Customer where age > 18 and status
= “GOLD”
Customer.age > 18Order.total > 1000
The result is two database queries (because Customer and
Order are not logically related):
Select * from Customer where age >
18
Select * form Order where total >
1000
When the database filter contains more than one database entity/alias (a compound filter), it still acts as a single query; for example:
Order.bid >= Item.price
The compound filter results in the query:
Select * from Order o,Item i where o.bid >
i.price
When there are multiple filters related to one or more of the entities in a
compound filter, they are combined with the AND operator
For example, consider the filters:
Order.bid >= Item.priceOrder.status = ‘VALID’Item.qty > 0
Using a compound filter results in the query:
Select * from Order o,Item I where o.bid >
i.price and o.status = “VALID” and i.qty > 0