diff flys-backend/contrib/shpimporter/dgm.py @ 5260:8f71fe38977c

fixed DEM-importer to work with Oracle (made by A. Heinecke)
author Tom Gottfried <tom@intevation.de>
date Tue, 12 Mar 2013 19:43:11 +0100
parents 3b86bf214d53
children 9245f4b434b3
line wrap: on
line diff
--- a/flys-backend/contrib/shpimporter/dgm.py	Tue Mar 12 19:16:05 2013 +0100
+++ b/flys-backend/contrib/shpimporter/dgm.py	Tue Mar 12 19:43:11 2013 +0100
@@ -55,16 +55,12 @@
 INSERT INTO ranges (id, river_id, a, b) VALUES (:s, :s, :s, :s)
 """
 SQL_NEXT_ID     = "SELECT coalesce(max(id), -1) + 1 FROM %s"
-SQL_NEXT_ID_ORA = "SELECT coalesce(max(id), -1) + 1 FROM :s"
 
 
 NEXT_IDS = {}
 def next_id(cur, relation, oracle):
     idx = NEXT_IDS.get(relation)
     if idx is None:
-        if oracle:
-            cur.execute(SQL_NEXT_ID_ORA % relation)
-        else:
             cur.execute(SQL_NEXT_ID % relation)
         idx = cur.fetchone()[0]
     NEXT_IDS[relation] = idx + 1

http://dive4elements.wald.intevation.org