Show
Ignore:
Timestamp:
11/14/07 10:57:14 (7 years ago)
Author:
ged
Message:
  • cleanup class attributes (in the attributes-based syntax) after the
    property is attached to its entity, so that SQLAlchemy is not confused.
    Only caused problem in the case of single inheritance and when omitting
    some values. See SA ticket #866.
  • some PEP8 fixes
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • elixir/trunk/elixir/__init__.py

    r263 r267  
    33 
    44A declarative layer on top of the `SQLAlchemy library 
    5 <http://www.sqlalchemy.org/>`_. It is a fairly thin wrapper, which provides  
    6 the ability to create simple Python classes that map directly to relational  
     5<http://www.sqlalchemy.org/>`_. It is a fairly thin wrapper, which provides 
     6the ability to create simple Python classes that map directly to relational 
    77database tables (this pattern is often referred to as the Active Record design 
    8 pattern), providing many of the benefits of traditional databases  
     8pattern), providing many of the benefits of traditional databases 
    99without losing the convenience of Python objects.  
    1010 
    11 Elixir is intended to replace the ActiveMapper SQLAlchemy extension, and the  
     11Elixir is intended to replace the ActiveMapper SQLAlchemy extension, and the 
    1212TurboEntity project but does not intend to replace SQLAlchemy's core features, 
    13 and instead focuses on providing a simpler syntax for defining model objects  
    14 when you do not need the full expressiveness of SQLAlchemy's manual mapper  
     13and instead focuses on providing a simpler syntax for defining model objects 
     14when you do not need the full expressiveness of SQLAlchemy's manual mapper 
    1515definitions. 
    1616''' 
     
    9292entities = list() 
    9393 
     94 
    9495def create_all(*args, **kwargs): 
    9596    '''Create the necessary tables for all declared entities''' 
    9697    for md in metadatas: 
    9798        md.create_all(*args, **kwargs) 
     99 
    98100 
    99101def drop_all(*args, **kwargs): 
     
    118120        create_all(*args, **kwargs) 
    119121 
     122 
    120123def cleanup_all(drop_tables=False, *args, **kwargs): 
    121124    '''Clear all mappers, clear the session, and clear all metadatas.