Mercurial > p > roundup > code
comparison roundup/backends/rdbms_common.py @ 1719:eeb167fb8faf
*** empty log message ***
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Thu, 03 Jul 2003 23:46:34 +0000 |
| parents | 3d627e34f18e |
| children | 5ca448ff8052 |
comparison
equal
deleted
inserted
replaced
| 1717:1d93289af20b | 1719:eeb167fb8faf |
|---|---|
| 1 # $Id: rdbms_common.py,v 1.56 2003-06-24 08:06:27 anthonybaxter Exp $ | 1 # $Id: rdbms_common.py,v 1.57 2003-07-03 23:43:46 richard 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 |
| 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 'retired' 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 args = (((retired==0) and 1) or 0, ) | 1744 if retired: |
| 1745 args = (0, ) | |
| 1746 else: | |
| 1747 args = (1, ) | |
| 1745 sql = 'select id from _%s where __retired__ <> %s'%(self.classname, | 1748 sql = 'select id from _%s where __retired__ <> %s'%(self.classname, |
| 1746 self.db.arg) | 1749 self.db.arg) |
| 1747 else: | 1750 else: |
| 1748 args = () | 1751 args = () |
| 1749 sql = 'select id from _%s'%self.classname | 1752 sql = 'select id from _%s'%self.classname |
