nGQL supports both integer and floating-point number.
Signed 64-bit integer (INT64), 32-bit integer (INT32), 16-bit integer (INT16), and 8-bit integer (INT8) are supported.
||-9,223,372,036,854,775,808 ~ 9,223,372,036,854,775,807|
||-2,147,483,648 ~ 2,147,483,647|
||-32,768 ~ 32,767|
||-128 ~ 127|
Both single-precision floating-point format (FLOAT) and double-precision floating-point format (DOUBLE) are supported.
||3.4E +/- 38||6~7 bits|
||1.7E +/- 308||15~16 bits|
Scientific notation is also supported, such as
The data type of DECIMAL in MySQL is not supported.
Reading and writing of data values¶
When writing and reading different types of data, nGQL complies with the following rules:
|Data type||Set as VID||Set as property||Resulted data type|
For example, nGQL does not support setting VID as INT8, but supports setting a certain property type of TAG or Edge type as INT8. When using the nGQL statement to read the property of INT8, the resulted type is INT64.
Multiple formats are supported:
- Decimal, such as
- Hexadecimal, such as
- Octal, such as
However, Nebula Graph will parse the written non-decimal value into a decimal value and save it. The value read is decimal.
For example, the type of the property
INT. The value of
0xb is assigned to it through the INSERT statement. If querying the property value with statements such as FETCH, you will get the result
11, which is the decimal result of the hexadecimal