Data Types

This is the list of data types supported by Machbase.

Table 1. Data types of Machbase

Name of Type Description Range of values
short 16-bit signed integer data type. It is the same as the 16-bit signed integer data of C language. It recognizes NULL for the minimum negative value. It may be expressed as "int16". -32767 ~ 32767/ -32768 is NULL
ushort 16-bit unsigned integer data type. It is the same as the 16-bit unsigned integer data of C language. It recognizes NULL for the minimum negative value. It may be expressed as "uint16". 0 ~ 65534/ 65535 is NULL
integer 32-bit signed integer data type. It is the same as the 32-bit signed integer data of C language. It recognizes NULL for the minimum negative value. It may be expressed as "int32". -2147483647 ~ 2147483647/ -2147483648 is NULL
uinteger 32-bit unsigned integer data type. It is the same as the 32-bit unsigned integer data of C language. It recognizes NULL for the minimum negative value. It may be expressed as "uint32". 0 ~ 4294967294/ 4294967295 is NULL.
long 64-bit signed integer data type. It is the same as the 64-bit signed integer data of C language. It recognizes NULL for the minimum negative value. It may be expressed as "int64". -9223372036854775807 ~ 9223372036854775807/ -9223372036854775808 is NULL.
ulong 64-bit unsigned integer data type. It is the same as the 64-bit unsigned integer data of C language. It recognizes NULL for the minimum negative value. It may be expressed as "uint64". 0~18446744073709551614/ 18446744073709551614 is NULL.
float 32-bit floating-point data type. It is the same as a 32-bit floating-point data type of C language. It recognizes NULL for the positive maximum value. 1.175494e-38 ~ 3.402823e+38/ 3.402823466e+38 is NULL
double 64-bit floating-point data type. It is the same as the 64-bit floating-point data type of C language. It recognizes NULL for the positive maximum value. 2.225074e-308 ~ 1.797693e+308/ 1.7976931348623158e+308 NULL
datetime Time and Date. In Machbase, this type maintains the nano values of the time after January 1, 1970. Therefore, it processes the values in nano unit in datetime related functions. It can be expressed after 1970-01-01 00:00:00 000:000:000.
varchar Variable-length strings (UTF-8). It is the variable string data type, and the maximum length of varchar type is up to 32K byte. The standard length is based on one character in English. Therefore the number of characters that are displayed will be different from the actual number of characters expressed in UTF-8. Users need to set the adequate length. It is possible from varchar(1) to varchar(32K byte). The input data should be encoded byUTF-8, then there will be no problem.
ipv4 Version 4 of the Internet address type (4 bit)/ This type can save an address that is used in Internet Protocol Version 4. Internally, Machbase uses 4-bytes and it can be expressed from "0.0.0.0" to "255.255.255.255". "0.0.0.0" ~ "255.255.255.255"
ipv6 Version 6 of the Internet address type (16 bit)/ This type can save an address that is used in Internet Protocol Version 6. Internally, Machbase uses 16-bytes, and it can be expressed from "0000:0000:0000:0000:0000:0000:0000:0000" to "FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF". It can be expressed by using the symbol ":" as follows because Machbase also supports abbreviation for data insertion. - "::FFFF:1232": when all of front digits are 0/ - "::FFFF:192.168.0.3": support compatible type for IPv4/ - "::192.168.3.1": support compatible type for deprecated IPv4. "0000:0000:0000:0000:0000:0000:0000:0000" ~ "FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF"
text Text data type (Keyword Index can be created.)/ This is for storing a string or document that exceeds the size of VARCHAR. This type can be searched via keyword index, and it can store texts up to 64MB. The text type stores a large text file as a separate column and it is used for searching. It can be saved from 0 to 64M byte.
binary Binary data type (Creating index is not possible.)/ This type is supported to store unstructured data in column. It is used for storing binary data such as images, videos clips or voice recordings, but it cannot be searched by generating the index. Just like text type, it can store data up to 64MB. It can be saved from 0 to 64M byte.

results matching ""

    No results matching ""