MetaSQL was developed to provide an object oriented (OO) interface to an SQL database. The emphasis was on simple and direct connectivity to the database, by providng direct connectivity from the objects to the database. The primary difference between MetaSQL and other JPA or JDO persistence frameworks is the objects themselves are persistent and do not need to be passed to a persistence/entity manager to be managed, thus reducing the complexity and amout of code required.
MetaSQL includes classes for connections, credentials, databases, pools, queries and includes a framework that generates custom table classes. MetaSQL supports NoSQL in that SQL tables can have columns that are custom Java classes (documents). What sets MetaSQL apart from other persistence libraries is the business/table classes are inherently persistent. Meaning they all have instance methods like insert(), update(), select(), delete(), persists() and static/table methods like SELECT(sqlQuery), COUNT(condition), DELETE(condition).
The Java Class maps to an SQL table, where objects of the class represent rows in the table.
A typical example of creating an object and saving and then updating it would be:
MyObject myObj = new MyObject() ;
myObj.setFirstName("firstName");
myObj.insert(); // oops now we have the lastName, update the object
myObj.setLastName("lastName") ;
myObj.update();
// get the latest copy of the object
myObj.select();
An individual object matching a condition can also be selected
MyObject gotObj = MyObject.SELECT("some SQL condition", connection) ;
To select mutliple rows/objects matching a condition
MyObject gotObj[] = MyObject.SELECTS("some SQL condition", connection) ;