perfsonar-dev - r1539 - trunk/perfsonar/conf
Subject: perfsonar development work
List archive
- From:
- To:
- Subject: r1539 - trunk/perfsonar/conf
- Date: Fri, 11 Aug 2006 06:14:53 -0400
Author: roman
Date: 2006-08-11 06:14:52 -0400 (Fri, 11 Aug 2006)
New Revision: 1539
Modified:
trunk/perfsonar/conf/ibatis-L2-status.xml
Log:
changes required by new db schema for L2 path status
Modified: trunk/perfsonar/conf/ibatis-L2-status.xml
===================================================================
--- trunk/perfsonar/conf/ibatis-L2-status.xml 2006-08-11 10:12:11 UTC (rev
1538)
+++ trunk/perfsonar/conf/ibatis-L2-status.xml 2006-08-11 10:14:52 UTC (rev
1539)
@@ -15,8 +15,9 @@
<resultMap id="select-results" class="java.util.HashMap">
- <result property="value" column="status" />
- <result property="timeValue" column="time" />
+ <result property="status_oper" column="status_oper" />
+ <result property="status_admin" column="status_admin" />
+ <result property="timeValue" column="time" />
</resultMap>
@@ -27,18 +28,33 @@
</parameterMap>
+ <!-- this sql statement is prepared for mySQL database -->
<select id="getResults1"
parameterMap="select-parameters1" resultMap="select-results">
<![CDATA[
- select status, time
- from perfsonar_pathstatus
- where pathId = ?
- and time >= ?
- and time <= ?
+ select status_oper, status_admin, unix_timestamp(time) as time
+ from domain_link
+ where id = ?
+ and time >= from_unixtime(?)
+ and time <= from_unixtime(?)
order by time ASC
]]>
</select>
+ <!-- this sql statement is prepared for postgreSQL database -->
+ <!--
+ <select id="getResults1"
+ parameterMap="select-parameters1" resultMap="select-results">
+ <![CDATA[
+ select status_oper, status_admin, date_part('epoch', time) as time
+ from domain_link
+ where id = ?
+ and time >= to_timestamp(?)
+ and time <= to_timestamp(?)
+ order by time ASC
+ ]]>
+ </select>
+ -->
<parameterMap id="select-parameters2" class="java.util.HashMap">
@@ -47,16 +63,29 @@
</parameterMap>
+ <!-- this sql statement is prepared for mySQL database -->
<select id="getResults2"
parameterMap="select-parameters2" resultMap="select-results">
<![CDATA[
- select status, time
- from perfsonar_pathstatus
- where pathId = ?
- and time = (select MAX(time) from perfsonar_pathstatus where pathId
= ?)
+ select status_oper, status_admin, unix_timestamp(time) as time
+ from domain_link
+ where id = ?
+ and time = (select MAX(time) from domain_link where id = ?)
]]>
</select>
+ <!-- this sql statement is prepared for postgreSQL database -->
+ <!--
+ <select id="getResults2"
+ parameterMap="select-parameters2" resultMap="select-results">
+ <![CDATA[
+ select status_oper, status_admin, date_part('epoch', time) as time
+ from domain_link
+ where id = ?
+ and time = (select MAX(time) from domain_link where id = ?)
+ ]]>
+ </select>
+ -->
<!-- storing -->
@@ -70,14 +99,25 @@
</parameterMap>
+ <!-- this sql statement is prepared for mySQL database -->
<insert id="setResults"
parameterMap="insert-parameters">
<![CDATA[
- insert into perfsonar_pathstatus (pathId, time, status, alarm_id_set)
- values (?, ?, ?, '')
+ insert into domain_link (id, from_unixtime(time), status_oper)
+ values (?, ?, ?)
]]>
</insert>
+ <!-- this sql statement is prepared for postgreSQL database -->
+ <!--
+ <insert id="setResults"
+ parameterMap="insert-parameters">
+ <![CDATA[
+ insert into domain_link (id, to_timestamp(time), status_oper)
+ values (?, ?, ?)
+ ]]>
+ </insert>
+ -->
</sqlMap>
- r1539 - trunk/perfsonar/conf, svnlog, 08/11/2006
Archive powered by MHonArc 2.6.16.