dabo Commit
Revision 2198
Date: 2006-06-04 17:42:32 -0700 (Sun, 04 Jun 2006)
Author: ed
Changed:
U trunk/dabo/db/dCursorMixin.py
U trunk/dabo/db/dbSQLite.py
Log:
Added the flush() method to dbSQLite.
Added getCurrentRecord() to dCursorMixin. This returns the current record, as
determined by RowNumber, or None if RowNumber is not pointing to a valid record.
Diff:
Modified: trunk/dabo/db/dCursorMixin.py
===================================================================
--- trunk/dabo/db/dCursorMixin.py 2006-06-03 19:18:00 UTC (rev 2197)
+++ trunk/dabo/db/dCursorMixin.py 2006-06-05 00:42:32 UTC (rev 2198)
@@ -739,6 +739,17 @@
return ret
+ def getCurrentRecord(self):
+ """Returns the current record (as determined by self.RowNumber)
+ as a dict, or None if the RowNumber is not a valid record.
+ """
+ try:
+ ret = self.getDataSet(rowStart=self.RowNumber,
rows=1)[0]
+ except IndexError:
+ ret = None
+ return ret
+
+
def getDataSet(self, flds=(), rowStart=0, rows=None,
returnInternals=False):
""" Get the entire data set encapsulated in a list.
Modified: trunk/dabo/db/dbSQLite.py
===================================================================
--- trunk/dabo/db/dbSQLite.py 2006-06-03 19:18:00 UTC (rev 2197)
+++ trunk/dabo/db/dbSQLite.py 2006-06-05 00:42:32 UTC (rev 2198)
@@ -44,6 +44,10 @@
'begin' even when not using autocommit, simply do nothing.
"""
pass
+
+
+ def flush(self, crs):
+ self._connection.commit()
def formatDateTime(self, val):
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev