The BqlLib gives you access to some function that you can call in your BQL:

To invoke a function from the BqlLib, just add btibCore:BqlLib.<MethodName>(<MethodParameters>) to your BQL. 
Example: btibCore:BqlLib.currentTimeMillis() will return the current time in milliseconds.


The parameters must be separated by commas. String and SFormat parameter must be between single quotes.
Example: btibCore:BqlLib.truncate('A very long sentence', 10) 


Here is a list of the available functions:

Method NameMethod ParametersMethod Description

escape

String Escapes the given String parameter.

unescape

String Unescapes the given String parameter.

toLowerCase

String

Converts all the characters in the given String to lower case.

fromFriendly

String

Removes the friendly case.

toFriendly

String

Applies the friendly case to the given String.

instanceOf

String

Checks if the objects in the rows are an instance of the given type.  (the type must be given using this format moduleName:TypeName)

instanceOf

SFormat String

Checks that the component targeted by the SFormat is an instance of the given type.

currentTimeMillis


Returns the current time in millis.

toInteger

Double

Converts the given Double into an Integer.

substring

String Integer

Returns a string that is a substring of the given String starting at the given index (Integer)

truncate

String Integer

Truncates the given string at the given index (Integer)

isCurrentStation

String

Returns whether the given parameter is current station name or not

sFormat

SFormat

Resolves the given SFormat. Will use the objects in the rows as a base

resolve

String

Gets the property targeted by the String and resolves the SFormat it contains