allocate_ids函数是否总是返回正值? 或者它可以有时返回负值或零值吗?allocate_id总是返回正值吗?
0
A
回答
0
在谷歌组评论人称为Stephen说关于db.model
:
IDs are 64bit positive integers. If you allocate IDs for an entity called 'Sequence' you can use them for any other entity kind, including entities with parents which would otherwise use a unique range if auto allocated. IDs from 'Sequence' will be unique within your datastore, which is a superset of the requirement that IDs be unique per-entity group. However, you must always then use an ID from Sequence and never allow auto-allocation.
他似乎知道他在说什么。我无法找到另一个对数据存储的自动ID序列发生器,但在这种类似question这里的allocateids java的定义被链接到和它说,它可以抛出这个错误:
java.lang.IllegalArgumentException - If parent is not a complete key, if num is less than 1, or if num is greater than 1 billion.
相关问题
- 1. 返回值总是暂时的吗?
- 2. 减号操作总是返回正值
- 3. Textbox.Text.GetTypeCode()总是返回“string”吗?
- 4. 总是返回零值
- 5. DataTable总是返回空值
- 6. SharedPreferences值总是返回true?
- 7. getRingerMode()总是返回值0
- 8. linq2sql表达式总是返回IQueryable吗?
- 9. COUNT(*)总是返回结果吗?
- 10. GetBodyCount()在Box2d中总是返回0吗?
- 11. RInterface.GetArrayToVBA()总是返回一个数组吗?
- 12. 总是返回功能明智吗?
- 13. RegDBKeyExists总是返回-1(不正确)
- 14. 使用ActiveRecord时,应该总是检查“save”的返回值吗?
- 15. Oracle dbms_utilities.get_hash_value总是为不同的输入返回唯一值吗?
- 16. 返回值0总是在存储过程中成功吗?
- 17. isItemChecked总是返回与onItemClickListener内部应该相反的值吗?
- 18. Random.Next返回总是相同的值
- 19. getIntExtra总是返回默认值
- 20. 布尔值总是返回false
- 21. javascript的返回值总是未定义
- 22. Angular2 Click方法总是返回假值
- 23. Random.Next总是返回相同的值
- 24. localtimestamp总是返回相同的值
- 25. Random.Next()总是返回相同的值
- 26. wifi getLinkSpeed()总是返回一个值
- 27. 函数总是返回相同的值
- 28. UUID.randomUUID()。getLeastSignificantBits()总是返回负值?
- 29. 返回值:: EXEC(总是QDialog的::拒绝
- 30. Geocoder并不总是返回值
嗨,保罗。感谢您的帮助。我明白它不应该返回负数或零数字。 – hogedigo 2013-02-27 00:21:39
第二个引用超出了上下文 - 它并没有引用该ID,而是指定了该参数应该返回多少个ID。还要注意,生成的ID现在限制为53位,以便与js整数一起使用。 – Tom 2014-07-18 17:25:34