diff options
author | wei <> | 2006-12-17 22:20:50 +0000 |
---|---|---|
committer | wei <> | 2006-12-17 22:20:50 +0000 |
commit | 2570226fbac3e26b1e94896b50d1db4bc1aa3308 (patch) | |
tree | 421108ccbdc0ef021e6af4fa35b1d6bcbc352b37 /demos/sqlmap/protected/App_Data | |
parent | ddc0de38f64e5834ce04f0407a8416172b596655 (diff) |
Add TDataSourceConfig, TSqlMapConfig, TActiveRecordConfig
Diffstat (limited to 'demos/sqlmap/protected/App_Data')
-rw-r--r-- | demos/sqlmap/protected/App_Data/person.xml | 29 | ||||
-rw-r--r-- | demos/sqlmap/protected/App_Data/personHelper.xml | 42 | ||||
-rw-r--r-- | demos/sqlmap/protected/App_Data/test.db | bin | 5120 -> 3072 bytes |
3 files changed, 26 insertions, 45 deletions
diff --git a/demos/sqlmap/protected/App_Data/person.xml b/demos/sqlmap/protected/App_Data/person.xml index 4ffe44d9..b5b94175 100644 --- a/demos/sqlmap/protected/App_Data/person.xml +++ b/demos/sqlmap/protected/App_Data/person.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8" ?>
-<sqlMap>
+
+<sqlMapConfig>
<select id="SelectAll" resultClass="Person">
SELECT
@@ -9,8 +10,30 @@ per_birth_date as BirthDate,
per_weight_kg as WeightInKilograms,
per_height_m as HeightInMeters
- FROM
+ FROM
person
</select>
-</sqlMap>
\ No newline at end of file + <insert id="Insert" parameterClass="Person">
+ insert into PERSON
+ (PER_FIRST_NAME, PER_LAST_NAME, PER_BIRTH_DATE, PER_WEIGHT_KG, PER_HEIGHT_M)
+ values
+ (#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>
+
+</sqlMapConfig>
diff --git a/demos/sqlmap/protected/App_Data/personHelper.xml b/demos/sqlmap/protected/App_Data/personHelper.xml deleted file mode 100644 index ea2d4302..00000000 --- a/demos/sqlmap/protected/App_Data/personHelper.xml +++ /dev/null @@ -1,42 +0,0 @@ -<?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 Binary files differindex a40c91fe..8778160a 100644 --- a/demos/sqlmap/protected/App_Data/test.db +++ b/demos/sqlmap/protected/App_Data/test.db |