Menu

Mayfly 0.1 released

Mayfly, a SQL in-memory database for unit tests written in Java, is now available for download at http://mayfly.sourceforge.net/ . There is also documentation on-line there.

A few of the features which are implemented so far are:

* The ability to very cheaply snapshot the database (both metadata and data) and restore from that point.
* Any number of tables, columns, and rows (limited by available memory and to a certain extent by query speed).
* Inner and left joins.
* WHERE clauses with =, !=, <, >, AND, OR, NOT
* ORDER BY
* Integer and string data types.

Background: although there are a vast number of free and non-free SQL implementations in Java, few of them are really good for unit testing. A database for unit testing should be very fast on small data sets and should not present performance or other obstacles to setting up databases, adding and removing tables, and destroying databases. A typical unit test run will want to create thousands of databases. With most SQL databases, this is not achievable, and one must resort to compromises such as keeping the tables around and only setting up data on each unit test run. Mayfly aims to make creating an in-memory SQL database as easy as creating any other in-memory data structure.

Posted by Jim Kingdon 2005-12-08

Log in to post a comment.