diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2008-12-08 20:49:12 +0000 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2008-12-08 20:49:12 +0000 |
| commit | 3e2d6a9a18b318466c1de0a1b61baac579cb1690 (patch) | |
| tree | 170b3234d84bcb1c5795c6459a81d71a9093eb0a /lib/sqlalchemy/ext/declarative.py | |
| parent | 082d5db64f85828f219b6c4321208f1b093a02ce (diff) | |
| download | sqlalchemy-3e2d6a9a18b318466c1de0a1b61baac579cb1690.tar.gz | |
fix typos
Diffstat (limited to 'lib/sqlalchemy/ext/declarative.py')
| -rw-r--r-- | lib/sqlalchemy/ext/declarative.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/sqlalchemy/ext/declarative.py b/lib/sqlalchemy/ext/declarative.py index 50f8f24e6..a2bd517e4 100644 --- a/lib/sqlalchemy/ext/declarative.py +++ b/lib/sqlalchemy/ext/declarative.py @@ -68,12 +68,12 @@ defined ``Table`` objects are collected. This is accessed via the Base.metadata.create_all(engine) The ``Engine`` created above may also be directly associated with the -declarative base class using the ``engine`` keyword argument, where it will be +declarative base class using the ``bind`` keyword argument, where it will be associated with the underlying ``MetaData`` object and allow SQL operations involving that metadata and its tables to make use of that engine automatically:: - Base = declarative_base(engine=create_engine('sqlite://')) + Base = declarative_base(bind=create_engine('sqlite://')) Or, as ``MetaData`` allows, at any time using the ``bind`` attribute:: @@ -112,7 +112,7 @@ defined once the mapper configuration is used:: Column constructs, since they are just that, are immediately usable, as below where we define a primary join condition on the ``Address`` class using them:: - class Address(Base) + class Address(Base): __tablename__ = 'addresses' id = Column(Integer, primary_key=True) |
