哪种数据类型是存储自动生成密钥的arangodb?

时间:2021-11-25 16:58:32

can anybody tell me which data type is arangodb storing his auto-generated _key's?

谁能告诉我哪种数据类型是arangodb存储他自动生成的_key?

Is it number or string?

是数字还是字符串?

If i store a "foreign key" in a document from a dataset of antoher document, is it better for querys to store it as string or number?

如果我从antoher文档的数据集中将“外键”存储在文档中,查询是否更好地将其存储为字符串或数字?

Greetings mok

1 个解决方案

#1


3  

The _key attribute in every collection is always supposed to be a string, and only string values will be stored in it. So if your input data for _key is a number, it will be safest to convert it into a string first.

每个集合中的_key属性始终应该是一个字符串,并且只有字符串值将存储在其中。因此,如果_key的输入数据是一个数字,那么首先将其转换为字符串是最安全的。

#1


3  

The _key attribute in every collection is always supposed to be a string, and only string values will be stored in it. So if your input data for _key is a number, it will be safest to convert it into a string first.

每个集合中的_key属性始终应该是一个字符串,并且只有字符串值将存储在其中。因此,如果_key的输入数据是一个数字,那么首先将其转换为字符串是最安全的。