Skip to content
Naoki Takezoe edited this page Nov 26, 2013 · 13 revisions

Mirage-SQL is an easy and powerful SQL centric database access library for Java which provides the dynamic SQL template by plain SQL.

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

Documents

Clone this wiki locally