summaryrefslogtreecommitdiff
path: root/tests/simple_unit/SqlMap/maps/mssql/Enumeration.xml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/simple_unit/SqlMap/maps/mssql/Enumeration.xml')
-rw-r--r--tests/simple_unit/SqlMap/maps/mssql/Enumeration.xml47
1 files changed, 47 insertions, 0 deletions
diff --git a/tests/simple_unit/SqlMap/maps/mssql/Enumeration.xml b/tests/simple_unit/SqlMap/maps/mssql/Enumeration.xml
new file mode 100644
index 00000000..938a4266
--- /dev/null
+++ b/tests/simple_unit/SqlMap/maps/mssql/Enumeration.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<sqlMap namespace="Enumeration" >
+
+ <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>
+
+ <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="enum-insert-params" >
+ insert into Enumerations
+ (Enum_ID, Enum_Day, Enum_Color, Enum_Month)
+ values
+ (?, ?, ?, ?)
+ </insert>
+
+ <parameterMap id="enum-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>
+
+</sqlMap>