Skip to content

DataTypes

Edmo Costa edited this page Jun 20, 2017 · 5 revisions

String

Strings must be delimited by double or single quote.

"value"
'value'
'John\'s' #escaped quote

Numbers

id = 999999999 #result in a Long object
id = 99999999999999999999999999999999 #result in a Double object

Decimal values are parsed to BigDecimal objects

price < 18968.36 #result in a BigDecimal object

You can use number qualifiers to define the type of the object

price < 10I #for (I)nteger 
price < 10L #for (L)ong
price < 10F #for (F)loat
price < 10D #for (D)ouble

Temporal

LocalDate:

date = 2017-01-01

LocalDateTime:

date = 2017-01-01T12:10:10

ZonedDateTime:

date = 2017-01-01T12:10:10+03:00[America/Sao_Paulo]
date = 2017-01-01T12:10:10+03:00

LocalTime:

time = 18:10:10.056+01:00

Enum

type = 'NAME' #by name value
type = 0 #by ordinal value

Content

Clone this wiki locally