| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
take effect in all engine connection use cases, including
when user-custom connect routines are used via the
:paramref:`.create_engine.creator` parameter, as well as when
the :class:`.Connection` encounters a connection error on
revalidation.
fixes #3266
|
|
|
|
|
| |
that union() can be called, in the case of a dialect that uses
execution options inside of initialize() (e.g. oursql)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
:paramref:`.create_engine.execution_options` or
:meth:`.Engine.update_execution_options` are not passed to the
special :class:`.Connection` used to initialize the dialect
within the "first connect" event; dialects will usually
perform their own queries in this phase, and none of the
current available options should be applied here. In
particular, the "autocommit" option was causing an attempt to
autocommit within this initial connect which would fail with
an AttributeError due to the non-standard state of the
:class:`.Connection`.
fixes #3200
|
| |
|
|
|
|
| |
to get all flake8 passing
|
|
|
|
|
|
|
|
|
|
|
| |
- Fixed bug which would occur if a DBAPI exception
occurs when the engine first connects and does its initial checks,
and the exception is not a disconnect exception, yet the cursor
raises an error when we try to close it. In this case the real
exception would be quashed as we tried to log the cursor close
exception via the connection pool and failed, as we were trying
to access the pool's logger in a way that is inappropriate
in this very specific scenario. fixes #3063
|
|
|
|
|
| |
and :func:`.event.listens_for`. This is a convenience feature which
will wrap the given listener such that it is only invoked once.
|
| |
|
|
|
|
|
|
|
|
| |
we will be able to parse dialect-specific arguments from string
configuration dictionaries. Dialect classes can now provide their
own list of parameter types and string-conversion routines.
The feature is not yet used by the built-in dialects, however.
[ticket:2875]
|
|
|
|
|
|
|
|
|
|
|
|
| |
of dbapi.Error (such as ``TypeError``, ``NotImplementedError``, etc.)
will propagate the exception unchanged. Previously,
the error handling specific to the ``connect()`` routine would both
inappropriately run the exception through the dialect's
:meth:`.Dialect.is_disconnect` routine as well as wrap it in
a :class:`sqlalchemy.exc.DBAPIError`. It is now propagated unchanged
in the same way as occurs within the execute process. [ticket:2881]
- add tests for this in test_parseconnect, but also add tests in test_execute
to ensure the execute() behavior as well
|
|
|
|
|
|
| |
is recreated, due to a disconnect error. This fixes a particular
issue in the Oracle 8 dialect, but in general the dialect.initialize()
phase should only be once per dialect. Also in 0.8.3. [ticket:2776]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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()
|
| |
|
|
|
|
| |
- went through examples/ and cleaned out excess list() calls
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
MockConnection (i.e., that used with
strategy="mock") which acts as a pass through
for arguments.
|
|
|
|
|
|
|
|
| |
to create_engine, allows control over
"connection return" behavior. Also added
new arguments 'rollback', 'commit', None
to pool.reset_on_return to allow more control
over connection return activity. [ticket:2378]
|
|
|
|
|
|
| |
correct DDL visit method wasn't called, resulting
in "CREATE/DROP SEQUENCE" statements being
duplicated [ticket:2384]
|
| |
|
|
|
|
| |
- fix the test for separately installed pysqlite
|
|
|
|
|
|
|
|
|
|
|
|
| |
will forward the error to dialect.is_disconnect()
and set the "connection_invalidated" flag if
the dialect knows this to be a potentially
"retryable" condition. Only Oracle ORA-01033
implemented for now. [ticket:2201]
- Added ORA-01033 to disconnect codes, which
can be caught during a connection
event. [ticket:2201]
|
|
|
|
|
|
|
| |
Connection/Engine that were never well known
and are redundant: reflecttable(), create(),
drop(), text(), engine.func
- lots of docstrings in engine
|
|
|
|
|
|
|
|
| |
- simplify connection event model to be inline inside Connection, don't use ad-hoc
subclasses (technically would leak memory for the app that keeps creating engines
and adding events)
- not doing listen-per-connection yet. this is closer. overall things
are much simpler now (until we put listen-per-connection in...)
|
|
|
|
|
| |
- this test keeps throwing a TNS error on Oracle on the buildbot only, runs locally,
seems to be related to some scaling/memory type of issue on the bot
|
|
|
|
|
|
|
|
| |
call are now wrapped in sqlalchemy.exc.StatementError,
and the text of the SQL statement and repr() of params
is included. This makes it easier to identify statement
executions which fail before the DBAPI becomes
involved. [ticket:2015]
|
| |
|
|
|
|
|
| |
a consistent tag
- AUTHORS file
|
| |
|
| |
|
|
|
|
|
|
| |
based databases. :memory: databases will continue
to select SingletonThreadPool by default.
[ticket:1921]
|
|
|
|
|
| |
- added "pool_events" arg to create_engine(), "events" to pool, allowing
establishment of listeners which fire before those of the dialect
|
|
|
|
|
|
|
| |
and....doesn't work.
on_before_execute and on_after_execute really not appealing here. might have to just go back to
what it was the other day.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
def listen(target, args)
so here we provide a "wrapper" approach that allows this, and it is
basically pass-by-value. a pass-by-value event *may* support rewriting
some of the args in the dictionary.
the current
listen will become "listen_raw" since it saves about 100% overhead versus
the coercion to dict, and will be used internally, and will remain
pass-by-reference.
proxyconnection probably will rely upon the newer style of pass-by-value
for "rewrite the args" types of calls.
|
|
|
|
|
|
|
|
|
| |
with methods representing events. This is self-documenting via sphinx.
- implemented new model for pool, classmanager. Most events are
one or two args, so going back to allowing any kind of *arg, **kw
signature for events - this is simpler and improves performance,
though we don't get the "we can add new kw's anytime". perhaps
there's some other way to approach that.
|
|
|
|
|
|
|
|
| |
on_connect(). This method returns a callable which receives
the raw DBAPI connection after each one is created. The callable
is assembled into a first_connect/connect pool listener by the
connection strategy if non-None. Provides a simpler interface
for dialects.
|
|
|
|
|
|
|
| |
as well as "pool_logging_name" argument to create_engine() which
filters down to that of Pool. Issues the given string name
within the "name" field of logging messages instead of the default
hex identifier string. [ticket:1555]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
on all new connections, which allows all String/Text/etc.
types to skip the need to post-process bytestrings into
unicode (an expensive step due to its volume). Other
dialects which return unicode natively (pg8000, zxjdbc)
also skip unicode post-processing.
- String/Text/Unicode types now skip the unicode() check
on each result column value if the dialect has
detected the DBAPI as returning Python unicode objects
natively. This check is issued on first connect
using "SELECT CAST 'some text' AS VARCHAR(10)" or
equivalent, then checking if the returned object
is a Python unicode. This allows vast performance
increases for native-unicode DBAPIs, including
pysqlite/sqlite3, psycopg2, and pg8000.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Documentation has been converted to Sphinx.
In particular, the generated API documentation
has been constructed into a full blown
"API Reference" section which organizes
editorial documentation combined with
generated docstrings. Cross linking between
sections and API docs are vastly improved,
a javascript-powered search feature is
provided, and a full index of all
classes, functions and members is provided.
|
|
|
|
|
| |
Slightly backward incompatible: the .name is a read-only property.
The test suite was assigning .name = 'mock'; this no longer works.
|
| |
|
| |
|
|
|
|
| |
0.4 development continues at /sqlalchemy/branches/rel_0_4
|
| |
|
|
|
|
| |
- fixed create and drop methods on MockConnection
|
|
|
|
|
|
|
|
|
|
|
|
| |
- all executemany() style calls put all sequences and SQL defaults inline into a single SQL statement
and don't do any pre-execution
- regular Insert and Update objects can have inline=True, forcing all executions to be inlined.
- no last_inserted_ids(), lastrow_has_defaults() available with inline execution
- calculation of pre/post execute pushed into compiler; DefaultExecutionContext greatly simplified
- fixed postgres reflection of primary key columns with no sequence/default generator, sets autoincrement=False
- fixed postgres executemany() behavior regarding sequences present, not present, passivedefaults, etc.
- all tests pass for sqlite, mysql, postgres; oracle tests pass as well as they did previously including all
insert/update/default functionality
|
| |
|