View Source Lightning.LogMessage (Lightning v2.10.4)

A custom type to handle JSON log messages.

Currently the underlying database type is a string, and workers may send either a string, or a JSON object. This type will encode JSON objects to string.

Messages are always strings

While this type allows JSON objects to be sent, the model will always return strings. This type is a stand-in until we want to add a JSONB column to the underlying table.

In the case of JSON objects we serialize them to a string, and in the case of arrays we serialize them individually and join them with a space.

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.