mongox_ecto v0.2.0 Mongo.Ecto.ObjectID

An Ecto type to represent MongoDB’s ObjectIDs

Represented as hex-encoded binaries of 24 characters.

Summary

Functions

Casts to valid hex-encoded binary

Converts to a format acceptable for the database

Generates a new ObjectID

Converts from the format returned from the database

The Ecto primitive type

Functions

cast(hex)

Casts to valid hex-encoded binary

dump(hex)

Converts to a format acceptable for the database

generate()

Generates a new ObjectID

load(binary)

Converts from the format returned from the database

type()

The Ecto primitive type.