diff options
author | Fabio Bas <ctrlaltca@gmail.com> | 2016-03-25 17:55:51 +0100 |
---|---|---|
committer | Fabio Bas <ctrlaltca@gmail.com> | 2016-03-25 17:55:51 +0100 |
commit | a3388622287e218beddfa14a47ed677d4307b36b (patch) | |
tree | 1b4c7ac8597b1cc798b6683d4a81c90d38de12f6 /tests/unit/Data/SqlMap/maps/sqlite/Enumeration.xml | |
parent | c7fd3e1167b6f2fa7746edbd0fb8f8c1694c61f9 (diff) |
Removed simpletest and moved all tests in the unit tree
Tests are executed now, but a lot of them need fixing.
Diffstat (limited to 'tests/unit/Data/SqlMap/maps/sqlite/Enumeration.xml')
-rw-r--r-- | tests/unit/Data/SqlMap/maps/sqlite/Enumeration.xml | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/tests/unit/Data/SqlMap/maps/sqlite/Enumeration.xml b/tests/unit/Data/SqlMap/maps/sqlite/Enumeration.xml new file mode 100644 index 00000000..58391c5d --- /dev/null +++ b/tests/unit/Data/SqlMap/maps/sqlite/Enumeration.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="utf-8"?> +<sqlMap namespace="Enumeration" > + + <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> |