Key-ids 在 GAE 上的 NDB 上自动生成
Key-ids generated automatically on NDB on GAE
我在官方文档中找到了关于标题的声明如下1。
这里好像说的是auto-generatednumeric number最多16位。
Cloud Datastore can also automatically assign IDs. Cloud Datastore generates a random sequence of unused IDs that are approximately uniformly distributed. Each ID can be up to 16 decimal digits long.
虽然上面说了,但根据我的实验,所有auto-generated数字都是FIX 16位数字。
如果文档说的是真的,那么对attributing-bugs采取措施是不是更好?
欢迎任何获得 auto-generated 少于 15 位数字的人。
Cloud Datastore 有一个 legacy id allocation policy,其数字通常低于 16 位,但不保证如此。
一般来说,如果您对云数据存储 ID 的格式有要求,我建议您制定自己的 ID 分配策略(使用基于字符串的 ID 作为键)。这将让您对您的 ID 的外观做出保证。
我在官方文档中找到了关于标题的声明如下1。
这里好像说的是auto-generatednumeric number最多16位。
Cloud Datastore can also automatically assign IDs. Cloud Datastore generates a random sequence of unused IDs that are approximately uniformly distributed. Each ID can be up to 16 decimal digits long.
虽然上面说了,但根据我的实验,所有auto-generated数字都是FIX 16位数字。 如果文档说的是真的,那么对attributing-bugs采取措施是不是更好?
欢迎任何获得 auto-generated 少于 15 位数字的人。
Cloud Datastore 有一个 legacy id allocation policy,其数字通常低于 16 位,但不保证如此。
一般来说,如果您对云数据存储 ID 的格式有要求,我建议您制定自己的 ID 分配策略(使用基于字符串的 ID 作为键)。这将让您对您的 ID 的外观做出保证。