Binary types
Binary types
Binary types
Section | Description |
---|---|
BINARY is a FairCom database field type containing a binary value. | |
VARBINARY is a FairCom database field type containing a variable-length binary value. | |
LVARBINARY is a FairCom database field type containing a variable-length binary value. |
BINARY is a FairCom database field type containing a binary value. It is stored in a record as a series of bytes . It has a fixed length from 1 to 65,500 bytes, which is stored once in the table's header. If a value is smaller than its fixed length, the server uses padding to fill in missing bytes at the end.
In FairCom's JSON DB API, a BINARY value is represented in JSON as a string containing Base64 or HEX characters.
In FairCom's SQL API, a BINARY value is submitted and returned in one of three ways:
As a binary constant represented as
b'11010001100101110110011011001101111'
.As a HEX constant represented as
x'68656c6c6f'
.As an ASCII string (such as
'hello')
, where its ASCII characters are stored directly as a sequence of ASCII codes — for example,104 101 108 108 111
.
In FairCom's ISAM and CTDB APIs, a BINARY value is submitted and returned as a sequence of bytes.
VARBINARY is a FairCom database field type containing a variable-length binary value. It is stored in a record
as a variable-length sequence of bytes with a user-defined maximum length of up to 65,500 bytes.
In FairCom's JSON DB API, a VARBINARY value is represented in JSON as a string containing Base64 or HEX characters.
In FairCom's SQL API, a VARBINARY value is submitted and returned in one of three ways:
As a binary constant represented as
b'11010001100101110110011011001101111'
.As a HEX constant represented as
x'68656c6c6f'
.As an ASCII string (such as
'hello'
), where its ASCII characters are stored directly as a sequence of ASCII codes — for example,104 101 108 108 111
.
In FairCom's ISAM and CTDB APIs, a VARBINARY value is submitted and returned as a sequence of bytes.
LVARBINARY is a FairCom database field type containing a variable-length binary value. It is stored as a variable-length sequence of bytes up to 2 Gigabytes in length. Each LVARBINARY field in each record includes a 4-byte length header.
In FairCom's JSON DB API, a BINARY value is represented in JSON as a string containing Base64 or HEX characters.
In FairCom's SQL API, an LVARBINARY value is submitted and returned in one of three ways:
As a binary constant represented as
b'11010001100101110110011011001101111'
.As a HEX constant represented as
x'68656c6c6f'
.As an ASCII string (such as
'hello'
), where its ASCII characters are stored directly as a sequence of ASCII codes — for example,104 101 108 108 111
.
In FairCom's ISAM and CTDB APIs, a BINARY value is submitted and returned as a sequence of bytes.