Comparison Operators
| Operator | Name | Example | Use Case |
|---|---|---|---|
== | Equals | City == 'Mumbai' | Exact matches |
!= | Not Equals | Status != 'Inactive' | Exclude specific values |
> | Greater Than | paidUpCapital > 1000000 | Minimum thresholds |
< | Less Than | Turnover < 10000000 | Upper limits |
>= | Greater Than or Equal | numberOfDirectors >= 3 | Minimum inclusive |
<= | Less Than or Equal | numberOfDirectors <= 10 | Maximum inclusive |
Text Operators
| Operator | Name | Example | Use Case |
|---|---|---|---|
CONTAINS | Contains | companyName CONTAINS 'Tech' | Substring search |
STARTS_WITH | Starts With | companyName STARTS_WITH 'Infosys' | Prefix matching |
List Operators
| Operator | Name | Example | Use Case |
|---|---|---|---|
IN | In List | City IN ['Mumbai', 'Delhi'] | Multiple value matching |
NOT IN | Not In List | State NOT IN ['Maharashtra'] | Exclude multiple values |
Using Avoid:
IN is more efficient than multiple OR conditions:Better:City IN ['Mumbai', 'Delhi', 'Bangalore']
City == 'Mumbai' OR City == 'Delhi' OR City == 'Bangalore'
Logical Operators
| Operator | Name | Example |
|---|---|---|
AND | Logical AND | City == 'Mumbai' AND State == 'Maharashtra' |
OR | Logical OR | City == 'Mumbai' OR City == 'Delhi' |
Operator Precedence
AND has higher precedence than OR. Use parentheses to control evaluation:
# This evaluates as: A OR (B AND C)
A OR B AND C
# Use parentheses to change order: (A OR B) AND C
(A OR B) AND C
Examples by Operator
Equals (==)
Equals (==)
# Exact city match
City == 'Mumbai'
# Exact status match
llpStatus == 'Active'
# Company type match
classOfCompany == 'Private'
Not Equals (!=)
Not Equals (!=)
# Exclude inactive companies
llpStatus != 'Inactive'
# Exclude struck off companies
llpStatus != 'Struck Off'
Greater/Less Than (>, <, >=, <=)
Greater/Less Than (>, <, >=, <=)
# Companies with capital over 1 crore
paidUpCapital > 10000000
# Companies with capital up to 50 lakhs
paidUpCapital <= 5000000
# Companies incorporated after 2020
dateOfIncorporation > '2020-01-01'
CONTAINS
CONTAINS
# Companies with 'tech' in name
companyName CONTAINS 'tech'
# IT sector companies
NICDesc CONTAINS 'software'
IN / NOT IN
IN / NOT IN
# Multiple cities
City IN ['Mumbai', 'Delhi', 'Bangalore']
# Multiple NIC codes
NICCode IN [62011, 62012, 62013]
# Exclude certain states
State NOT IN ['Maharashtra', 'Karnataka']
AND / OR
AND / OR
# Both conditions required
City == 'Mumbai' AND paidUpCapital > 10000000
# Either condition
City == 'Mumbai' OR City == 'Delhi'
# Complex combination
(City == 'Mumbai' OR City == 'Delhi') AND paidUpCapital > 10000000