EoD SQL 2.1 Released

So I finally found some time to make a 2.1 release for EoD SQL. For those who don’t already know:

EoD SQL Allows for fast, simple binding between a Relation Database Query and Java objects.

Think of it as your friend that gets Hibernate or JPA out-of-your-face and lets you get on with actually writing some code.

The 2.1 release has a long list of changes behind it (which we’ve built over the last few months).

  1. It’s much faster than EoD SQL 2.0 was (which in turn was faster than 1.0).
  2. There are a good number of bug-fixes, making it nice and stable.
  3. The 2.1 release includes batch updates
    @Update(sql=”INSERT INTO users (name, email) VALUES (?{1.name}, ?{1.email})”,batchUpdate=true)
    void batchInsertUsers(Collection users) throws SQLException;
  4. GWT developers rejoice! EoD SQL can now fetch objects in any Collection type you choose!
    @Select(“SELECT * FROM users WHERE group = ?1”)
    ArrayList getUsersInGroup(long groupId);
  5. Byte arrays are now considered primitive types, and get mapped by EoD SQL out-of-the-box (no custom TypeMapper required)

That’s far from an exhaustive list, and you should really go download the API and try out some of the cool new features.


6 Responses to “EoD SQL 2.1 Released”

  1. Ali ElKortobi Says:

    I like this initiative. And thank you for taking the time and making it happen. It does give a lot of flexibility. Do you have a fully functioning example of GWT CRUD screen interacting with EoD SQL? That would be great. Thank you.

  2. enki Says:

    I second that, full GWT example will be nice. If I find way how to write my app, I will post it.

    • Jason Says:

      Hey there.

      I’m really busy with my day-job at the moment, so I really just don’t have time to put together a nice GWT / EoD-SQL demo.

      As soon as I’ve got some more time on my hands, you can be sure I’ll put something together and post it. 😉

      • enki Says:

        Hi Jason,
        thanks for response. There is one thing unclear in tutorial (at least to me). This connection (datasource) code should be where? In ServiceImpl.java file? It looks weird, because this connection code will be called every time client request data…or?

        • Jason Says:

          There are several options on where to put the datasource code, depending on whether you use one of more databases.

          If you only use one database (which is the 90% case), I would advise setting up the EoD SQL Default Data Source (QueryTool.setDefaultDataSource).

          If you are using more than one database, you will need to open each Query with a specific DataSource (QueryTool.getQuery(DataSource, Class)).

          Finally: where to put this code. I generally find that the best place to lookup (JNDI) or open my connections is in a ServletContextListener. The primary advantage is that it’s then not tied to any one Servlet, and is started before any other structures. You could however also place that code in the init() method of your Servlet (ServiceImpl).

          • enki Says:

            Thanks. It was my poor understanding of java what caused this question. I didn’t know about ServletContextListener, it looks like proper way to do any “startup” code.

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 )

Connecting to %s

%d bloggers like this: