diff --git a/roundup/hyperdb.py b/roundup/hyperdb.py
index 1a95a322ae30ab87e50983f91f496243d8e4d1ee..a301d7cd3fa04ac7bdc0fae34681d709171e47b2 100644 (file)
--- a/roundup/hyperdb.py
+++ b/roundup/hyperdb.py
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-# $Id: hyperdb.py,v 1.77 2002-07-18 11:27:47 richard Exp $
+# $Id: hyperdb.py,v 1.81 2002-08-30 08:37:16 richard Exp $
__doc__ = """
Hyperdatabase implementation, especially field types.
class Link:
"""An object designating a Link property that links to a
node in a specified class."""
- def __init__(self, classname, do_journal='no'):
+ def __init__(self, classname, do_journal='yes'):
''' Default is to not journal link and unlink events
'''
self.classname = classname
"do_journal" indicates whether the linked-to nodes should have
'link' and 'unlink' events placed in their journal
"""
- def __init__(self, classname, do_journal='no'):
+ def __init__(self, classname, do_journal='yes'):
''' Default is to not journal link and unlink events
'''
self.classname = classname
# flag to set on retired entries
RETIRED_FLAG = '__hyperdb_retired'
- # XXX deviates from spec: storagelocator is obtained from the config
def __init__(self, config, journaltag=None):
"""Open a hyperdatabase given a specifier to some storage.
def __repr__(self):
'''Slightly more useful representation
'''
- return '<hypderdb.Class "%s">'%self.classname
+ return '<hyperdb.Class "%s">'%self.classname
# Editing nodes:
"""
raise NotImplementedError
- # XXX not in spec
def getnode(self, nodeid, cache=1):
''' Return a convenience wrapper for the node.
"""
raise NotImplementedError
+ def is_retired(self, nodeid):
+ '''Return true if the node is rerired
+ '''
+ raise NotImplementedError
+
+ def destroy(self, nodeid):
+ """Destroy a node.
+
+ WARNING: this method should never be used except in extremely rare
+ situations where there could never be links to the node being
+ deleted
+ WARNING: use retire() instead
+ WARNING: the properties of this node will not be available ever again
+ WARNING: really, use retire() instead
+
+ Well, I think that's enough warnings. This method exists mostly to
+ support the session storage of the cgi interface.
+
+ The node is completely removed from the hyperdb, including all journal
+ entries. It will no longer be available, and will generally break code
+ if there are any references to the node.
+ """
+
def history(self, nodeid):
"""Retrieve the journal of edits on a particular node.
"""
raise NotImplementedError
- # XXX: change from spec - allows multiple props to match
def find(self, **propspec):
"""Get the ids of nodes in this class which link to the given nodes.
"""
raise NotImplementedError
- # XXX not in spec
def filter(self, search_matches, filterspec, sort, group,
num_re = re.compile('^\d+$')):
''' Return a list of the ids of the active nodes in this class that
'''
raise NotImplementedError
-# XXX not in spec
class Node:
''' A convenience wrapper for the given node
'''
#
# $Log: not supported by cvs2svn $
+# Revision 1.80 2002/08/16 04:28:13 richard
+# added is_retired query to Class
+#
+# Revision 1.79 2002/07/29 23:30:14 richard
+# documentation reorg post-new-security
+#
+# Revision 1.78 2002/07/21 03:26:37 richard
+# Gordon, does this help?
+#
+# Revision 1.77 2002/07/18 11:27:47 richard
+# ws
+#
# Revision 1.76 2002/07/18 11:17:30 gmcm
# Add Number and Boolean types to hyperdb.
# Add conversion cases to web, mail & admin interfaces.