Mercurial > p > roundup > code
comparison roundup/hyperdb.py @ 880:de3da99a7c02
Add Number and Boolean types to hyperdb.
Add conversion cases to web, mail & admin interfaces.
Add storage/serialization cases to back_anydbm & back_metakit.
| author | Gordon B. McMillan <gmcm@users.sourceforge.net> |
|---|---|
| date | Thu, 18 Jul 2002 11:17:31 +0000 |
| parents | 2dd862af72ee |
| children | 6ee42c6e472b |
comparison
equal
deleted
inserted
replaced
| 878:8828f0f2e825 | 880:de3da99a7c02 |
|---|---|
| 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
| 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" | 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" |
| 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, | 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
| 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. | 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
| 17 # | 17 # |
| 18 # $Id: hyperdb.py,v 1.75 2002-07-14 02:05:53 richard Exp $ | 18 # $Id: hyperdb.py,v 1.76 2002-07-18 11:17:30 gmcm Exp $ |
| 19 | 19 |
| 20 __doc__ = """ | 20 __doc__ = """ |
| 21 Hyperdatabase implementation, especially field types. | 21 Hyperdatabase implementation, especially field types. |
| 22 """ | 22 """ |
| 23 | 23 |
| 108 self.do_journal = do_journal == 'yes' | 108 self.do_journal = do_journal == 'yes' |
| 109 def __repr__(self): | 109 def __repr__(self): |
| 110 ' more useful for dumps ' | 110 ' more useful for dumps ' |
| 111 return '<%s to "%s">'%(self.__class__, self.classname) | 111 return '<%s to "%s">'%(self.__class__, self.classname) |
| 112 | 112 |
| 113 class Boolean: | |
| 114 """An object designating a boolean property""" | |
| 115 def __repr__(self): | |
| 116 'more useful for dumps' | |
| 117 return '<%s>' % self.__class__ | |
| 118 | |
| 119 class Number: | |
| 120 """An object designating a numeric property""" | |
| 121 def __repr__(self): | |
| 122 'more useful for dumps' | |
| 123 return '<%s>' % self.__class__ | |
| 113 # | 124 # |
| 114 # Support for splitting designators | 125 # Support for splitting designators |
| 115 # | 126 # |
| 116 class DesignatorError(ValueError): | 127 class DesignatorError(ValueError): |
| 117 pass | 128 pass |
| 578 cl.create(name=options[i], order=i) | 589 cl.create(name=options[i], order=i) |
| 579 return hyperdb.Link(name) | 590 return hyperdb.Link(name) |
| 580 | 591 |
| 581 # | 592 # |
| 582 # $Log: not supported by cvs2svn $ | 593 # $Log: not supported by cvs2svn $ |
| 594 # Revision 1.75 2002/07/14 02:05:53 richard | |
| 595 # . all storage-specific code (ie. backend) is now implemented by the backends | |
| 596 # | |
| 583 # Revision 1.74 2002/07/10 00:24:10 richard | 597 # Revision 1.74 2002/07/10 00:24:10 richard |
| 584 # braino | 598 # braino |
| 585 # | 599 # |
| 586 # Revision 1.73 2002/07/10 00:19:48 richard | 600 # Revision 1.73 2002/07/10 00:19:48 richard |
| 587 # Added explicit closing of backend database handles. | 601 # Added explicit closing of backend database handles. |
