Product Documentation

MQTT V3 Plug-in Reference

Previous Topic

Next Topic

"fieldType"

  • String
  • Required

It defines the data type of the field in the table.

Valid field types are:

  • "DATE" — stored as days since March 1, 1700
  • "TIME" — stored as milliseconds since midnight
  • "TIMESTAMP" — stored as a date and a time

 

  • "TINYINT" — 8-bit Integer
  • "SMALLINT" — 16-bit Integer
  • "INTEGER" — 32-bit Integer
  • "BIGINT" — 64-bit Integer (-9223372036854775807 to 9223372036854775806, which is 1 "inward" from the industry standard of -9223372036854775808 to 9223372036854775807)

 

  • "MONEY" — 10 decimal digits with 2 decimal places
  • "NUMBER" — 32 decimal digits with N decimal places specified by the "fieldScale" property
  • "REAL" — 32-bit IEEE binary floating point number
  • "DOUBLE" — 64-bit IEEE binary floating point number

 

  • "CHAR" — Fixed-length ASCII string <= 8,192
  • "NCHAR" — Fixed-length UTF-16 string <= 65,535
  • "VARCHAR" — Variable-length ASCII string <= 8,192
  • "LVARCHAR" — Variable-length ASCII string <= 2GB
  • "NVARCHAR" — Variable-length UTF-16 string <= 65,535

 

  • "BIT" — Boolean: the following values are interpreted as 0: 0, 0.0, -0, false (using any case), "" (empty string), null, [], {}. All others are interpreted as 1.
  • "BINARY" — Fixed-length array of bytes <= 8,192
  • "VARBINARY" — Variable-length array of bytes <= 65,535
  • "LVARBINARY" — Variable-length array of bytes <= 2GB

 

  • "JSON" — Variable-length UTF-16 string <= 65,535

Unsupported field types presently include:

  • "CURRENCY" — 19 decimal digits with 4 decimal places (not presently supported)

See Data Types in the FairCom DB SQL Reference Guide for full documentation on c-tree field types.

If a field is configured incorrectly, the operation fails. c-tree logs an error to its CTSTATUS.FCS file.

Note:

You can first create a table in SQL and then create a Persistence Topic that is assigned to that table.

Some SQL types are not specified in the list of MQTT types. Below is a table showing how additional SQL types map to MQTT types.

SQL

 

MQTT

CLOB

LVARBINARY

BLOB

LVARBINARY

NUMERIC

NUMBER

DECIMAL

NUMBER

MONEY

NUMBER

FLOAT

DOUBLE

TOCIndex