Ecto Hashids v0.0.1 EctoHashids View Source
Seamlessly interact w/ sequential IDs via their Hashid equivalent.
Link to this section Summary
Functions
Given an unambiguous representation of an id, generate other supported representations of that id. Ensures that the hashid and prefix are valid.
Link to this section Functions
Given an unambiguous representation of an id, generate other supported representations of that id. Ensures that the hashid and prefix are valid.
Examples
iex> EctoHashids.id!({"o", 10})
%{hashid: "o_gqmgq", pkey: 10, prefix: "o"}
iex> EctoHashids.id!("o_5zabk")
%{hashid: "o_5zabk", pkey: 6418, prefix: "o"}
iex> EctoHashids.id!("O_Z7EXY")
%{hashid: "o_z7exy", pkey: 206586, prefix: "o"}