Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions content/cn/docs/clients/hugegraph-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ PropertyKey 允许定义的约束信息包括:name、datatype、cardinality、
| asByte() | Byte |
| asBlob() | Byte[] |
| asDouble() | Double |
| asDecimal() | BigDecimal(精确十进制;不可索引,不可作主键/排序键;自包含 apache/hugegraph#3209 与 #771 的版本起可用) |
| asFloat() | Float |
| asLong() | Long |

Expand Down
2 changes: 1 addition & 1 deletion content/cn/docs/clients/restful-api/propertykey.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: "PropertyKey(属性键)REST 接口:定义图中所有属性的
Params 说明:

- name:属性类型名称,必填
- data_type:属性类型数据类型,包括:bool、byte、int、long、float、double、text、date、uuid、blob,默认 `text` 类型 (代表 string 字符串类型)
- data_type:属性类型数据类型,包括:bool、byte、int、long、float、double、decimal、text、date、uuid、blob,默认 `text` 类型 (代表 string 字符串类型)。`decimal` 为精确十进制数 (Java `BigDecimal`):最多 128 位有效数字,小数位数 (scale) 绝对值不超过 128;请求中可以用 JSON 数字或字符串传入,两种形式都会被精确读取;响应中以字符串返回(例如 `"amount": "12345678901234567890.123456789012345678"`),客户端应使用 `new BigDecimal(String)` 解析,不要按 double 解析。decimal 属性不能建索引,不能作为主键或边的排序键,也不能设置 OLAP 索引类的 write type(仅支持 `OLAP_COMMON`)。自包含 apache/hugegraph#3209 与 apache/hugegraph-toolchain#771 的版本起可用
- cardinality:属性类型基数,包括:single、list、set,默认 `single` (代表单属性值)

请求体字段说明:
Expand Down
1 change: 1 addition & 0 deletions content/en/docs/clients/hugegraph-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ The constraint information that PropertyKey allows to define includes: name, dat
| asByte() | Byte |
| asBlob() | Byte[] |
| asDouble() | Double |
| asDecimal() | BigDecimal (exact decimal, not indexable, not a primary/sort key; from the release with apache/hugegraph#3209 and #771) |
| asFloat() | Float |
| asLong() | Long |

Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/clients/restful-api/propertykey.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: "PropertyKey REST API: Define data types and cardinality constraint
Params Description:

- name: The name of the property type, required.
- data_type: The data type of the property type, including: bool, byte, int, long, float, double, text, blob, date, uuid. The default data type is `text` (Represent a `string` type)
- data_type: The data type of the property type, including: bool, byte, int, long, float, double, decimal, text, blob, date, uuid. The default data type is `text` (Represent a `string` type). `decimal` holds an exact decimal number (Java `BigDecimal`): at most 128 significant digits and a scale of at most 128 in either direction; in a request it may be sent as a JSON number or as a string and is read exactly either way; in a response it is returned as a string (e.g. `"amount": "12345678901234567890.123456789012345678"`), so a client parses it with `new BigDecimal(String)`, never as a double. A decimal key cannot be indexed, used as a primary key or an edge sort key, or given an OLAP index write type (only `OLAP_COMMON`). Available from the release that ships apache/hugegraph#3209 and apache/hugegraph-toolchain#771
- cardinality: The cardinality of the property type, including: single, list, set. The default cardinality is `single`.

Request Body Field Description:
Expand Down