Skip to main content
Version: 5.x

Built-in classes

Built-in classes are classes whose instances are objects belonging to primitive data types such as integers, strings, etc.

Class nameDescriptionlsFusion literals
INTEGER32-bit integer5, 23, 1000000000
LONG64-bit integer5l, 23L, 10000000000000L
DOUBLE64-bit floating point number5.0d, 2.35D
NUMERIC[ , ]Number with fixed width and precision5.0, 2.35
BOOLEANLogical data typeTRUE, NULL
TBOOLEANLogical data type (3-state)TTRUE, TFALSE, NULL
DATEDate13_07_1982
DATETIMEDate and time13_07_1982_18:00
TIMETime18:00
YEARYear
STRING, STRING[ ]String data type with optional maximum length, case-sensitive
ISTRING, ISTRING[ ]String data type with optional maximum length, case-insensitive
BPSTRING[]String data type with maximum length, case-sensitive, padded at the end with spaces'text', 'text with\nbreak'
BPISTRING[]String data type with maximum length, case-insensitive, padded at the end with spaces
TEXTString data type of arbitrary length, case-sensitive
RICHTEXTString data type of arbitrary length with formatting
COLORColor#00ccff, #AA55CC, RGB(0, 255, 0)
JSONJSON{"a":["x","y","z"]}
FILEFile of dynamic type (file content together with extension)
NAMEDFILEFile of dynamic type (file content together with name and extension)
RAWFILE, WORDFILE, IMAGEFILE, PDFFILE, EXCELFILE, CSVFILE, HTMLFILE, JSONFILE, XMLFILE, TABLEFILEFiles of specific type (RAWFILE: file with no extension or with unknown extension)
LINKLink to a file (URI)
RAWLINK, WORDLINK, IMAGELINK, PDFLINK, EXCELLINK, CSVLINK, HTMLLINK, JSONLINK, XMLLINK, TABLELINKLink to a file of a specific type (RAWLINK: link to a file with no extension or an unknown extension)

Inheritance

The builtin classes can be divided into four class families (assuming that each of the remaining classes forms its own class family)

Class familyDescription
NumbersINTEGER, LONG, DOUBLE, NUMERIC[ , ]
StringsSTRING, STRING[ ], ISTRING, ISTRING[], BPSTRING[ ], BPISTRING[ ], TEXT
Files of a specific typeRAWFILE, WORDFILE, IMAGEFILE, PDFFILE, EXCELFILE, CSVFILE, HTMLFILE, JSONFILE, XMLFILE, TABLEFILE
Links to files of a specific typeRAWLINK, WORDLINK, IMAGELINK, PDFLINK, EXCELLINK, CSVLINK, HTMLLINK, JSONLINK, XMLLINK, TABLELINK

The builtin classes inherit only from one another within a single family, and cannot inherit from or be inherited by user classes. Inheritance within each family works on the principle that the narrower class inherits from the broader one.

Common ancestor

According to this inheritance mechanism, the common ancestor of two builtin classes (e.g. for the selection operation) is determined as follows:

Strings

result = STRING[blankPadded = s1.blankPadded OR s2.blankPadded, 
caseInsensitive = s1.caseInsensitive OR s2.caseInsensitive,
length = MAX(s1.length, s2.length)]

where blankPadded, caseInsensitive and length are in turn determined as:

Class nameblankPaddedcaseInsensitivelength
STRING[n]falsefalsen
ISTRING[n]falsetruen
BPSTRING[n]truefalsen
BPISTRING[n]truetruen
TEXTfalsefalseinfinite

Numbers

IF p1.integerPart >= p2.integerPart AND p1.precision >= p2.precision
result = p1
ELSE IF p1.integerPart <= p2.integerPart AND p1.precision <= p2.precision
result = p2
ELSE IF p1.integerPart > p2.integerPart
result = NUMERIC[p1.integerPart+p2.precision, p2.precision]
ELSE
result = NUMERIC[p2.integerPart+p1.precision, p1.precision]

where integerPart and precision, in turn, are determined as:

Class nameintegerPartprecision
INTEGER100
DOUBLE9999999999
LONG200
NUMERIC[l,p]length-precisionprecision

Files of a specific type

IF p1 = p2
result = p1
ELSE
result = RAWFILE
IF p1 = p2
result = p1
ELSE
result = RAWLINK

Note that sometimes in programming the definition of a common parent class is associated with implicit typecasting.

Default value

It is sometimes necessary to use some value for a built-in class which will differ from NULL (for example, in an import condition with data import). Let's call this value the default value. It is defined as follows:

Class nameDefault value
Numerical classes0
StringsThe empty string
DATE, TIME, DATETIMEThe current date / time / date and time
BOOLEANTRUE
COLORWhite
JSON
Files of a specific typeEmpty file
FILEEmpty file with empty extension
NAMEDFILEEmpty file with empty name and extension

Extensions of specific type files

When files of a specific type (JSONFILE, XMLFILE, ...) are cast into a file of dynamic type (FILE, NAMEDFILE), whether explicitly or implicitly (e.g. with data import without specifying a format or when working with external systems), the extension of the result file is determined as follows:

Class nameExtension
RAWFILEThe empty string
JSONFILEjson
XMLFILExml
CSVFILEcsv
WORDFILEdoc
EXCELFILExls
HTMLFILEhtml
PDFFILEpdf
IMAGEFILEjpg
TABLEFILEtable

The order of determining the result property when accessing from an external system

Class nameProperty name
FILE, NAMEDFILE, RAWFILE, WORDFILE, IMAGEFILE, PDFFILE, EXCELFILE, CSVFILE, HTMLFILE, JSONFILE, XMLFILE, TABLEFILEexportFile, exportNamedFile,exportRawFile, exportWordFile, exportImageFile, exportPdfFile, exportExcelFile, exportCsvFile, exportHtmlFile, exportJsonFile, exportXmlFile
TEXT, STRING, BPSTRINGexportText, exportString, exportBPString
NUMERIC, LONG, INTEGER, DOUBLEexportNumeric, exportLong, exportInteger, exportDouble
DATETIME, DATE, TIME, YEARexportDateTime, exportDate, exportTime, exportYear
LINK, RAWLINK, WORDLINK, IMAGELINK, PDFLINK, EXCELLINK, CSVLINK, HTMLLINK, JSONLINK, XMLLINK, TABLELINKexportFile, exportRawFile, exportWordFile, exportImageFile, exportPdfFile, exportExcelFile, exportCsvFile, exportHtmlFile, exportJsonFile, exportXmlFile
BOOLEAN, COLOR, JSONexportBoolean, exportColor, exportJSON
User classesexportObject