Upgrade to Pro — share decks privately, control downloads, hide ads and more …

UUIDは衝突の夢を見るか

Avatar for Dorian Dorian
April 26, 2017

 UUIDは衝突の夢を見るか

Avatar for Dorian

Dorian

April 26, 2017
Tweet

More Decks by Dorian

Other Decks in Programming

Transcript

  1. require 'securerandom' require 'mysql2' client = Mysql2::Client.new(:host => 'localhost', :username

    => 'root', :password => 'password', :database => 'uuid' ) while true do begin uuid = SecureRandom.uuid client.query("insert into uuid.ruby (`uuid`) values ('#{uuid}')") puts uuid rescue => e p e end end