A small collection of types I've reused across more than one project.
A simple token that can be used in a url as a surrogate key. Includes a 10-bit checksum to avoid even querying the database if invalid. Stored in the database as a native UUID field for query/index performance and overall reduction in storage space.
Handles the phone number format used in the United States and Canada. Expects input as a binary but stores data as a bigint for query/index performance and overall reduction in storage space.
Soon.
Not currently available via hex
but accessible through github by adding ecto_types
to your
list of dependencies in mix.exs
:
def deps do
[
{:ecto_types, "~> 0.1.0", github: "atavistock/ecto_types"}
]
end