Primitive Types
blob
-
< blob > toString ( string encoding ) ( string )
Converts blob to a string
Parameter Name Data Type Description encoding string Encoding to used in blob conversion to string Return Variable Data Type Description string String representation of the given blob
table
-
< table > add ( any data )
Add struct to the table.
Parameter Name Data Type Description data any A struct with data -
< table > close ( )
Releases the database connection.
-
< table > getNext ( ) ( any )
Retrives the current row and return a struct with the data in the columns
Return Variable Data Type Description any The resulting row as a struct -
< table > hasNext ( ) ( boolean )
Checks for a new row in the given table. If a new row is found, moves the cursor to it.
Return Variable Data Type Description boolean True if there is a new row; false otherwise -
< table > remove ( function(any)returns(boolean) func ) ( int )
Remove data from the table.
Parameter Name Data Type Description func function(any)returns(boolean) The function pointer for delete crieteria Return Variable Data Type Description int
json
-
< json > getKeys ( ) ( string[] )
Returns an array of keys contained in the specified JSON.
Return Variable Data Type Description string[] A string array of keys contained in the specified JSON -
< json > remove ( string key )
Removes each element that matches the given key.
Parameter Name Data Type Description key string Key of the field to remove -
< json > toString ( ) ( string )
Converts a JSON object to a string representation
Return Variable Data Type Description string String value of the converted JSON -
< json > toXML ( struct {string attributePrefix, string arrayEntryTag} options ) ( xml , error )
Converts a JSON object to a XML representation
Parameter Name Data Type Description options struct {string attributePrefix, string arrayEntryTag} jsonOptions struct for JSON to XML conversion properties Return Variable Data Type Description xml The XML representation of the JSON error
string
-
< string > contains ( string subString ) ( boolean )
Returns a Boolean value indicating whether a string contains the specified substring
Parameter Name Data Type Description subString string The substring to be compared Return Variable Data Type Description boolean True if the string contains the substring; false otherwise -
< string > equalsIgnoreCase ( string anotherString ) ( boolean )
Compares two strings, ignoring the case of the strings
Parameter Name Data Type Description anotherString string The string to be compared Return Variable Data Type Description boolean True if the strings are equal; false otherwise -
< string > findAllWithRegex ( Regex reg ) ( string[] , error )
Finds all the strings matching the regular expression
Parameter Name Data Type Description reg Regex Regular expression Return Variable Data Type Description string[] The matching string array error error: Error will be returned if there exist a syntax error in pattern -
< string > hasPrefix ( string prefix ) ( boolean )
Returns a Boolean value indicating whether a string starts with the specified prefix
Parameter Name Data Type Description prefix string The prefix to be compared Return Variable Data Type Description boolean True if the string starts with the prefix; false otherwise -
< string > hasSuffix ( string suffix ) ( boolean )
Returns a Boolean value indicating whether the string ends with specified suffix
Parameter Name Data Type Description suffix string The suffix to be compared Return Variable Data Type Description boolean True if the string ends with the suffix; false otherwise -
< string > indexOf ( string subString ) ( int )
Returns the first index of the first occurence of the substring within the specified string
Parameter Name Data Type Description subString string The substring to search for Return Variable Data Type Description int The index of the first occurence of the substring -
< string > lastIndexOf ( string subString ) ( int )
Returns the first index of the last occurence of the substring within the specified string
Parameter Name Data Type Description subString string The substring to search for Return Variable Data Type Description int The index of the last occurence of the substring -
< string > length ( ) ( int )
Returns the length of the specified string
Return Variable Data Type Description int The length of the specified string -
< string > matchesWithRegex ( Regex reg ) ( boolean , error )
Returns a Boolean value indicating whether the string matches the regular expression
Parameter Name Data Type Description reg Regex Regular expression Return Variable Data Type Description boolean True if the string matches the regex; false otherwise error error: Error will be returned if there exist a syntax error in pattern -
< string > replace ( string replacePattern , string replaceWith ) ( string )
Replaces all instances of the replacePattern string with the replaceWith string and returns the result
Parameter Name Data Type Description replacePattern string The pattern to search for replaceWith string The replacement string Return Variable Data Type Description string The derived string -
< string > replaceAll ( string replacePattern , string replaceWith ) ( string )
Replaces each substring of the mainString that matches the given regular expression with the given replacement
Parameter Name Data Type Description replacePattern string The regular expression to search for replaceWith string The replacement string Return Variable Data Type Description string The derived string -
< string > replaceAllWithRegex ( Regex reg , string replaceWith ) ( string , error )
Replaces the mainString with the replacement of occurrences that matches the given regular expression
Parameter Name Data Type Description reg Regex Regular expression replaceWith string The replacement string Return Variable Data Type Description string The derived string error error: Error will be returned if there exist a syntax error in pattern -
< string > replaceFirst ( string replacePattern , string replaceWith ) ( string )
Replaces the first instance of the replacePattern with the replaceWith string and returns the result
Parameter Name Data Type Description replacePattern string The pattern to search for replaceWith string The replacement string Return Variable Data Type Description string The derived string -
< string > replaceFirstWithRegex ( Regex reg , string replaceWith ) ( string , error )
Replaces the first instance of the regular expression matching area with the replaceWith string and returns the result
Parameter Name Data Type Description reg Regex Regular expression replaceWith string The replacement string Return Variable Data Type Description string The derived string error error: Error will be returned if there exist a syntax error in pattern -
< string > split ( string regex ) ( string[] )
Splits the string with the given regular expression to produce a string array.
Parameter Name Data Type Description regex string The regex to split the string Return Variable Data Type Description string[] The split string array -
< string > subString ( int from , int to ) ( string )
Returns a new string that is the substring of the specified string
Parameter Name Data Type Description from int The starting index to int The ending index Return Variable Data Type Description string The derived sub string -
< string > toBlob ( string encoding ) ( blob )
Converts string to a blob
Parameter Name Data Type Description encoding string Encoding to used in the conversion Return Variable Data Type Description blob The blob representation of the given String -
< string > toLowerCase ( ) ( string )
Returns a string with all the characters converted to lowercase
Return Variable Data Type Description string The string converted to lowercase -
< string > toUpperCase ( ) ( string )
Returns a string with all the characters converted to uppercase
Return Variable Data Type Description string The string converted to uppercase -
< string > trim ( ) ( string )
Returns a trimmed string by omitting the leading and trailing whitespaces of the original string
Return Variable Data Type Description string The derived string -
< string > unescape ( ) ( string )
Returns an unescaped string by omitting the escape characters of the original string
Return Variable Data Type Description string The derived string
map
-
< map > clear ( )
Clear the items from given map
-
< map > hasKey ( string key ) ( boolean )
Check whether specific key exists from the given map
Parameter Name Data Type Description key string The key to be find existence Return Variable Data Type Description boolean -
< map > keys ( ) ( string[] )
Returns an array of keys contained in the specified map
Return Variable Data Type Description string[] A string array of keys contained in the specified map -
< map > remove ( string key )
Removes the specified element from the map
Parameter Name Data Type Description key string The key to be removed -
< map > values ( ) ( any[] )
Returns an array of values contained in the specified map
Return Variable Data Type Description any[] An any array of values contained in the specified map
xml
-
< xml > children ( ) ( xml )
Selects all the children of the elements in an XML, and return as a sequence.
Return Variable Data Type Description xml All the children of the elements in the xml -
< xml > copy ( ) ( xml )
Make a deep copy of an XML.
Return Variable Data Type Description xml A Copy of the XML -
< xml > elements ( ) ( xml )
Get all the items that are of element type in an XML sequence.
Return Variable Data Type Description xml All the elements-type items in the given XML sequence -
< xml > getElementName ( ) ( string )
Get the fully qualified name of the element as a string. Returns an empty string if the XML is not a singleton.
Return Variable Data Type Description string Qualified name of the XML as a string -
< xml > getItemType ( ) ( string )
Get the type of a XML as a string. If the XML is singleton, type can be one of 'element', 'text', 'comment' or 'pi'. Returns an empty string if the XML is not a singleton.
Return Variable Data Type Description string Type of the XML as a string -
< xml > getTextValue ( ) ( string )
Get the text value of a XML. If the XML is a sequence, concatenation of the text values of the members of the sequence is returned. If the XML is an element, then the text value of the sequence of children is returned. If the XML is a text item, then the text is returned. Otherwise, an empty string is returned.
Return Variable Data Type Description string Text value of the xml -
< xml > isEmpty ( ) ( boolean )
Check whether the XML sequence is empty.
Return Variable Data Type Description boolean Boolean flag indicating whether the XML sequence is empty -
< xml > isSingleton ( ) ( boolean )
Check whether the XML sequence contains only a single element.
Return Variable Data Type Description boolean Boolean flag indicating whether the XML sequence contains only a single element -
< xml > removeAttribute ( string qname )
Remove an attribute from an XML.
Parameter Name Data Type Description qname string Qualified name of the attribute -
< xml > select ( string qname ) ( xml )
Get all the items that are of element type, and matches the given qualified name, in an XML sequence.
Parameter Name Data Type Description qname string Qualified name of the element Return Variable Data Type Description xml All the elements-type items in the given XML sequence, that matches the qualified name -
< xml > selectChildren ( string qname ) ( xml )
Selects all the children of the elements in this sequence that matches the given qualified name.
Parameter Name Data Type Description qname string Qualified name of the element Return Variable Data Type Description xml All the children of the elements in this sequence that matches the given qualified name -
< xml > selectDescendants ( string qname ) ( xml )
Searches in children recursively for elements matching the qualified name and returns a sequence containing them all. Does not search within a matched result.
Parameter Name Data Type Description qname string Qualified name of the element Return Variable Data Type Description xml All the descendants that matches the given qualified name, as a sequence -
< xml > setAttributes ( map attributes )
Sets the attributes to the provided attributes map.
Parameter Name Data Type Description attributes map Attributes map -
< xml > setChildren ( xml children )
Set the children of an XML if its a singleton. An Error otherwise. Any existing children will be removed.
Parameter Name Data Type Description children xml -
< xml > slice ( int startIndex , int endIndex ) ( xml )
Slice and return a subsequence of the an XML sequence.
Parameter Name Data Type Description startIndex int Start index, inclusive endIndex int End index, exclusive Return Variable Data Type Description xml Sliced sequence -
< xml > strip ( ) ( xml )
Strips any text items from an XML sequence that are all whitespace.
Return Variable Data Type Description xml Striped sequence -
< xml > toJSON ( struct {string attributePrefix, boolean preserveNamespaces} options ) ( json )
Converts a XML object to a JSON representation
Parameter Name Data Type Description options struct {string attributePrefix, boolean preserveNamespaces} xmlOptions struct for XML to JSON conversion properties Return Variable Data Type Description json JSON representation of the given XML