Inhaltsverzeichnis
2.2 Filtri OData
Il parametro $filter permette query complesse.
Operatori di Confronto
| Operatore | Significato | Esempio |
|---|---|---|
eq | Uguale | Country eq 'DE' |
ne | Diverso | Status ne 'closed' |
gt | Maggiore | Price gt 100 |
ge | Maggiore/uguale | Age ge 18 |
lt | Minore | Stock lt 10 |
le | Minore/uguale | Rating le 5 |
Operatori Logici
| Operatore | Esempio |
|---|---|
and | Country eq 'DE' and Active eq true |
or | Status eq 'new' or Status eq 'pending' |
not | not endswith(Name,'GmbH') |
Funzioni Stringa
$filter=contains(Name,'mueller') $filter=startswith(Email,'info@') $filter=endswith(Name,'AG')
Esempio
/odata/demo/Customers?$filter=Country eq 'Germany' and contains(Name,'GmbH')&$orderby=Name
Zuletzt geändert: il 29/01/2026 alle 23:29