2

In the shell I can do this: show dbs to list all 'databases' on the connection. How can I do this using mongo_dart commands?

In the shell I can do this: show collections (names) on a given database. How can I do this using mongo_dart commands?

I'm stumped, thanks!

2 Answers 2

1

After some googling and looking at the mongo_dart API and examples I came to the conclusion that it is currently not possible to do such thing with this library.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for researching! Have now have fallen back on using a Mongo_Ruby interface which seems to be more complete. Doing some pretty tricky things, performance seems great, but have not found commands to do these things directly yet either. Perhaps I can pull an old trick and direct some shell queries to text files and read those, but that seems like overkill. I still think these are basic commands that would enable better ("reflective") coding techniques. Thanks for the kind effort!
1

I've just added two helpers to Db class: listDatabases() and listCollections() Both return Future<List<String>>, hopefully that would be usefull to you. Effective in v0.1.40

1 Comment

Большое спасибо, Bal'shoye spaseeba. Should be exactly what I need. I am using Mongolab dbs like big "log files" of all db edit transactions (CUD). It looks like this is going to work out well as it is super fast and now I can use the same memory scheme at the server that I am using in the client.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.