[Greater-commits] r3732 - in branches/3.0.0-usf/GREAT-ER-DB-trunk: . dagreater impl/postgresql impl/postgresql/test/PostgreSQL
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Jul 28 12:32:09 CEST 2011
Author: aheinecke
Date: 2011-07-28 12:32:03 +0200 (Thu, 28 Jul 2011)
New Revision: 3732
Modified:
branches/3.0.0-usf/GREAT-ER-DB-trunk/
branches/3.0.0-usf/GREAT-ER-DB-trunk/ChangeLog
branches/3.0.0-usf/GREAT-ER-DB-trunk/README
branches/3.0.0-usf/GREAT-ER-DB-trunk/dagreater/apispec.py
branches/3.0.0-usf/GREAT-ER-DB-trunk/impl/postgresql/dagreater_pg.h
branches/3.0.0-usf/GREAT-ER-DB-trunk/impl/postgresql/datypes_pg.h
branches/3.0.0-usf/GREAT-ER-DB-trunk/impl/postgresql/gdagreater_pg.pgc
branches/3.0.0-usf/GREAT-ER-DB-trunk/impl/postgresql/test/PostgreSQL/create_db_objects.sql
Log:
Merged revisions 137-143 via svnmerge from
svn+ssh://wald.intevation.org/greater/branches/GREAT-ER-DB/usf
........
r137 | frank | 2004-10-28 13:02:34 +0200 (Thu, 28 Oct 2004) | 2 lines
Added vol_val and vol_dist to DA_S_strech ListStruct
........
r138 | frank | 2004-10-28 13:02:52 +0200 (Thu, 28 Oct 2004) | 2 lines
Added vol_val and vol_dist to DA_T_stretch_pg_h and DA_T_stretch_pg_i
........
r139 | frank | 2004-10-28 13:03:09 +0200 (Thu, 28 Oct 2004) | 2 lines
Added vol_val and vol_dist to DA_T_stretch
........
r140 | frank | 2004-10-28 13:03:39 +0200 (Thu, 28 Oct 2004) | 4 lines
(gda_get_stretch, gda_insert_stretch, gda_update_stretch, gda_delete_stretch):
Added vol_val and vol_dist
(gda_get_version): Upated copyright statement.
........
r141 | frank | 2004-10-28 13:04:10 +0200 (Thu, 28 Oct 2004) | 2 lines
Added vol_val and vol_dist to create table stretch_tab.
........
r142 | frank | 2004-10-28 13:04:31 +0200 (Thu, 28 Oct 2004) | 2 lines
Added --wrapper_with_debug_output to the documented options of setup.py
........
r143 | frank | 2004-10-28 13:05:23 +0200 (Thu, 28 Oct 2004) | 2 lines
Two new fields in stretch_tab: vol_val and vol_dist
........
Property changes on: branches/3.0.0-usf/GREAT-ER-DB-trunk
___________________________________________________________________
Name: svnmerge-integrated
- /branches/GREAT-ER-DB/usf:1-133,217
+ /branches/GREAT-ER-DB/usf:1-133,137-143,217
Name: svn:mergeinfo
-
Modified: branches/3.0.0-usf/GREAT-ER-DB-trunk/ChangeLog
===================================================================
--- branches/3.0.0-usf/GREAT-ER-DB-trunk/ChangeLog 2011-07-28 09:30:09 UTC (rev 3731)
+++ branches/3.0.0-usf/GREAT-ER-DB-trunk/ChangeLog 2011-07-28 10:32:03 UTC (rev 3732)
@@ -63,6 +63,45 @@
The former implicit statement (e.g. " VALUES (:h_stretch)") caused
an error 201: Too many parameters (returned by the server).
+2004-10-28 Frank Koormann <frank.koormann at intevation.de>
+
+ Added two new parameters to the stretch_tab for stretch volume:
+ vol_val and vol_dist:
+ ALTER TABLE stretch_tab ADD COLUMN vol_val VARCHAR(255);
+ ALTER TABLE stretch_tab ADD COLUMN vol_dist VARCHAR(11);
+
+ INSERT INTO para_tree_def_tab VALUES ('VOL_VAL',
+ 'STRETCH_TAB', 'STRETCH_TAB', 'STRETCH_TAB', 'DISTRIB',
+ -1, 85, 0, 0, 'Stretch volume', '', '',
+ 'm^3', '', '', 'Stretch volume');
+ INSERT INTO para_tree_def_tab VALUES ('VOL_DIST',
+ 'STRETCH_TAB', 'STRETCH_TAB', 'STRETCH_TAB', 'INT',
+ -1, 90, 0, 0, 'Stretch volume distribution', '', '',
+ '', '', '', 'Stretch volume distribution');
+ The actual column definition must include a NOT NULL contraint!
+
+ The new fields also is requires updates of numerous API sections:
+
+ * dagreater/apispec.py:
+ Added vol_val and vol_dist to DA_S_strech ListStruct
+
+ * impl/postgresql/dagreater_pg.h:
+ Added vol_val and vol_dist to DA_T_stretch_pg_h and DA_T_stretch_pg_i
+
+ * impl/postgresql/datypes_pg.h:
+ Added vol_val and vol_dist to DA_T_stretch
+
+ * impl/postgresql/gdagreater_pg.pgc (gda_get_stretch,
+ gda_insert_stretch, gda_update_stretch, gda_delete_stretch):
+ Added vol_val and vol_dist
+ (gda_get_version): Upated copyright statement.
+
+ * impl/postgresql/test/PostgreSQL/create_db_objects.sql:
+ Added vol_val and vol_dist to create table stretch_tab.
+
+ * README: Added --wrapper_with_debug_output to the documented options
+ of setup.py
+
2004-07-14 Harjo Korte <harjo.korte at intevation.de>
* impl/postgresql/gdagreater_pg.pgc (gda_load_bin_obj):
Modified: branches/3.0.0-usf/GREAT-ER-DB-trunk/README
===================================================================
--- branches/3.0.0-usf/GREAT-ER-DB-trunk/README 2011-07-28 09:30:09 UTC (rev 3731)
+++ branches/3.0.0-usf/GREAT-ER-DB-trunk/README 2011-07-28 10:32:03 UTC (rev 3732)
@@ -16,10 +16,9 @@
the library and include paths supplying the options
--postgres-lib-path and --postgres-incl-path.
-Additional options:
- --wrapper-with-debug-output
+Additional Options:
+ --wrapper_with_debug_output
-
Usage
-----
Modified: branches/3.0.0-usf/GREAT-ER-DB-trunk/dagreater/apispec.py
===================================================================
--- branches/3.0.0-usf/GREAT-ER-DB-trunk/dagreater/apispec.py 2011-07-28 09:30:09 UTC (rev 3731)
+++ branches/3.0.0-usf/GREAT-ER-DB-trunk/dagreater/apispec.py 2011-07-28 10:32:03 UTC (rev 3732)
@@ -5,11 +5,6 @@
#
# According to API-Specification 3.0
-__version__ = "$Revision: 1.10 $"
-# $Source: /vol1/home/aheinecke/develop/greater/cvs2/GREAT-ER-DB/dagreater/apispec.py,v $
-# $Id: apispec.py,v 1.10 2005-11-03 11:20:10 bh Exp $
-
-
from WrapperGenerator.typesystem import Char, Int, Array, Struct, Pointer
from WrapperGenerator.functions import WrappedFunction, SpecialFunction
from GreaterAPIGenerator.greatertypes import ListStruct
@@ -106,6 +101,8 @@
('l', Array('char', 41)),
('d_val', Array('char', 256)),
('d_dist', Array('char', 12)),
+ ('vol_val', Array('char', 256)),
+ ('vol_dist', Array('char', 12)),
('next_element', Pointer('DA_S_stretch'))])
Modified: branches/3.0.0-usf/GREAT-ER-DB-trunk/impl/postgresql/dagreater_pg.h
===================================================================
--- branches/3.0.0-usf/GREAT-ER-DB-trunk/impl/postgresql/dagreater_pg.h 2011-07-28 09:30:09 UTC (rev 3731)
+++ branches/3.0.0-usf/GREAT-ER-DB-trunk/impl/postgresql/dagreater_pg.h 2011-07-28 10:32:03 UTC (rev 3732)
@@ -518,6 +518,8 @@
char l [ 41];
char d_val [256];
char d_dist [ 12];
+ char vol_val [256];
+ char vol_dist [ 12];
} DA_T_stretch_pg_h;
/*! indicator variables for host variable struct DA_T_stretch_pg_h
@@ -539,6 +541,8 @@
short int l;
short int d_val;
short int d_dist;
+ short int vol_val;
+ short int vol_dist;
} DA_T_stretch_pg_i;
Modified: branches/3.0.0-usf/GREAT-ER-DB-trunk/impl/postgresql/datypes_pg.h
===================================================================
--- branches/3.0.0-usf/GREAT-ER-DB-trunk/impl/postgresql/datypes_pg.h 2011-07-28 09:30:09 UTC (rev 3731)
+++ branches/3.0.0-usf/GREAT-ER-DB-trunk/impl/postgresql/datypes_pg.h 2011-07-28 10:32:03 UTC (rev 3732)
@@ -154,6 +154,8 @@
char l [ 41];
char d_val [256];
char d_dist [ 12];
+ char vol_val [256];
+ char vol_dist [ 12];
struct DA_S_stretch *next_element;
} DA_T_stretch;
Modified: branches/3.0.0-usf/GREAT-ER-DB-trunk/impl/postgresql/gdagreater_pg.pgc
===================================================================
--- branches/3.0.0-usf/GREAT-ER-DB-trunk/impl/postgresql/gdagreater_pg.pgc 2011-07-28 09:30:09 UTC (rev 3731)
+++ branches/3.0.0-usf/GREAT-ER-DB-trunk/impl/postgresql/gdagreater_pg.pgc 2011-07-28 10:32:03 UTC (rev 3732)
@@ -4690,7 +4690,7 @@
*/
void gda_get_version (char *vp_ver)
{
- strcpy (vp_ver, "GREAT-ER-API with PostgreSQL Version 1.1 07/2011 (c) Intevation");
+ strcpy (vp_ver, "GREAT-ER-API for USF with PostgreSQL Version 1.1 07/2011 (c) Intevation");
}
@@ -5726,6 +5726,8 @@
char l [ 41];
char d_val [256];
char d_dist [ 12];
+ char vol_val [256];
+ char vol_dist [ 12];
} h_stretch;
struct DA_T_stretch_pg_i{ /* indicator variables for host variable struct */
@@ -5745,6 +5747,8 @@
short int l;
short int d_val;
short int d_dist;
+ short int vol_val;
+ short int vol_dist;
}h_ind_stretch;
EXEC SQL END DECLARE SECTION;
@@ -5804,7 +5808,9 @@
"V_DIST,"
"L,"
"D_VAL,"
- "D_DIST "
+ "D_DIST,"
+ "VOL_VAL,"
+ "VOL_DIST "
"FROM STRETCH_TAB "
"WHERE %s "
"ORDER BY STRETCH_ID", h_where_clause);
@@ -5843,6 +5849,8 @@
if (h_ind_stretch.l == -1) strcpy(h_stretch.l, "");
if (h_ind_stretch.d_val == -1) strcpy(h_stretch.d_val, "");
if (h_ind_stretch.d_dist == -1) strcpy(h_stretch.d_dist, "");
+ if (h_ind_stretch.vol_val == -1) strcpy(h_stretch.vol_val, "");
+ if (h_ind_stretch.vol_dist == -1) strcpy(h_stretch.vol_dist, "");
/* copy result into temp. buffer */
v_stretch_buf.stretch_id = h_stretch.stretch_id;
@@ -5862,6 +5870,8 @@
strcpy(v_stretch_buf.l, h_stretch.l);
strcpy(v_stretch_buf.d_val, h_stretch.d_val);
strcpy(v_stretch_buf.d_dist, h_stretch.d_dist);
+ strcpy(v_stretch_buf.vol_val, h_stretch.vol_val);
+ strcpy(v_stretch_buf.vol_dist, h_stretch.vol_dist);
v_stretch_buf.next_element = NULL;
@@ -6089,6 +6099,8 @@
char l [ 41];
char d_val [256];
char d_dist [ 12];
+ char vol_val [256];
+ char vol_dist [ 12];
}h_stretch;
EXEC SQL END DECLARE SECTION;
@@ -6158,44 +6170,32 @@
strcpy(h_stretch.l , vp_stretch->l);
strcpy(h_stretch.d_val , vp_stretch->d_val);
strcpy(h_stretch.d_dist , vp_stretch->d_dist);
+ strcpy(h_stretch.vol_val , vp_stretch->vol_val);
+ strcpy(h_stretch.vol_dist , vp_stretch->vol_dist);
EXEC SQL SET CONNECTION TO :h_con_name;
/* Insert passed record */
errln = 60;
- EXEC SQL INSERT INTO STRETCH_TAB (
- STRETCH_ID,
- CATCH_ID,
- STRETCH_CLASS_ID,
- UP1_ID,
- UP2_ID,
- DOWN1_ID,
- DOWN2_ID,
- NAME,
- TYPE,
- Q_VAL,
- Q_DIST,
- V_VAL,
- V_DIST,
- L,
- D_VAL,
- D_DIST )
- VALUES (:h_stretch.stretch_id,
- :h_stretch.catch_id,
- :h_stretch.stretch_class_id,
- :h_stretch.up1_id,
- :h_stretch.up2_id,
- :h_stretch.down1_id,
- :h_stretch.down2_id,
- :h_stretch.name,
- :h_stretch.type,
- :h_stretch.q_val,
- :h_stretch.q_dist,
- :h_stretch.v_val,
- :h_stretch.v_dist,
- :h_stretch.l,
- :h_stretch.d_val,
- :h_stretch.d_dist );
+ EXEC SQL INSERT INTO STRETCH_TAB ( STRETCH_ID,
+ CATCH_ID,
+ STRETCH_CLASS_ID,
+ UP1_ID,
+ UP2_ID,
+ DOWN1_ID,
+ DOWN2_ID,
+ NAME,
+ TYPE,
+ Q_VAL,
+ Q_DIST,
+ V_VAL,
+ V_DIST,
+ L,
+ D_VAL,
+ D_DIST,
+ VOL_VAL,
+ VOL_DIST )
+ VALUES (:h_stretch );
/* Update MOD_DATE in master (CATCH_TAB) */
h_catch_id_qry = vp_stretch->catch_id;
@@ -6293,6 +6293,8 @@
char l [ 41];
char d_val [256];
char d_dist [ 12];
+ char vol_val [256];
+ char vol_dist [ 12];
} h_stretch;
char h_fmt_date[30];
@@ -6346,6 +6348,8 @@
strcpy (h_stretch.l , vp_stretch.l);
strcpy (h_stretch.d_val , vp_stretch.d_val);
strcpy (h_stretch.d_dist , vp_stretch.d_dist);
+ strcpy (h_stretch.vol_val , vp_stretch.vol_val);
+ strcpy (h_stretch.vol_dist , vp_stretch.vol_dist);
EXEC SQL SET CONNECTION TO :h_con_name;
@@ -6364,7 +6368,9 @@
V_DIST = :h_stretch.v_dist,
L = :h_stretch.l,
D_VAL = :h_stretch.d_val,
- D_DIST = :h_stretch.d_dist
+ D_DIST = :h_stretch.d_dist,
+ VOL_VAL = :h_stretch.vol_val,
+ VOL_DIST = :h_stretch.vol_dist
WHERE CATCH_ID = :h_stretch.catch_id
AND STRETCH_ID = :h_stretch.stretch_id;
@@ -6466,6 +6472,8 @@
char l [ 41];
char d_val [256];
char d_dist [ 12];
+ char vol_val [256];
+ char vol_dist [ 12];
} h_stretch;
char h_con_name[31];
Modified: branches/3.0.0-usf/GREAT-ER-DB-trunk/impl/postgresql/test/PostgreSQL/create_db_objects.sql
===================================================================
--- branches/3.0.0-usf/GREAT-ER-DB-trunk/impl/postgresql/test/PostgreSQL/create_db_objects.sql 2011-07-28 09:30:09 UTC (rev 3731)
+++ branches/3.0.0-usf/GREAT-ER-DB-trunk/impl/postgresql/test/PostgreSQL/create_db_objects.sql 2011-07-28 10:32:03 UTC (rev 3732)
@@ -638,6 +638,8 @@
L VARCHAR (40) NOT NULL,
D_VAL VARCHAR (255) NOT NULL,
D_DIST VARCHAR (11) ,
+ VOL_VAL VARCHAR (255) NOT NULL,
+ VOL_DIST VARCHAR (11) ,
CONSTRAINT STRETCH_U1_IDX
PRIMARY KEY ( CATCH_ID, STRETCH_ID )
);
More information about the Greater-commits
mailing list