EctoPgGeom.Point (ecto_pg_geom v0.1.2)

An Ecto type for points.

May be used as a field in an Ecto.Schema for automatic use of point data stored in the database:

field :line, EctoPgGeom.Point

Assigning to a point field can be done either by manually creating a %Postgrex.Point{} struct, or by passing an {x, y} point tuple. cast/1 and dump/1 will take care of the translation.

To create equality checks in queries, use the EctoPgGeom.geometric_equality/2 macro.

Link to this section Summary

Functions

Callback implementation for Ecto.Type.cast/1.

Callback implementation for Ecto.Type.dump/1.

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

Callback implementation for Ecto.Type.load/1.

Callback implementation for Ecto.Type.type/0.

Link to this section Functions

Callback implementation for Ecto.Type.cast/1.

Link to this function

convert_to_struct(point, acc)

Callback implementation for Ecto.Type.dump/1.

Link to this function

embed_as(format)

Link to this function

equal?(left, right)

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

Callback implementation for Ecto.Type.load/1.

Callback implementation for Ecto.Type.type/0.