[storm] use storm from existing db-scheme
Michael Bayer
mike_mp at zzzcomputing.com
Thu Mar 27 14:21:38 GMT 2008
On Mar 27, 2008, at 12:51 AM, Vsevolod Balashov wrote:
> - python code for trigger emulation (like SQLAlchemy or ActiveRecord
> bad
> practice)
if you're referring to SQLAlchemy's ability to specify a "default
value" for an INSERT or UPDATE, this can optionally be an in-python
function to provide capabilities which the database itself does not
provide. This is an entirely appropriate practice and is needed for
databases that either do not have good default/trigger support (for
example, you cannot use a function for a DEFAULT on SQLite or MySQL)
or where the value cannot be generated by the database itself, such as
GUIDs and others. Here's Hibernate doing it for a JVM-originated
timestamp, for example (where they also give you the option of
interpreter or DB-generated values): http://www.hibernate.org/hib_docs/v3/reference/en/html/mapping.html#mapping-declaration-timestamp
Otherwise SA has no kind of "trigger emulation" I can think of, and we
integrate extremely well with (and encourage the use of) database-
originated events including triggers, DDL level defaults, and ON
UPDATE/DELETE cascades.
More information about the storm
mailing list