diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-07-02 13:14:21 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-07-02 13:14:21 -0400 |
commit | d3d10c982c8a44c85a0114c491207297eac7611d (patch) | |
tree | bdfda394fb23cc8d65c0acb77ca070937d93580a /lib/sqlalchemy/engine/strategies.py | |
parent | 38c5e870a7883df0ae104df828217e326f6cff6a (diff) | |
download | sqlalchemy-d3d10c982c8a44c85a0114c491207297eac7611d.tar.gz |
- refactor pool a bit so that intent between ConnectionRecord/ConnectionFairy is clear;
make sure that the DBAPI connection passed to the reset-on-return events/dialect hooks
is also a "fairy", so that dictionaries like "info" are available. [ticket:2770]
- rework the execution_options system so that the dialect is given the job of making
any immediate adjustments based on a set event. move the "isolation level" logic to use
this new system. Also work things out so that even engine-level execution options
can be used for things like isolation level; the dialect attaches a connect-event
handler in this case to handle the task.
- to support this new system as well as further extensibiltiy of execution options
add events engine_connect(), set_connection_execution_options(), set_engine_execution_options()
Diffstat (limited to 'lib/sqlalchemy/engine/strategies.py')
-rw-r--r-- | lib/sqlalchemy/engine/strategies.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/sqlalchemy/engine/strategies.py b/lib/sqlalchemy/engine/strategies.py index c65986ca2..3ca91968b 100644 --- a/lib/sqlalchemy/engine/strategies.py +++ b/lib/sqlalchemy/engine/strategies.py @@ -150,13 +150,8 @@ class DefaultEngineStrategy(EngineStrategy): event.listen(pool, 'connect', on_connect) def first_connect(dbapi_connection, connection_record): - c = base.Connection(engine, connection=dbapi_connection) - - # TODO: removing this allows the on connect activities - # to generate events. tests currently assume these aren't - # sent. do we want users to get all the initial connect - # activities as events ? - c._has_events = False + c = base.Connection(engine, connection=dbapi_connection, + _has_events=False) dialect.initialize(c) event.listen(pool, 'first_connect', first_connect) |