You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We probably need to support commands for database management. Currently there's Mongo.Ecto.command/2 to send direct command to the database. I implemented also functions that use this for particular commands: create_collection, list_collections and drop_collection for managing collections (as I needed those for the truncate function).
There are a lot of commands, and some should have a specialized function, but majority shouldn't - I'm not sure where to draw the line.
I would recommend at least documenting those. Mongo.Ecto should @doc false all callback definitions and explicitly document all extra functions that are meant to be used directly by developers. :)
Regarding exposing the commands, it seems fine to allow the user to pass anything, which we just pass to mongo. We can link to the mongo reference too.
We probably need to support commands for database management. Currently there's
Mongo.Ecto.command/2
to send direct command to the database. I implemented also functions that use this for particular commands:create_collection
,list_collections
anddrop_collection
for managing collections (as I needed those for thetruncate
function).There are a lot of commands, and some should have a specialized function, but majority shouldn't - I'm not sure where to draw the line.
The list of all the commands is here: http://docs.mongodb.org/manual/reference/command/
I think we should definitely have specialized functions for collections and indexes, about others I have no idea.
The text was updated successfully, but these errors were encountered: