# HG changeset patch # User casties # Date 1283338923 -7200 # Node ID 55dbaea75e66a506e12df337a8a76b4d34fe17df # Parent c237699c4752749f11afc5da012a5940fb27df5f more work on types diff -r c237699c4752 -r 55dbaea75e66 RestDbInterface.py --- a/RestDbInterface.py Tue Aug 31 17:56:23 2010 +0200 +++ b/RestDbInterface.py Wed Sep 01 13:02:03 2010 +0200 @@ -176,6 +176,18 @@ def setTableMetaTypes(self,schema,table,fields): """sets the GIS meta information for table""" logging.debug("settablemetatypes schema=%s, table=%s, fields=%s"%(schema,table,fields)) + gisIdField = None + latField = None + lonField = None + for f in fields: + t = f['type'] + if t == 'gis_id': + gisIdField = f['name'] + elif t == 'coord_lat': + latField = f['name'] + elif t == 'coord_lon': + lonField = f['name'] + res = self.executeSQL("select * from metadata where tablename=%s", table) #if len(res["rows"]) > 0: # TODO: what now?