You can create a plugin group by placing the folders for multiple MySQL Shell plugins in a containing folder under theplugins folder. A plugin group can contain a mix of plugins defined using JavaScript and plugins defined using Python. Plugin groups can be used to organize plugins that have something in common, for example:
Plugins that provide reports on a particular theme.
Plugins that reuse the same common code.
Plugins that add functions to the same extension object.
If a subdirectory of theplugins folder does not contain an initialization script (aninit.js orinit.py file), MySQL Shell treats it as a plugin group and searches its subfolders for the initialization scripts for the plugins. The containing folder can contain other files with code that is shared by the plugins in the plugin group. As for a plugin's subfolder, the containing folder is ignored if its name begins with a dot (.) but otherwise the name is not important to MySQL Shell.
For example, a plugin group comprising all the functions provided by the user-defined MySQL Shell global objectext can be structured like this:
The folder
C:\Users\exampleuser\AppData\Roaming\MySQL\mysqlsh\plugins\extis the containing folder for the plugin group.Common code for the plugins is stored in this folder at
C:\Users\exampleuser\AppData\Roaming\MySQL\mysqlsh\plugins\ext\common.pyThe plugins in the plugin group are stored in subfolders of the
extfolder, each with aninit.pyfile, for exampleC:\Users\exampleuser\AppData\Roaming\MySQL\mysqlsh\plugins\ext\helloWorld\init.py.The plugins import the common code from
ext.commonand use its functions.