BoneSQLib
A simple SQL library that utilizes BoneCP.
Source | Documentation
Tutorial
Start off by creating your variable.
Construct your database object. The constructor does not automatically open the database connection.
Next we need to open the connection:
Grab a connection from the connection pool:
Close connection after finishing statement:
Installation
If you install BoneSQLib directly into your plugin, the following bad things will occur:
I'd like to give thanks to the author of SQLibrary as I designed the library to be similar to SQLibrary. I also used some of his description as the same things apply because of the similarities.
A simple SQL library that utilizes BoneCP.
Source | Documentation
Tutorial
Start off by creating your variable.
Code (Text):
private Database sql;
Code (Text):
sql = new MySQL(Logger.getLogger("Minecraft"),
"[MyPlugin]",
"localhost",
3306,
"mydatabase",
"myusername",
"mypassword");
"[MyPlugin]",
"localhost",
3306,
"mydatabase",
"myusername",
"mypassword");
Next we need to open the connection:
Code (Text):
if (sql.open()) {
// ...
}
// ...
}
Grab a connection from the connection pool:
Code (Text):
Connection connection = sql.getConnection();
// Do something with connection.
// Do something with connection.
Close connection after finishing statement:
Code (Text):
connection.close();
- Download the jar.
- Add the jar to your Java build path.
- Tell your users to install BoneSQLib with your plugin.
If you install BoneSQLib directly into your plugin, the following bad things will occur:
- You cannot run your plugin alongside BoneSQLib.jar plugins. Bukkit will (usually) find the BoneSQLib classes in your plugin first, and block the BoneSQLib.jar dependency.
- You cannot run your plugin alongside other plugins using BoneSQLib directly from source. Same issue.
- Updating will definitely cause these problems and cause you much pain.
- Implement support for prepared statements
I'd like to give thanks to the author of SQLibrary as I designed the library to be similar to SQLibrary. I also used some of his description as the same things apply because of the similarities.
Quick facts
- Edition: Minecraft Java
- File type: .jar
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
BoneSQLib | Deprecated is a free Minecraft Java mod. Downloaded 424 times (via Spigot). Download it and open it directly in the game.