vedfi / mondroid

Mongodb Client w/ Flutter
GNU General Public License v3.0
63 stars 7 forks source link

Doubt #50

Open payel-otaku opened 1 month ago

payel-otaku commented 1 month ago

Can't I just view all my database in one go? Do I have to add differently for every database? Screenshot_2024-08-12-16-23-54-22_fcde083d3d73307de6d0ab46e65a2b5d

Like in the screenshot, I have more collections but I can only see the Test one, why ?

vedfi commented 1 month ago

Please make sure that your connection string is correct. Your connection string have to specify parameters given below

Also your user must have read & write permissons.

For more information about troubleshooting click here.

prono69 commented 1 month ago

I am facing the same issue. Lemme explain. As you know mongodb doesn't have the "database-nane" parameter by default. Like this is a default mongo db url mongodb+srv://user:pass@cluster0.rgv0u.mongodb.net/?retryWrites=true&w=majority

Currently we have to make different connection in your app in order to view different database. I think she meant that by adding only 1 mongo db url, we should get all database list in that app.

prono69 commented 1 month ago

Please make sure that your connection string is correct. Your connection string have to specify parameters given below

  • databaseName
  • authSource
  • authMechanism

Also your user must have read & write permissons.

For more information about troubleshooting click here.

Like for example if I have 3 database: test1, test2 and test3 in Cluster0, we have to make 3 different connections in Mondroid app. It would be great if we could just the url and then the app will show all the dbs and collections in them. Like

Hope you understands my point. Thank you

vedfi commented 1 month ago

Unfortunately mongo_dart driver don't support accessing multiple databases within single connection. Due to limitation; each database must be accessed by seperate connection.

However the developer of mongo_dart library, works on another mongodb plugin that supports browsing databases within single connection. But its currently on alpha stage, that means its not stable so we cannot use it in Mondroid.