Core SQL Library Overview

OpenCabinet contains a small library that provides for simpler ways to interact with a relational database than using JDBC directly. This library does not depend on other parts of OpenCabinet, and can also be used independently. It is also the only part of OpenCabinet that has been released so far.

Simple API to query and update database tables by primary key

AccessDataSourceByPrimaryKey ds = new AccessDataSourceByPrimaryKey(dataSource);
Object[] row = ds.selectRow(tableName, primaryKeyValue);
String column = ds.selectString(tableName, columnName, primaryKeyValue);

ds.commit(
  Insert(tableName, column1, column2, column3, column4)
  .delete(tableName, primaryKeyValue)
  .update(tableName, column1, column2, column3, KEEP));

No need to write SQL, no need to write JDBC boilerplate code, no need for any setup or configuration files (table column and primary key definitions are extracted from the database itself).

Full API documentation

Please refer to the Javadoc API documentation.