UUIDは衝突の夢を見るか

Dorian
April 26, 2017

 UUIDは衝突の夢を見るか

Dorian

April 26, 2017

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

19 slides
  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

More Decks by Dorian

Other Decks in Programming