Mongo.Repo.insert
You're seeing just the callback
insert
, go back to Mongo.Repo module for more information.
Specs
insert(doc :: Mongo.Collection.t(), opts :: Keyword.t()) :: {:ok, Mongo.Collection.t()} | {:error, any()}
Inserts a new document struct into the database and returns a {:ok, doc}
tuple.
For all options see Options
Example
MyApp.Repo.insert(Post.new())