Home›Java›Mods›DatabaseAPI
ModsJava

DatabaseAPI

Java mod listed for Minecraft 1.7–1.15. Download on the author's site.

⬇ Download on Spigot
DatabaseAPI
The API compatible to Spigot, Bungeecord and Standalone...

Usage

Code (Java):

Database sqlite = DatabaseFactory. createSQLiteDatabase (FILE ) ;
Database mysql = DatabaseFactory. createMySQLDatabase (HOST, PORT, USER, PASSWORD, DATABASE ) ;
Database h2 = DatabaseFactory. createH2Database (NAME, FILE, USER, PASSWORD ) ;
Database postgreesql = DatabaseFactory. createPostgreeSQLDatabase (HOST, PORT, USER, PASSWORD, DATABASE ) ;

//Execute a SQL update
db. executeUpdate (QRY, OBJECTS ) ;
//If you get the Future directly after calling, it's blocking the main thread too:)
db. executeUpdateAsync (QRY, OBJECTS ) ;

//Exdcute a SQL query
db. executeQueryAsync (QRY, new Function < ResultSet, Object > ( ) {
    @Override
    public Object apply ( ResultSet resultSet ) {
        return null ;
    }
}, OBJECTS ) ;
//If you get the Future directly after calling, it's blocking the main thread too:)
db. executeQueryAsync (QRY, new Function < ResultSet, Object > ( ) {
    @Override
    public Object apply ( ResultSet resultSet ) {
        return null ;
    }
}, OBJECTS ) ;

 
Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

DatabaseAPI is a free Minecraft Java mod. Compatible with Minecraft 1.7, 1.8, 1.9, 1.10 and newer. Downloaded 168 times (via Spigot). Download it and open it directly in the game.

Explore more