Object Database (ODBMS) for Python
Patrick K. O'Brien
pobrien at orbtech.com
Thu Aug 28 21:16:27 EDT 2003
pobrien at orbtech.com (Patrick K. O'Brien) writes:
> I hope that helps demonstrate some of what it can do.
I forgot to show a cool feature:
>>> t = tx.Delete(u1)
>>> db.execute(t)
Traceback (most recent call last):
File "<input>", line 1, in ?
File "/home/pobrien/Code/pypersyst/database.py", line 27, in execute
return self._engine.execute(transaction)
File "/home/pobrien/Code/pypersyst/engine/engine.py", line 75, in execute
return transaction.execute(self._root)
File "/home/pobrien/Code/pypersyst/entity/transaction.py", line 49, in execute
return root[self.classname]._delete(self.oid)
File "/home/pobrien/Code/pypersyst/entity/extent.py", line 204, in _delete
raise error.DeleteRestricted, 'instance is referenced elsewhere'
DeleteRestricted: instance is referenced elsewhere
>>>
What's that? You don't recall seeing referential integrity rules
defined in the schema, or in the application code? That's right, you
didn't. Curious?
--
Patrick K. O'Brien
Orbtech http://www.orbtech.com/web/pobrien
-----------------------------------------------
"Your source for Python programming expertise."
-----------------------------------------------
More information about the Python-list
mailing list