LoginSignup
6
5

More than 5 years have passed since last update.

世界中でただ1つの重複しない値UUIDを生成する

Last updated at Posted at 2012-12-26
qiita.rb
String id = UUID.randomUUID().toString()

参考:http://android-developers.blogspot.jp/2011/03/identifying-app-installations.html

注意:
分散システム上においても、一意な識別子を作成できます.
ただし, 一意性に100%の保証があるわけではなくID重複の可能性は0ではありません.
UUIDは偶然の一致がまず起こりえないレベルのものと考えて運用できる代物です.

6
5
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
5