4/20/2010

Mirage: Simple SQL Centric DB Access Library

Today, I released Mirage ver 1.0.0.

Mirage is a simple SQL centric database access library. It has a following two features:

  • 2WaySQL
    The main feature of Mirage is 2WaySQL. This makes plain old SQL template, and it is executable using any SQL client tools because parameters and conditions are written as SQL comment.
  • SQL less Update
    Generally, update processing are simpler than search processing. However, especially, large INSERT SQL brings us the considerable pain. In the Mirage, you can insert / update / delete records using entity class (without SQL).

The main feature of Mirage is 2WaySQL. This makes plain old SQL template. See the following example:

SELECT * FROM BOOK
/*BEGIN*/
  WHERE
  /*IF author != null */
        AUTHOR = /*author*/'Naoki Takezoe'
  /*END*/
  /*IF minPrice != null */
    AND PRICE >= /*minPrice*/20
  /*END*/
  /*IF maxPrice != null */
    AND PRICE <= /*maxPrice*/100
  /*END*/
/*END*/
ORDER BY BOOK_ID ASC

Mirage processes this SQL template and executes it using PreparedStatement at runtime. And this SQL template is exacutable even it is on SQL client tools such as SQL*Plus(Oracle) or psql(PostgreSQL). So it makes easy to test SQL.

See details about Mirage at our web site. I would also talk about Mirage in this blog.

4/18/2010

Java Standard EL Functions 1.1.0 is available!

We released Java Standard EL Functions (JSEL) ver 1.1.0.

JSEL provides standard JSP-EL functions for web application development such as escaping HTML tags, URL encoding and formatting Date or Number. You can use it with many web frameworks which use JSP as view technologies.

Here is the example to JSEL usage:

<%@ taglib uri="http://amateras.sf.jp/functions" prefix="f" %>
...
<%-- Escape HTML tags --%>
${f:h(value)}
<%-- URL encode --%>
${f:u(value)}

JSEL provides many usable EL functions. Please check our web site to know details about JSEL.