[1.8-1.17] Harmony MySQL | In-Game MySQL GUI | Database Manager icon

[1.8-1.17] Harmony MySQL | In-Game MySQL GUI | Database Manager -----

MySQL Graphical Interface for Spigot




API

HarmonySQL has a developer API for executing queries inside of databases.
In order to use the API you need to enable API access in the HarmonySQL config.
Code (YAML):
api_access : true
If you want to create an instance of the API when your plugin loads, make sure to set HarmonySQL as a dependency.
Code (YAML):
depend : [HarmonySQL ]
The API will connect you to the same MySQL server as the credentials in the HamonySQL config.

Example:
Code (Java):
    public void onEnable ( ) {
        HarmonyAPI api = new HarmonyAPI (Bukkit. getServer ( ). getPluginManager ( ). getPlugin ( "HarmonySQL" ) ) ;
        try {
            api. setDatabase ( "DATABASE" ) ;
        }
        catch (HarmonySQLException e ) {
            e. printStackTrace ( ) ; //gets thrown if api access is disabled
        }
        JSONArray rows = api. executeQuery ( "SHOW TABLES" ) ;
        for ( int i = 0 ;i <rows. size ( ) ;i ++ ) {
            JSONObject row = (JSONObject ) rows. get (i ) ;
            row. get ( "COLUMN" ) ;
        }
        api. executeSetQuery ( "CREATE TABLE..." ) ; //executes query that doesn't return anything
    }
----------, Jan 28, 2021

Resource Information
Author:
----------
Total Downloads: 125
First Release: Jan 27, 2021
Last Update: Jan 28, 2021
Category: ---------------
All-Time Rating:
1 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings