ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josh Joy" <joshjd...@gmail.com>
Subject ibatis decorater pattern
Date Thu, 19 Jun 2008 03:29:53 GMT
Hi,

I've seen and used the ability to have sql fragements, though is there a
sort of sql fragment decorater that I can do?

here is an quick simple example

<sql id="pagination">

select * from
    (
         select Row_Number(),  !somesql!
    ) a
where RowNum > 1

</sql>


<select id="myquery">
      <decorate refid="pagination">
            select * from sometable
     </decorate>
</select>



The alternative would be to split it into a header/footer and include for
each query, though would be convenient if there was some sort of decorater.

Thanks,
Josh

Mime
View raw message