Update of /cvsroot/jtoolkit/jToolkit/data
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9825
Modified Files:
dbtable.py
Log Message:
added rowidexists function to dbtable
Index: dbtable.py
===================================================================
RCS file: /cvsroot/jtoolkit/jToolkit/data/dbtable.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** dbtable.py 9 Feb 2004 12:58:31 -0000 1.7
--- dbtable.py 9 Feb 2004 14:09:25 -0000 1.8
***************
*** 80,83 ****
--- 80,89 ----
return record
+ def rowidexists(self, rowid):
+ """returns where a record exists with the given rowid"""
+ sql = "select count(*) from %s where %s" % (self.tablename, self.rowidclause(rowid))
+ count = int(self.db.singlevalue(sql))
+ return count > 0
+
def getdefaultrecord(self):
"""retrieves a default record for new categories"""
|