ExCuid2.Ecto.Type (ex_cuid2 v0.10.1)
Ecto type for CUID2 values.
This allows you to use :cuid2 as a custom type in your Ecto schemas.
Usage
Add the following to your config.exs to register the type:
config :my_app, MyApp.Repo,
ecto_types: [cuid2: ExCuid2.Ecto.Type]Then in your schema:
field :id, :cuid2, autogenerate: true
Summary
Functions
Callback implementation for Ecto.Type.cast/1.
Callback implementation for Ecto.Type.dump/1.
Callback implementation for Ecto.Type.embed_as/1.
Callback implementation for Ecto.Type.equal?/2.
Callback implementation for Ecto.Type.load/1.
Callback implementation for Ecto.Type.type/0.
Functions
Callback implementation for Ecto.Type.cast/1.
Callback implementation for Ecto.Type.dump/1.
Callback implementation for Ecto.Type.embed_as/1.
Callback implementation for Ecto.Type.equal?/2.
Callback implementation for Ecto.Type.load/1.
Callback implementation for Ecto.Type.type/0.