ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Zhu <scott...@gmail.com>
Subject check to see if a statement exists
Date Thu, 03 Mar 2005 20:07:19 GMT
I post a few question in the last few days. I'm at the final stage of
evaluting iBatis for our application. This is probably one of the last
issues we need to settle now.

We want to support vendor specific queries. Again, it's being defined
at runtime. So the current thought is, we include them in the same
file, say in Item.xml, we have "getItemsByOrderID" query, and late we
decide we need a db2 specific query, we add a "getItemsByOderID_DB2"
query in there. In our DAO code, when the statement is being executed,
we do a two-step lookup. We have knowledge on the database type then,
so we first check to see if there's a $statement_$databaseType
statement in the map, if not, fall back to use just $statement (kind
like how resource look up works). My questions are:

1. I don't know if this is the best/clean way to deal with this kind
of problems.
2. In iBatis, is there a way to check if a given statement exists in
the current map?

Thanks.

Mime
View raw message