Data-binding Reference

The data-binding query language implemented by the form language is a custom subset of SQLite.

Apart from the general differences between Mobilengine data-binding and standard SQLite, the set of available functions is also modified. The query language supports a number of standard SQL functions, and extends them with custom functions.

For detailed information on the custom functions, read the dedicated topic for each one in this chapter.

The following core SQL functions are available:

  • abs

  • coalesce

  • instr

  • length

  • lower

  • ltrim

  • max

  • min

  • nullif

  • replace

  • round

  • rtrim

  • substr

  • trim

  • upper

Read the official reference documentation on them here.

The following aggregate SQL functions are supported:

  • avg

  • count

  • group_concat

  • max

  • min

  • sum

  • total

Read the official reference documentation regarding them here.

The boolean data type

Scalar data type. true or false.

The dtl data type

Scalar data type. The date and time in the company-specific time zone.

The float data type

Scalar data type. A 64-bit double-precision floating-point number.

The int data type

Scalar data type. A 32-bit signed integer.

The record data type

Composite data type. A collection of one or more scalar values (called fields) in fixed number and sequence.

The recordset data type

A collection of one or more record-type values.

The rowset data type

Composite data type. A collection of zero or more row controls. The rows property of a table control has this data type.

The string data type

A sequence of Unicode characters.

The toint() function

Converts the value of its single parameter to an int.

The tofloat() function

Converts the value of its single parameter to a float.

The tostring() function

Converts the value of its single numeric parameter to a string.

The todate() function

Assembles a dtl value with both date and time portions out of datetime components.

The getyear() function

Extracts the year portion as a string from a dtl value.

The getmonth() function

Extracts the month portion as a string from a dtl value.

The getday() function

Extracts the day portion as a string from a dtl value.

The gethour() function

Extracts the hour portion as a string from a dtl value.

The getminute() function

Extracts the minute portion as a string from a dtl value.

The getsecond() function

Extracts the second portion as a string from a dtl value.

The addyear() function

Increases the year portion of a dtl value by a specified number.

The addmonth() function

Increases the month portion of a dtl value by a specified number.

The addday() function

Increases the day portion of a dtl value by a specified number.

The addhour() function

Increases the hour portion of a dtl value by a specified number.

The addminute() function

Increases the minute portion of a dtl value by a specified number.

The addsecond() function

Increases the second portion of a dtl value by a specified number.

The startofyear() function

Resets all but the year portion of a dtl value.

The startofmonth() function

Resets the day, hour, and second portions of a dtl value.

The startofday() function

Resets the hour, minute, and second portions of a dtl value.

The formatnumber() function

Converts a numeric value to a string.

The formatdtl() function

Converts a dtl value to a string.