Changeset 267 for elixir/trunk/elixir/__init__.py
- Timestamp:
- 11/14/07 10:57:14 (6 years ago)
- Files:
-
- 1 modified
-
elixir/trunk/elixir/__init__.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
elixir/trunk/elixir/__init__.py
r263 r267 3 3 4 4 A 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 6 the ability to create simple Python classes that map directly to relational 7 7 database tables (this pattern is often referred to as the Active Record design 8 pattern), providing many of the benefits of traditional databases 8 pattern), providing many of the benefits of traditional databases 9 9 without losing the convenience of Python objects. 10 10 11 Elixir is intended to replace the ActiveMapper SQLAlchemy extension, and the 11 Elixir is intended to replace the ActiveMapper SQLAlchemy extension, and the 12 12 TurboEntity 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 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 15 15 definitions. 16 16 ''' … … 92 92 entities = list() 93 93 94 94 95 def create_all(*args, **kwargs): 95 96 '''Create the necessary tables for all declared entities''' 96 97 for md in metadatas: 97 98 md.create_all(*args, **kwargs) 99 98 100 99 101 def drop_all(*args, **kwargs): … … 118 120 create_all(*args, **kwargs) 119 121 122 120 123 def cleanup_all(drop_tables=False, *args, **kwargs): 121 124 '''Clear all mappers, clear the session, and clear all metadatas.
