[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/appserver/src geasList.py
From: |
Reinhard Mueller |
Subject: |
gnue/appserver/src geasList.py |
Date: |
Mon, 06 Jan 2003 09:22:38 -0500 |
CVSROOT: /cvsroot/gnue
Module name: gnue
Changes by: Reinhard Mueller <address@hidden> 03/01/06 09:22:38
Modified files:
appserver/src : geasList.py
Log message:
Implemented fetch with negative start value.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/appserver/src/geasList.py.diff?tr1=1.15&tr2=1.16&r1=text&r2=text
Patches:
Index: gnue/appserver/src/geasList.py
diff -c gnue/appserver/src/geasList.py:1.15 gnue/appserver/src/geasList.py:1.16
*** gnue/appserver/src/geasList.py:1.15 Sat Jan 4 11:53:50 2003
--- gnue/appserver/src/geasList.py Mon Jan 6 09:22:38 2003
***************
*** 19,25 ****
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # $Id: geasList.py,v 1.15 2003/01/04 16:53:50 reinhard Exp $
from gnue.common import GDataSource,GConditions
import geasInstance
--- 19,25 ----
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # $Id: geasList.py,v 1.16 2003/01/06 14:22:38 reinhard Exp $
from gnue.common import GDataSource,GConditions
import geasInstance
***************
*** 127,136 ****
--- 127,146 ----
return None
#
---------------------------------------------------------------------------
+ # get the length of the list (the number of entries)
+ #
---------------------------------------------------------------------------
+
+ def count (self):
+ return self._resultset.getRecordCount ()
+
+ #
---------------------------------------------------------------------------
# Fetch data from the database backend
#
---------------------------------------------------------------------------
def fetch (self, start, count):
+ # negative value for start means starting from the end of the list
+ if start < 0:
+ start = self.count () + start
result = []
c = 0
object = self.firstInstance ()
***************
*** 151,160 ****
def insertNewInstance (self):
self._resultset.insertRecord ()
return geasInstance.geasInstance (self, self._resultset.current)
-
- #
---------------------------------------------------------------------------
- # get the length of the list (the number of entries)
- #
---------------------------------------------------------------------------
-
- def count (self):
- return self._resultset.getRecordCount ()
--- 161,163 ----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/appserver/src geasList.py,
Reinhard Mueller <=