Values

Values in DQL expressions use constants.

Constants

Type Notes Examples
String Must be single-quoted only.

Single quote characters in single-quoted strings must be escaped using a backslash character ('\').

A backslash character must be escaped using a second backslash character.

'bill'
'\'fred'
'\\fred'
Numeric
0
-123
123.456
Date Must be specified as:

YYYY-MM-DD

A timezone can be specified by appending the date with either "Z", "+HH:MM" or "-HH:MM".

When doing date range checking you can abbreviate dates, leaving off the the non-significant parts.

2013-12-25
2013-12-25Z
2013-12+08:00
2013-05:00

The following expression searches for a date of 2013 or later.

dispatchNote.dateOfDispatch > 2012
Time Must be specified as:

HH:MM:SS.SSS

When doing time range checking you can abbreviate times, leaving off the the non-significant parts.

14:23:56.123

The following expression searches for a time of 09:00:00 or later.

openingTime >= 09:00
Datetimetz Must be specified as:

YYYY-MM-DDTHH:MM:SS.SSS

A timezone must be specified by appending the date with either "Z", "+HH:MM" or "-HH:MM".

When doing range checking you can leave off the the non-significant parts.

2013-12-25T00:00:01Z
2013-12
2013-12-25T09+05:00
2013-12-25T00:00:01-08:00
Enum Enum names must be quoted with either single or double quotes.
orderLines.orderItem.itemEvents.event = 'RECEIVED'
orderLines.orderItem.itemEvents.event IN ("RECEIVED", "SHIPPED")