No-nonsense, easy to use database library with support for MySQL, PostgreSQL, and more
"Easy to use"?
Connecting to a database and running a query can be done in 3 lines. Example code for connecting to a MySQL database and printing a table to the console:
SQLDatabaseAdapter db = new MySQLDatabaseAdapter("localhost", "my-database", "username", "password"); db.connect(); System.out.println(db.executeQuery("SELECT * FROM `my-database`.`my-table`").toString());
Why not just use JDBC?
While JDBC is useful, it requires lots of boilerplate code that makes even doing the simplest of tasks a pain to write. With UDB, you can connect to a database and execute queries quickly, without any unnecesary setup. Plus, if you find you need to access a JDBC API, you can simply getJDBCResultSet() on QueryResults, and getConnection() on SQLDatabaseAdapters.
Where can I learn more?
Visit the wiki to learn more and how to use UDB!
Currently, integration with HikariCP is in the works. When finished, it should work seamlessly with the existing MySQLDatabaseAdapter class.