MySQL Shell makes it easy to develop tools you can use for example to generate reports. In a previous blog, I showed how to use external modules in MySQL Shell. In this blog, I will take it one step further and use the curses Python module to create auto-refreshing reports. The first example will be kept very simple to show the idea, then a more realistic example will be shown where the top N files sorted by I/O will be returned.
Note
Out of the box, this does not work on Windows as Python does not ship with the curses library.
Basic Example
As a basic example, consider the query SELECT NOW()
.
This returns …