DEV Community

Cover image for MySQL Editor in NodeJS ~ Part Five
Andrew Bone
Andrew Bone

Posted on • Updated on

MySQL Editor in NodeJS ~ Part Five

MySQL Editor in NodeJS

This is the final week of the MySQL Editor mini-series, the project is not finished but it is now functional and open source. If anyone wants to look at the project and maybe submit an issue or even a pull request please do.

This week I've made the query box work, rather than just being for show as before, I've also made it so you can edit fields.

If you'd like to follow along with my journey here is my post index.

GitHub logo ignis-pwa / nodetree

A MySQL Browser written in NodeJS

nodetree

A MySQL Browser written in NodeJS

Read about this project on dev.to

Try out the demo the password is demopassword




Query box

Last week I made a function I could pass a query to, the function would then go off and get the data from the server and deal with it. This week I made another function that read the contents of the query box and passed it on the origial function. Currently, you do this by pressing CTRL + Enter which, of course, doesn't work for mobile users so that's a bug that needs addressing.

Query box

Editing fields

For editing fields, I went back to the code that produces the table. Now if the query gives data that should be editable an event listener is added, listening for focus and blur, that when triggered a function checks to see if the content has changed if so a confirmation is requested from the user.

Editing fields

What next

As I said at the top of the post, I don't intend to carry on documenting this process, I will continue to bug hunt and generally try and add more polish but I think I've learnt all I can from this project.

Bug-list and to-do's

  • the database page isn't mobile friendly
  • needs a service worker
  • it would be nice to add PWA support
  • mobile users can't execute custom queries
  • there should be an option to require username at login

If there are more bugs you can see or more features you think would be useful feel free to leave a comment or raise an issue over on the GitHub page. Thank you.

Signing off

I'll be back to writing Adventures of a Hobbyist soon, I think the first post back will be a summary of these past 5 posts and what I've learnt along the way. Thank you for reading.

🦄❤

Discussion (1)

Collapse
4lch4 profile image
Devin W. Leaman

Another great read, thanks for the article 😊

I've taken an interest in the project and I'll see if I can carve out some time to work on the mobile support.