相关疑难解决方法(0)

GUID为SQLite的uniq键

我发现了python的GUID生成例程.

运行代码给我以下结果.

GUID: 00000129e0e72d9b2aab3c1500ac001000e90001
    Time:    Sat, 17 Jul 2010 09:55:33 (millis: 0.787)
    IP:      172.16.233.1
    Counter: 715865109

此代码的注释具有以下消息.

###   GUIDs make wonderful database keys.  They require no access to the 
###   database (to get the max index number), they are extremely unique, and they sort 
###   automatically by time.   GUIDs prevent key clashes when merging
###   two databases together, combining data, or generating keys in distributed
###   systems.

问题

  • 这适用于SQLite吗?据我所知,SQLite中的INTEGER类型是8字节,并且有8字节,因此无法以十进制值存储值0x00000129e0e72d9b2aab3c1500ac001000e90001或101362835865894089778560972572099193929729.
  • 有没有办法在SQLite全局获取唯一ID?

database sqlite guid

6
推荐指数
2
解决办法
1万
查看次数

标签 统计

database ×1

guid ×1

sqlite ×1