View Source Flagsmith.Schemas.Traits.Trait.Value (flagsmith_engine v1.0.0)

Ecto type to aid casting values returned by the Flagsmith API that need to be compared. Since those values are weakly typed in different places and they need to be compared, it's necessary to be able to convert and assign a type to a value in order to when comparing that value with another one, the other one can be cast to the same type.

This ecto type works as a struct containing the converted value in its correctly typed format and a field :type containing the corresponding type, so that it's easier to then cast any other stringed type into the same format.

Link to this section Summary

Link to this section Types


t() :: %Flagsmith.Schemas.Traits.Trait.Value{
  type: :string | :decimal | :boolean | :semver,
  value: String.t() | Decimal.t() | Version.t() | number() | boolean()

Link to this section Functions