Contact: fumanchu@aminus.org

Log in as guest/dejavu to create tickets

I think I've seen this ORM somewhere before...

Changeset 34

Show
Ignore:
Timestamp:
11/21/04 06:04:47
Author:
fumanchu
Message:

Moved old readme contents to other locations.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/__init__.py

    r33 r34  
     1"""Dejavu is an Object-Relational Mapper. This is version 1.2.5. 
     2 
     3Persisted objects are called "Units", and are served into Sandboxes within 
     4an Arena. Each Unit instance has a class, which maintains its schema via 
     5Unit Properties. 
     6 
     7"Dejavu", to quote Flying Circus episode 16, means "that strange feeling 
     8we sometimes get that we've lived through something before." What better 
     9name for an object server? Our terminology reflects this cognitive bent: 
     10sandboxes "memorize", "recall" and "forget" Units. 
     11 
     12Most Unit lifecycles follow the same pattern: 
     13    aUnit = sandbox.unit(cls, ID=ID) 
     14    val = aUnit.propertyName 
     15    aUnit.propertyName = newValue 
     16    del aUnit # or otherwise release the reference, e.g. close the scope. 
     17 
     18When creating new Units, a similar pattern would be: 
     19    newUnit = unit_class() 
     20    newUnit.propertyName = newValue 
     21    sandbox.memorize(newUnit) 
     22    del newUnit # or otherwise release the reference. 
     23 
     24Using recall(), you get an iterator: 
     25    for unit in sandbox.recall(cls, expr): 
     26        do_something_with(unit) 
     27 
     28You destroy a Unit via Unit.forget(). 
     29 
     30Applications only need to call Unit.repress() when they wish to stop 
     31caching the object, returning it to storage. This is very rare, and 
     32should really only be performed within dejavu code. 
     33 
     34 
     35LICENSE 
     36------- 
     37This work, including the source code, documentation 
     38and related data, is placed into the public domain. 
     39 
     40The original author is Robert Brewer, Amor Ministries. 
     41fumanchu@amor.org 
     42svn://casadeamor.com/cation/trunk 
     43 
     44THIS SOFTWARE IS PROVIDED AS-IS, WITHOUT WARRANTY 
     45OF ANY KIND, NOT EVEN THE IMPLIED WARRANTY OF 
     46MERCHANTABILITY. THE AUTHOR OF THIS SOFTWARE 
     47ASSUMES _NO_ RESPONSIBILITY FOR ANY CONSEQUENCE 
     48RESULTING FROM THE USE, MODIFICATION, OR 
     49REDISTRIBUTION OF THIS SOFTWARE. 
     50""" 
     51 
    152import ConfigParser 
    253import datetime