Mongo.Ecto.ChangeArray (mongodb_ecto v1.1.2) View Source

An Ecto type to represent a partial update of a nested document

Using in queries

change = Mongo.Ecto.Helpers.change_array("0.name", "name")
MyRepo.update_all Post, set: [authors: change]

Link to this section Summary

Functions

Casts to database format

Converts to a database format

Callback implementation for Ecto.Type.embed_as/1.

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

Change is not a value - it can't be loaded

The Ecto primitive type

Link to this section Types

Specs

t() :: %Mongo.Ecto.ChangeArray{field: String.t(), value: term()}

Link to this section Functions

Casts to database format

Converts to a database format

Callback implementation for Ecto.Type.embed_as/1.

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

Change is not a value - it can't be loaded

The Ecto primitive type