Mercurial > p > roundup > code
comparison roundup/backends/rdbms_common.py @ 1707:3d627e34f18e
sqlite backend now passes all tests under 2.3.
Searching for other parts of the code that was assigning the value of
a boolean test (either =.*not or =.*==) showed nothing else that
looked likely.
| author | Anthony Baxter <anthonybaxter@users.sourceforge.net> |
|---|---|
| date | Tue, 24 Jun 2003 08:06:27 +0000 |
| parents | cc96bf971b33 |
| children | eeb167fb8faf |
comparison
equal
deleted
inserted
replaced
| 1706:5a28eea9a33c | 1707:3d627e34f18e |
|---|---|
| 1 # $Id: rdbms_common.py,v 1.55 2003-04-22 20:53:54 kedder Exp $ | 1 # $Id: rdbms_common.py,v 1.56 2003-06-24 08:06:27 anthonybaxter Exp $ |
| 2 ''' Relational database (SQL) backend common code. | 2 ''' Relational database (SQL) backend common code. |
| 3 | 3 |
| 4 Basics: | 4 Basics: |
| 5 | 5 |
| 6 - map roundup classes to relational tables | 6 - map roundup classes to relational tables |
| 1737 ''' Retrieve all the ids of the nodes for a particular Class. | 1737 ''' Retrieve all the ids of the nodes for a particular Class. |
| 1738 | 1738 |
| 1739 Set retired=None to get all nodes. Otherwise it'll get all the | 1739 Set retired=None to get all nodes. Otherwise it'll get all the |
| 1740 retired or non-retired nodes, depending on the flag. | 1740 retired or non-retired nodes, depending on the flag. |
| 1741 ''' | 1741 ''' |
| 1742 # flip the sense of the flag if we don't want all of them | 1742 # flip the sense of the 'retired' flag if we don't want all of them |
| 1743 if retired is not None: | 1743 if retired is not None: |
| 1744 retired = not retired | 1744 args = (((retired==0) and 1) or 0, ) |
| 1745 args = (retired, ) | |
| 1746 sql = 'select id from _%s where __retired__ <> %s'%(self.classname, | 1745 sql = 'select id from _%s where __retired__ <> %s'%(self.classname, |
| 1747 self.db.arg) | 1746 self.db.arg) |
| 1748 else: | 1747 else: |
| 1749 args = () | 1748 args = () |
| 1750 sql = 'select id from _%s'%self.classname | 1749 sql = 'select id from _%s'%self.classname |
