More on EoDSQL

In my last post about my OR (Object Relational) mapping layer, EoD SQL, I mentioned several features I wanted to add to the API. Well good news everyone! I’ve been working really hard (on other code… which uses EoD SQL), and finally found some time to work on EoD SQL again, and I’ve added several of the features I wanted:

  • @Select methods can return a lovely arrange of data-types, including simple POJO’s (great for “selectById” methods)
  • QueryTool no longer throws nasty SQLExceptions, making the API potentially “checked exception free” (unless you declare an exception of course)
  • @ResultColumn can annotate setter methods, allowing you to hide your fields away as private and have EoD SQL work you JavaBeans methods

So theres a new release (version 0.5-beta), and the actual release structure is getting much better, with a nice shiny README file, and three formats to choose from (tar.gz, tar.bz2, and zip).

I’ve also started working on some more features:

  • QueryTool will no longer throw IllegalArgumentException’s when it’s asked to construct a query implementation that doesn’t follow the rules, instead it will throw a new (unchecked) InvalidQueryException
  • A new return type is in the works, called “DataIterator” (like DataSet, but forward only)
    • It’s forward only (rather than declaring “forward-only” in your Select annotation)
    • It’s usable with the Java 5 “foreach” statement
    • It has a “rubberstamping” mode: it only constructs one data object, and modifies it each time you call “next”
      • Instead of creating one data object for each row
      • It’s great for displaying a list of data
      • It can save you lots of memory
      • It also makes your software faster
    • It automatically closes itself when it reaches the end of the data (though it can be closed before then)

So as you can see, there’s loads of new functionality on the way (and already there), watch this space (and the GitHub project).

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: