From 567ab5d2b3545baf1fa536f23ea4f5ef6fe71d68 Mon Sep 17 00:00:00 2001 From: wei <> Date: Sun, 16 Jul 2006 06:25:57 +0000 Subject: Rename APP_CODE directory name. --- demos/sqlmap/protected/App_Data/person.xml | 16 +++++++++ demos/sqlmap/protected/App_Data/personHelper.xml | 42 +++++++++++++++++++++++ demos/sqlmap/protected/App_Data/test.db | Bin 0 -> 5120 bytes 3 files changed, 58 insertions(+) create mode 100644 demos/sqlmap/protected/App_Data/person.xml create mode 100644 demos/sqlmap/protected/App_Data/personHelper.xml create mode 100644 demos/sqlmap/protected/App_Data/test.db (limited to 'demos/sqlmap') diff --git a/demos/sqlmap/protected/App_Data/person.xml b/demos/sqlmap/protected/App_Data/person.xml new file mode 100644 index 00000000..4ffe44d9 --- /dev/null +++ b/demos/sqlmap/protected/App_Data/person.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="utf-8" ?> +<sqlMap> + + <select id="SelectAll" resultClass="Person"> + SELECT + per_id as ID, + per_first_name as FirstName, + per_last_name as LastName, + per_birth_date as BirthDate, + per_weight_kg as WeightInKilograms, + per_height_m as HeightInMeters + FROM + person + </select> + +</sqlMap> \ No newline at end of file diff --git a/demos/sqlmap/protected/App_Data/personHelper.xml b/demos/sqlmap/protected/App_Data/personHelper.xml new file mode 100644 index 00000000..ea2d4302 --- /dev/null +++ b/demos/sqlmap/protected/App_Data/personHelper.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="utf-8" ?> + +<sqlMap Name="PersonHelper"> + + <select id="Select" parameterClass="int" resultClass="Person"> + select + PER_ID as ID, + PER_FIRST_NAME as FirstName, + PER_LAST_NAME as LastName, + PER_BIRTH_DATE as BirthDate, + PER_WEIGHT_KG as WeightInKilograms, + PER_HEIGHT_M as HeightInMeters + from PERSON + WHERE + PER_ID = #value# + </select> + + <insert id="Insert" parameterClass="Person"> + insert into PERSON + (PER_ID, PER_FIRST_NAME, PER_LAST_NAME, + PER_BIRTH_DATE, PER_WEIGHT_KG, PER_HEIGHT_M) + values + (#ID#, #FirstName#, #LastName#, + #BirthDate#, #WeightInKilograms#, #HeightInMeters#) + </insert> + + <update id="Update" parameterClass="Person"> + update PERSON set + PER_FIRST_NAME = #FirstName#, + PER_LAST_NAME = #LastName#, + PER_BIRTH_DATE = #BirthDate#, + PER_WEIGHT_KG = #WeightInKilograms#, + PER_HEIGHT_M = #HeightInMeters# + where PER_ID = #ID# + </update> + + <delete id="Delete" parameterClass="int"> + delete from PERSON + where PER_ID = #value# + </delete> + +</sqlMap> diff --git a/demos/sqlmap/protected/App_Data/test.db b/demos/sqlmap/protected/App_Data/test.db new file mode 100644 index 00000000..a40c91fe Binary files /dev/null and b/demos/sqlmap/protected/App_Data/test.db differ -- cgit v1.2.3