View Source Exandra.EmbeddedType (exandra v0.16.0)
Ecto.ParameterizedType for User-Defined Types (UDTs) with Ecto.Schemas.
options
Options
:cardinality(atom/0) -:onefor a regular UDT column, or:manyfor a frozen list of UDTs. default is:one:using(atom/0) - Required. The Ecto.Schema to use for the UDT.
examples
Examples
defmodule PageView do
use Ecto.Schema
use Exandra.Embedded
schema "page_views" do
field :url, :string
embedded_type :view_meta, ViewMeta
end
def changeset(entity, params) do
entity
|> cast(params, [:url, :view_meta])
endend
Link to this section Summary
Link to this section Types
@type t() :: any()