diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-07-12 22:03:48 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-07-12 22:03:48 +0000 |
commit | d115a8c94e5bdbc6675e0d8bb14269beedcdc9ae (patch) | |
tree | b3436548fdb176a282ad7f092efc4ba177160e45 /lib/sqlalchemy/ext/sqlsoup.py | |
parent | 91e511cce53792f6348a5b471e84c67dea15eb9a (diff) | |
download | sqlalchemy-d115a8c94e5bdbc6675e0d8bb14269beedcdc9ae.tar.gz |
- the various "engine" arguments, such as "engine", "connectable",
"engine_or_url", "bind_to", etc. are all present, but deprecated.
they all get replaced by the single term "bind". you also
set the "bind" of MetaData using
metadata.bind = <engine or connection>. this is part of 0.4
forwards compatibility where "bind" is the only keyword.
[ticket:631]
Diffstat (limited to 'lib/sqlalchemy/ext/sqlsoup.py')
-rw-r--r-- | lib/sqlalchemy/ext/sqlsoup.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/sqlalchemy/ext/sqlsoup.py b/lib/sqlalchemy/ext/sqlsoup.py index c320724ac..04e5b49f7 100644 --- a/lib/sqlalchemy/ext/sqlsoup.py +++ b/lib/sqlalchemy/ext/sqlsoup.py @@ -266,7 +266,7 @@ directly. The engine's ``execute`` method corresponds to the one of a DBAPI cursor, and returns a ``ResultProxy`` that has ``fetch`` methods you would also see on a cursor:: - >>> rp = db.engine.execute('select name, email from users order by name') + >>> rp = db.bind.execute('select name, email from users order by name') >>> for name, email in rp.fetchall(): print name, email Bhargan Basepair basepair+nospam@example.edu Joe Student student@example.edu @@ -496,9 +496,10 @@ class SqlSoup: self.schema = None def engine(self): - return self._metadata._engine + return self._metadata.bind engine = property(engine) + bind = engine def delete(self, *args, **kwargs): objectstore.delete(*args, **kwargs) |