Project

uuid64

0.01
No commit activity in last 3 years
No release in over 3 years
This is a library generating unique id in short pattern.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 1.0
 Project Readme

uuid64

This is a library generating unique id in short pattern.

  1. Generate a 64-bit encoded uuid in Ruby with length of 22.
  2. Generate a 16-bit encoded BSON object_id.
  3. Generate a 64-bit encoded BSON object_id with length of 16.

Status

Gem Version

Get Started

Install

gem install uuid64

Using Bundler

gem 'uuid64'

How To Use

require 'uuid64'
puts SecureRandom.uuid64 # "Ymu4xVZrRP29PPnixxwoPg"
puts SecureRandom.mongo_id # "57320baec9de9a14d2000000"
puts SecureRandom.mongo_id64 # "VzILtMnemhTSAAAD"

Known Issues

  • object_id and object_id64 may conflict when running on same process, multiple threads.