Reputation: 1580
Is there a way to get shorter unique IDs for entries in RethinkDB?
We have a URL scheme where <url>/:ID
URLs get very long with the default ID
Their docs don't seem to talk about this... https://rethinkdb.com/api/javascript/uuid/
Upvotes: 0
Views: 79
Reputation: 2424
RethinkDB will by default use uuid as id
. If you want a shorter id, handle it from your application side. Before inserting set id
value. Be careful with your id generation logic, if it conflicts with existing ids in your table, it will overwrite them.
Upvotes: 0
Reputation: 3321
According to the linked documentation, we should read Wikipedia's article for UUID. Which starts said article with: A universally unique identifier (UUID) is a 128-bit number [...]. So I guess that no: UUID is a fixed-length thing. (Yeah, I learnt something too here.)
Upvotes: 1