User Guide > Publishing Resources > About the OData Feature > OData v4 Features
 
OData v4 Features
Supported Operators
Authentication Options
Description
 
Comparison Operators:
 
 
eq
Equal
companyname eq ‘Able Computing’
ne
Not Equal
companyname ne ‘Able Computing”
gt
Greater than
price gt 20
ge
Greater than or equal
price ge 10
lt
Less than
price lt 20
le
Less than or equal
price le 100
Logical Operators
 
 
and
Logical and
Price le 200 and Price gt 3.5
or
Logical or
Price le 3.5 or Price gt 200
not
Logical negation
not endswith(Description,'milk')
 
 
Operator
Description
Example
Arithmatic Operators
 
 
add
Addition
Price add 5 gt 10
sub
Subtraction
Price sub 5 gt 10
mul
Multiplication
Price mul 2 gt 2000
div
Division
Price div 2 gt 4
mod
Modulo
Price mod 2 eq 0
Grouping Operators
 
 
( )
Precedence grouping
(Price sub 5) gt 10
Supported Functions
Function
Example
String Functions
 
contains
contains(CompanyName,'freds')
endswith
endswith(CompanyName,'Futterkiste')
startswith
startswith(CompanyName,'Alfr')
length
length(CompanyName) eq 19
indexof
indexof(CompanyName,'lfreds') eq 1
substring
substring(CompanyName,1) eq 'lfreds Futterkiste'
tolower
tolower(CompanyName) eq 'alfreds futterkiste'
toupper
toupper(CompanyName) eq 'ALFREDS FUTTERKISTE'
trim
trim(CompanyName) eq 'Alfreds Futterkiste'
concat
concat(concat(City,', '), Country) eq 'Berlin, Germany'
Date Functions
 
year
year(BirthDate) eq 0
month
month(BirthDate) eq 12
day
day(StartTime) eq 8
hour
hour(StartTime) eq 1
minute
minute(StartTime) eq 0
second
second(StartTime) eq 0
fractionalseconds
second(StartTime) eq 0
date
date(StartTime) ne date(EndTime)
time
time(StartTime) le StartOfDay
totaloffsetminutes
totaloffsetminutes(StartTime) eq 60
now
StartTime ge now()
mindatetime
StartTime eq mindatetime()
maxdatetime
EndTime eq maxdatetime()
Math Functions
 
round
round(Freight) eq 32
floor
floor(Freight) eq 32
ceiling
ceiling(Freight) eq 33
Type Functions
 
cast
cast(ShipCountry,Edm.String)
Support for Published Resources
OData v4 supports
All published database and webservice resources.
Published views without a primary key defined.
Procedures with multiple input and output cursors.
Supports navigation links of tables/views with defined relationships.
Examples
Call procedure which has parameters.
http://dvbu-vdi-002:9400/odata4/webservices/ds/LookupProduct(desiredProduct=1)
Call procedure which has input cursor
<m:value xmlns:m="http://docs.oasis-open.org/odata/ns/metadata" xmlns:d="http://docs.oasis-open.org/odata/ns/data" m:type="#Edm.LookupProductReturnType" m:context="http://dvbu-vdi- 002:9400/odata4/webservices/ws$metadata">
<m:parameters>
<d:result m:type="#Collection(Edm.result)">
<m:element>
<d:ProductName>Maxtific 40GB ATA133 7200</d:ProductName>
<d:ProductID m:type="Int32">1</d:ProductID>
<d:ProductDescription>Maxtific Storage 40 GB</d:ProductDescription>
</m:element>
</d:result>
</m:parameters>
 
</m:value>
Supported Query options
The following query options are supported:
$filter
$select
$orderby
$skip
$top
$count
$search
$expand
$levels