comparison roundup/hyperdb.py @ 764:d913440c534f

[SF#564271] find() and new properties
author Richard Jones <richard@users.sourceforge.net>
date Tue, 11 Jun 2002 06:52:03 +0000
parents e7b89de78052
children 4409798dfa15
comparison
equal deleted inserted replaced
763:a85919c54f3a 764:d913440c534f
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.67 2002-06-11 05:02:37 richard Exp $ 18 # $Id: hyperdb.py,v 1.68 2002-06-11 06:52:03 richard Exp $
19 19
20 __doc__ = """ 20 __doc__ = """
21 Hyperdatabase implementation, especially field types. 21 Hyperdatabase implementation, especially field types.
22 """ 22 """
23 23
791 raise ValueError, '%s has no node %s'%(prop.classname, nodeid) 791 raise ValueError, '%s has no node %s'%(prop.classname, nodeid)
792 792
793 # ok, now do the find 793 # ok, now do the find
794 cldb = self.db.getclassdb(self.classname) 794 cldb = self.db.getclassdb(self.classname)
795 l = [] 795 l = []
796 for id in self.db.getnodeids(self.classname, cldb): 796 for id in self.db.getnodeids(self.classname, db=cldb):
797 node = self.db.getnode(self.classname, id, cldb) 797 node = self.db.getnode(self.classname, id, db=cldb)
798 if node.has_key(self.db.RETIRED_FLAG): 798 if node.has_key(self.db.RETIRED_FLAG):
799 continue 799 continue
800 for propname, nodeid in propspec: 800 for propname, nodeid in propspec:
801 # can't test if the node doesn't have this property
802 if not node.has_key(propname):
803 continue
801 prop = self.properties[propname] 804 prop = self.properties[propname]
802 property = node[propname] 805 property = node[propname]
803 if isinstance(prop, Link) and nodeid == property: 806 if isinstance(prop, Link) and nodeid == property:
804 l.append(id) 807 l.append(id)
805 elif isinstance(prop, Multilink) and nodeid in property: 808 elif isinstance(prop, Multilink) and nodeid in property:
1156 cl.create(name=options[i], order=i) 1159 cl.create(name=options[i], order=i)
1157 return hyperdb.Link(name) 1160 return hyperdb.Link(name)
1158 1161
1159 # 1162 #
1160 # $Log: not supported by cvs2svn $ 1163 # $Log: not supported by cvs2svn $
1164 # Revision 1.67 2002/06/11 05:02:37 richard
1165 # . #565979 ] code error in hyperdb.Class.find
1166 #
1161 # Revision 1.66 2002/05/25 07:16:24 rochecompaan 1167 # Revision 1.66 2002/05/25 07:16:24 rochecompaan
1162 # Merged search_indexing-branch with HEAD 1168 # Merged search_indexing-branch with HEAD
1163 # 1169 #
1164 # Revision 1.65 2002/05/22 04:12:05 richard 1170 # Revision 1.65 2002/05/22 04:12:05 richard
1165 # . applied patch #558876 ] cgi client customization 1171 # . applied patch #558876 ] cgi client customization

Roundup Issue Tracker: http://roundup-tracker.org/