msupply-foundation / open-msupply

Open mSupply represents our most recent advancement in the Logistics Management Information System (LMIS), expanding on more than two decades of development inherited from the well-established legacy of the original mSupply.
https://msupply.foundation/open-msupply/
Other
23 stars 14 forks source link

Admin database browser #3591

Open andreievg opened 7 months ago

andreievg commented 7 months ago

Is your feature request related to a problem? Please describe 👀

For various admin tasks in production setting it would be useful to have a database browser, with pre-made common queries (like what's in the sync buffer left for integration etc..)

On top of this view it would be good to run custom queries.

We can do something similar to notify ? With JSON result mapped to a dynamic table ?

Describe the solution you'd like 🎁

Something as per above, not really sure about UI for this, just wanted to create a placeholder issue

Describe alternatives you've considered 💭

Additional context 💌

If we can run custom sql queries, can we protect from writes with something similar that was done in notify @jmbrunskill ?

Moneyworks Jobcode 🧰

clemens-msupply commented 7 months ago

If we can run custom sql queries, can we protect from writes with something similar that was done in notify @jmbrunskill ?

Not for sqlite to the best of my knowledge. One idea that came up in this context was to use an SQL parser and check that only allowed statements are used...

This is also very similar to SQL report queries where json is returned for postgres and sqlite queries.