Ticket #208 (new new feature)

Opened 3 years ago

Last modified 8 months ago

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

Changed 2 years ago by xue

  • owner changed from xue to wei

Changed 2 years ago by wei

  • version changed from 3.0 to 3.1

Changed 2 years ago by wei

  • milestone changed from 3.1 Alpha to 3.1.1

Will take a look after sqlmap is more stable and after 3.1

Changed 14 months ago by xue

  • milestone changed from 3.1.1 to 3.1.2

Changed 8 months ago by tof06

  • version changed from 3.1 to 3.2
  • milestone changed from 3.1.2 to 3.2
Note: See TracTickets for help on using tickets.