Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MongoDB command #8

Closed
michalmuskala opened this issue Jun 5, 2015 · 2 comments
Closed

MongoDB command #8

michalmuskala opened this issue Jun 5, 2015 · 2 comments

Comments

@michalmuskala
Copy link
Collaborator

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.

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.

@josevalim
Copy link
Contributor

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.

@michalmuskala
Copy link
Collaborator Author

We have a command function. I'm closing this.

skopetsch pushed a commit to skopetsch/mongodb_ecto that referenced this issue Feb 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants