Electric.Shapes.Api.Params.JsonOrMapStringParams (electric v1.4.13)

View Source

Custom Ecto type that accepts params as either:

  1. A JSON string (e.g., "{"1":"value1","2":"value2"}")
  2. A map with string values (for backwards compatibility)

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

cast(params)

Callback implementation for Ecto.Type.cast/1.

dump(data)

Callback implementation for Ecto.Type.dump/1.

embed_as(_)

Callback implementation for Ecto.Type.embed_as/1.

equal?(term1, term2)

Callback implementation for Ecto.Type.equal?/2.

load(data)

Callback implementation for Ecto.Type.load/1.

type()

Callback implementation for Ecto.Type.type/0.