Ticket #208 (new new feature)
TSqlMap
| Reported by: | ChicoDiCherry | Owned by: | wei |
|---|---|---|---|
| Priority: | urgent | Milestone: | 3.2 |
| Component: | Prado Framework v3 | Version: | 3.2 |
| Severity: | major | Keywords: | |
| Cc: |
Description
Hi, can u add to TSqlMap extending or including something like this?!?
<sql id="selectItem_fragment"> FROM items WHERE parentid = 6 </sql> <select id="selectItemCount" resultClass="int"> SELECT COUNT(*) AS total <include refid="selectItem_fragment"/> </select>
and to refere on namespaces so in all xml files u can use the same name (id) for same queries.
e.x.
tableOne.xml <?xml version="1.0" encoding="utf-8" ?> <sqlMap namespace="tableOne"> <select id="Select.All" resultClass="classOne"> select * from tableOne </select> </sqlMap> tableTwo.xml <?xml version="1.0" encoding="utf-8" ?> <sqlMap namespace="tableTwo"> <select id="Select.All" resultClass="classTwo"> select * from tableTwo </select> </sqlMap>
and at last somthing like if isset property maby with else part?!?
<?xml version="1.0" encoding="utf-8" ?>
<sqlMap namespace="tableTwo">
<select id="Select.All" resultClass="classTwo">
select * from tableTwo
<if isset propertyName>
WHERE propertyName = #propertyName#
</if isset>
</select>
</sqlMap>
Change History
Note: See
TracTickets for help on using
tickets.
