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. System.get_property('phone_id')总是返回一个值吗?
- 3. Screen.PrimaryScreen.WorkingArea不总是返回正确的值
- 4. 减号操作总是返回正值
- 5. Textbox.Text.GetTypeCode()总是返回“string”吗?
- 6. DataTable总是返回空值
- 7. 总是返回零值
- 8. Jquery的值总是返回
- 9. 总是返回空值
- 10. HttpContext.Current.Error.InnerException总是返回空值
- 11. BitmapFactory.decodeStream总是返回空值
- 12. SharedPreferences值总是返回true?
- 13. getRingerMode()总是返回值0
- 14. Windows API`GetPixel()'总是返回`CLR_INVALID`,但是`SetPixel()`工作正常吗?
- 15. 吗啡聚合管道总是返回
- 16. jQuery总是返回数组吗?
- 17. COUNT(*)总是返回结果吗?
- 18. 总是返回功能明智吗?
- 19. linq2sql表达式总是返回IQueryable吗?
- 20. RInterface.GetArrayToVBA()总是返回一个数组吗?
- 21. GetBodyCount()在Box2d中总是返回0吗?
- 22. RollingAppander总是返回null而不是值
- 23. 从正在返回的界面投射?它总是安全吗?
- 24. RegDBKeyExists总是返回-1(不正确)
- 25. 正则表达式总是返回true
- 26. isItemChecked总是返回与onItemClickListener内部应该相反的值吗?
- 27. R`unique`总是以相同的顺序返回值吗?
- 28. Oracle dbms_utilities.get_hash_value总是为不同的输入返回唯一值吗?
- 29. 返回值0总是在存储过程中成功吗?
- 30. 使用ActiveRecord时,应该总是检查“save”的返回值吗?
嗨,保罗。感谢您的帮助。我明白它不应该返回负数或零数字。 – hogedigo 2013-02-27 00:21:39
第二个引用超出了上下文 - 它并没有引用该ID,而是指定了该参数应该返回多少个ID。还要注意,生成的ID现在限制为53位,以便与js整数一起使用。 – Tom 2014-07-18 17:25:34