seldo / compact-uuid

UUIDs that fit into MySQL BINARY(16)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

compact-uuid

AUTO_INCREMENT is for chumps. Make your primary key compatible with distributed, multi-master systems from the get-go by using UUIDs. Inspired by http://mysql.rjweb.org/doc.php/uuid

Usage

Your field should by MySQL BINARY(16) or compatible. Simply call

var CompactUuid = require('compact-uuid');
var myId = CompactUuid.generate()

About

UUIDs that fit into MySQL BINARY(16)


Languages

Language:JavaScript 100.0%