diff options
author | wei <> | 2006-04-14 11:23:56 +0000 |
---|---|---|
committer | wei <> | 2006-04-14 11:23:56 +0000 |
commit | f6a5e7589396854e10e023c25237b47e512ff047 (patch) | |
tree | 2b313bb8b66869235ee06b9cae2af2f7645cf5c9 /tests/unit/SQLMap/maps/MySql/Enumeration.xml | |
parent | 3d3f8d3832921f99daf8ce1953304763c2e76c62 (diff) |
Adding SQLMap unit tests. Allow sqlmap to use Prado's caching module to cache records.
Diffstat (limited to 'tests/unit/SQLMap/maps/MySql/Enumeration.xml')
-rw-r--r-- | tests/unit/SQLMap/maps/MySql/Enumeration.xml | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/tests/unit/SQLMap/maps/MySql/Enumeration.xml b/tests/unit/SQLMap/maps/MySql/Enumeration.xml new file mode 100644 index 00000000..b321259e --- /dev/null +++ b/tests/unit/SQLMap/maps/MySql/Enumeration.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="utf-8"?>
+<sqlMap namespace="Enumeration" >
+
+ <alias>
+ <typeAlias alias="Enumeration" type="IBatisNet.DataMapper.Test.Domain.Enumeration, IBatisNet.DataMapper.Test"/>
+ </alias>
+
+ <resultMaps>
+ <resultMap id="enumeration-result" class="Enumeration" >
+ <result property="Id" column="Enum_ID"/>
+ <result property="Day" column="Enum_Day"/>
+ <result property="Color" column="Enum_Color"/>
+ <result property="Month" column="Enum_Month" nullValue="All"/>
+ </resultMap>
+ </resultMaps>
+
+ <statements>
+
+ <select id="GetEnumerationNullValue"
+ parameterClass="Integer"
+ resultMap="enumeration-result">
+ select
+ Enum_ID,
+ Enum_Day,
+ Enum_Color,
+ Enum_Month
+ from Enumerations
+ where Enum_ID = #value#
+ </select>
+
+ <select id="GetEnumeration" parameterClass="Integer" resultClass="Enumeration">
+ select
+ Enum_ID as Id,
+ Enum_Day as Day,
+ Enum_Color as Color,
+ Enum_Month as Month
+ from Enumerations
+ where Enum_ID = #value#
+ </select>
+
+ <insert id="InsertEnumViaParameterMap" parameterMap="insert-params" >
+ insert into Enumerations
+ (Enum_ID, Enum_Day, Enum_Color, Enum_Month)
+ values
+ (?, ?, ?, ?)
+ </insert>
+
+ </statements>
+
+ <parameterMaps>
+ <parameterMap id="insert-params">
+ <parameter property="Id" column="Enum_ID" />
+ <parameter property="Day" column="Enum_Day"/>
+ <parameter property="Color" column="Enum_Color" />
+ <parameter property="Month" column="Enum_Month" nullValue="All"/>
+ </parameterMap>
+ </parameterMaps>
+
+</sqlMap>
|