Mercurial > p > roundup > code
comparison roundup/backends/rdbms_common.py @ 1753:9d7c396defe1 maint-0.5
backporting fix from HEAD
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Tue, 26 Aug 2003 00:15:09 +0000 |
| parents | 44319ba5a7a7 |
| children |
comparison
equal
deleted
inserted
replaced
| 1723:311375e4f2fe | 1753:9d7c396defe1 |
|---|---|
| 1 # $Id: rdbms_common.py,v 1.27.2.9 2003-06-24 08:18:19 anthonybaxter Exp $ | 1 # $Id: rdbms_common.py,v 1.27.2.10 2003-08-26 00:15:09 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 |
| 1122 | 1122 |
| 1123 # "unmarshal" where necessary | 1123 # "unmarshal" where necessary |
| 1124 if propname == 'id': | 1124 if propname == 'id': |
| 1125 newid = value | 1125 newid = value |
| 1126 continue | 1126 continue |
| 1127 elif propname == 'is retired': | |
| 1128 # is the item retired? | |
| 1129 if int(value): | |
| 1130 retire = 1 | |
| 1131 continue | |
| 1127 elif value is None: | 1132 elif value is None: |
| 1133 d[propname] = None | |
| 1134 continue | |
| 1135 | |
| 1136 prop = properties[propname] | |
| 1137 if value is None: | |
| 1128 # don't set Nones | 1138 # don't set Nones |
| 1129 continue | 1139 continue |
| 1130 elif isinstance(prop, hyperdb.Date): | 1140 elif isinstance(prop, hyperdb.Date): |
| 1131 value = date.Date(value) | 1141 value = date.Date(value) |
| 1132 elif isinstance(prop, hyperdb.Interval): | 1142 elif isinstance(prop, hyperdb.Interval): |
