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

Mirage is an easy and powerful SQL centric database access library 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