<sql-per-host>
<host>*</host>
<!-- You can define the distinct -->
<!-- configuration per each host. -->
<!--
<host>localhost:8080</host>
-->
<sqlinfo>
<insert>
<id>insert01</id>
<!-- The first column must be -->
<!-- Numeric type with at least -->
<!-- 13 digits length. -->
<!-- And it must be the primary key. -->
<!-- The second column must be -->
<!-- String type, to save -->
<!-- the host header. -->
<sql>INSERT INTO account
(req_id,
host_name,
first_name,
last_name,
amount)
VALUES(?,?,?,?,?)
</sql>
<!-- Because the first 2 columns -->
<!-- are always same ones, -->
<!-- we do not have to include -->
<!-- them below. -->
<values>
<param>fname</param>
<param>lname</param>
<param>amount</param>
</values>
</insert>
</sqlinfo>
<sqlinfo>
<update>
<id>update01</id>
<sql>UPDATE account
SET amount=?
WHERE req_id=?
</sql>
<values>
<param>amount</param>
</values>
<where>
<param>rid</param>
</where>
</update>
</sqlinfo>
<sqlinfo>
<delete>
<id>delete01</id>
<sql>DELETE FROM account
WHERE req_id=?
</sql>
<where>
<param>rid</param>
</where>
</delete>
</sqlinfo>
<sqlinfo>
<unique-select>
<id>select01</id>
<sql>SELECT first_name,
last_name,
amount
FROM account
WHERE req_id=?
</sql>
<values>
<param>fname</param>
<param>lname</param>
<param>amount</param>
</values>
<where>
<param>rid</param>
</where>
</unique-select>
</sqlinfo>
<sqlinfo>
<multi-select>
<id>select02</id>
<sql>SELECT first_name,
last_name,
amount
FROM account
WHERE amount > ?
</sql>
<values>
<param>fname</param>
<param>lname</param>
<param>amount</param>
</values>
<where>
<param>amount</param>
</where>
</multi-select>
</sqlinfo>
</sql-per-host>
</request-store>
|
Copyright © 1997-2007 OOP-Research CorporationTM, All Rights Reserved.