dabo Commit
Revision 3330
Date: 2007-08-23 17:48:03 -0700 (Thu, 23 Aug 2007)
Author: Ed
Trac: http://svn.dabodev.com/trac/dabo/changeset/3330
Changed:
U trunk/dabo/db/dbPostgreSQL.py
Log:
Merged my changes with the ones John just committed.
Diff:
Modified: trunk/dabo/db/dbPostgreSQL.py
===================================================================
--- trunk/dabo/db/dbPostgreSQL.py 2007-08-24 00:40:07 UTC (rev 3329)
+++ trunk/dabo/db/dbPostgreSQL.py 2007-08-24 00:48:03 UTC (rev 3330)
@@ -67,13 +67,13 @@
rs = cursor.getDataSet()
tables = []
for record in rs:
- tables.append(record[0])
+ tables.append(record["tablename"])
return tuple(tables)
def getTableRecordCount(self, tableName, cursor):
cursor.execute("select count(*) as ncount from %s" % tableName)
- return cursor.getDataSet()[0][0]
+ return cursor.getDataSet()[0]["ncount"]
def getFields(self, tableName, cursor):
@@ -106,15 +106,12 @@
thePKFieldName = None
else:
#thestr = rs2[0][3]
- #thePKFieldName = thestr[thestr.find("(") + 1:
thestr.find(")")].split(", ")
- #thePKFieldName = rs2[0][3]
thePKFieldName = rs2[0]['column_name']
fields = []
for r in rs:
- name = r['attname']
- #fldType =r[2]
- fldType =r['typname']
+ name = r["attname"]
+ fldType =r["typname"]
pk = False
if thePKFieldName is not None:
pk = (name in thePKFieldName)
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/dabo-dev/[EMAIL PROTECTED]