From 48c9009da7c9343bbc71ef3970ad9f9b38a52a66 Mon Sep 17 00:00:00 2001 From: tjc <tjc@ee4ac58c-ac51-4696-9907-e4b3aa274f04> Date: Fri, 7 Mar 2008 14:31:45 +0000 Subject: [PATCH] add insertAnalysis git-svn-id: svn+ssh://svn.internal.sanger.ac.uk/repos/svn/pathsoft/artemis/trunk@7210 ee4ac58c-ac51-4696-9907-e4b3aa274f04 --- artemis_sqlmap/Analysis.xml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/artemis_sqlmap/Analysis.xml b/artemis_sqlmap/Analysis.xml index 22e93fc2d..3b357ffa2 100644 --- a/artemis_sqlmap/Analysis.xml +++ b/artemis_sqlmap/Analysis.xml @@ -17,4 +17,31 @@ WHERE analysis_id=#analysis_id# </select> + <!-- INSERT --> + <insert id="insertAnalysis" parameterClass="Analysis"> + INSERT INTO analysis + ( + program, programversion + <isNotNull property="name"> ,name </isNotNull> + <isNotNull property="description"> ,description </isNotNull> + <isNotNull property="algorithm"> ,algorithm </isNotNull> + <isNotNull property="sourceName"> ,sourcename </isNotNull> + <isNotNull property="sourceVersion"> ,sourceversion </isNotNull> + <isNotNull property="sourceUri"> ,sourceuri </isNotNull> + <isNotNull property="timeExecuted"> ,timeexecuted </isNotNull> + ) + VALUES + ( #program#, #programVersion# + <isNotNull property="name"> ,#name# </isNotNull> + <isNotNull property="description"> ,#description# </isNotNull> + <isNotNull property="algorithm"> ,#algorithm# </isNotNull> + <isNotNull property="sourceName"> ,#sourceName# </isNotNull> + <isNotNull property="sourceVersion"> ,#sourceVersion# </isNotNull> + <isNotNull property="sourceUri"> ,#sourceUri# </isNotNull> + <isNotNull property="timeExecuted"> ,#timeExecuted# </isNotNull> + ) + <selectKey keyProperty="analysisId" resultClass="int"> + SELECT currval('analysis_analysis_id_seq') + </selectKey> + </insert> </sqlMap> \ No newline at end of file -- GitLab