| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Found using: https://github.com/intgr/topy
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
number of tests.
- move out logging tests from test_execute to test_logging
|
|
|
|
|
|
|
| |
implementation allows an event handler to redefine the specific mechanics
by which an arbitrary dialect invokes execute() or executemany() on a
DBAPI cursor. The new events, at this point semi-public and experimental,
are in support of some upcoming transaction-related extensions.
|
|
|
|
|
|
|
|
|
|
| |
after one or more :class:`.Connection` objects have been created
(such as by an orm :class:`.Session` or via explicit connect)
and the listener will pick up events from those connections.
Previously, performance concerns pushed the event transfer from
:class:`.Engine` to :class:`.Connection` at init-time only, but
we've inlined a bunch of conditional checks to make this possible
without any additional function calls. fixes #2978
|
| |
|
|
|
|
|
|
|
|
| |
within userland engine.dispose(); as some SQLA tests already failed when the replace step
was removed, due to those conns still being referenced, it's likely this will
create surprises for all those users that incorrectly use dispose()
and it's not really worth dealing with. This doesn't affect the change
we made for ref: #2985.
|
|
|
|
|
|
|
|
|
|
|
|
| |
emitted for the "_cursor_execute()" method of :class:`.Connection`;
this is the "quick" executor that is used for things like
when a sequence is executed ahead of an INSERT statement, as well as
for dialect startup checks like unicode returns, charset, etc.
the :meth:`.ConnectionEvents.before_cursor_execute` event was already
invoked here. The "executemany" flag is now always set to False
here, as this event always corresponds to a single execution.
Previously the flag could be True if we were acting on behalf of
an executemany INSERT statement.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
type such as "charset" and "collation". While MySQL wants all character-
based CAST calls to use the CHAR type, we now create a real CHAR
object at CAST time and copy over all the parameters it has, so that
an expression like ``cast(x, mysql.TEXT(charset='utf8'))`` will
render ``CAST(t.col AS CHAR CHARACTER SET utf8)``.
- Added new "unicode returns" detection to the MySQL dialect and
to the default dialect system overall, such that any dialect
can add extra "tests" to the on-first-connect "does this DBAPI
return unicode directly?" detection. In this case, we are
adding a check specifically against the "utf8" encoding with
an explicit "utf8_bin" collation type (after checking that
this collation is available) to test for some buggy unicode
behavior observed with MySQLdb version 1.2.3. While MySQLdb
has resolved this issue as of 1.2.4, the check here should
guard against regressions. The change also allows the "unicode"
checks to log in the engine logs, which was not previously
the case. [ticket:2906]
|
|
|
|
| |
except for the changelog part
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
when a pre-DBAPI :class:`.StatementError` were raised within
:meth:`.Connection.execute`, causing encoding errors for
non-ASCII statements. The stringification now remains within
Python unicode thus avoiding encoding errors. [ticket:2871]
|
|
|
|
|
|
| |
https://bitbucket.org/zzzeek/sqlalchemy_informixdb
- remove informix, maxdb, access symbols from tests etc.
|
| |
|
|
|
|
|
| |
- modernize test for that
- use py3k compatible next() in test_returning/test_versioning
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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()
|
|
|
|
|
|
|
|
|
|
|
|
| |
actual mock objects from the mock library. I'd like to use mock
for new tests so we might as well use it in obvious places.
- use unittest.mock in py3.3
- changelog
- add a note to README.unittests
- add tests_require in setup.py
- have tests import from sqlalchemy.testing.mock
- apply usage of mock to one of the event tests. we can be using
this approach all over the place.
|
| |
|
| |
|
|
|
|
| |
- went through examples/ and cleaned out excess list() calls
|
|\
| |
| |
| | |
cymysql support
|
| | |
|
|\ \
| |/
|/|
| |
| | |
working on some linux platforms. Also in 0.7.11.
- only need "logging.handlers" here, "logging" comes in implicitly
|
|/
|
|
| |
See also: https://bugs.gentoo.org/show_bug.cgi?id=458684
|
|
|
|
|
|
|
|
|
|
|
| |
to :class:`.Engine`. This method works similarly to
:class:`.Connection.execution_options` in that it creates
a copy of the parent object which will refer to the new
set of options. The method can be used to build
sharding schemes where each engine shares the same
underlying pool of connections. The method
has been tested against the horizontal shard
recipe in the ORM as well.
|
|
|
|
|
|
|
| |
become an externally usable package but still remains within the main sqlalchemy parent package.
in this system, we use kind of an ugly hack to get the noseplugin imported outside of the
"sqlalchemy" package, while still making it available within sqlalchemy for usage by
third party libraries.
|
|
|
|
|
|
|
|
|
|
|
|
| |
- add some failure cases
- [bug] Firebird now uses strict "ansi bind rules"
so that bound parameters don't render in the
columns clause of a statement - they render
literally instead.
- [bug] Support for passing datetime as date when
using the DateTime type with Firebird; other
dialects support this.
|
| |
|
|
|
|
|
|
| |
- enhancements to test suite including ability to set up a testing engine
for a whole test class, fixes to how noseplugin sets up/tears
down per-class context
|
| |
|
|
|
|
|
|
| |
dont have a good
testing decorator to check this
|
|
|
|
|
|
|
|
|
|
| |
True by default, if not passed explicitly,
on bindparam() if the "value" or "callable"
parameters are not passed.
This will cause statement execution to check
for the parameter being present in the final
collection of bound parameters, rather than
implicitly assigning None. [ticket:2556]
|
| |
|
|
|
|
|
|
|
|
|
| |
fires off for so-called "_cursor_execute"
events, which are usually special-case
executions of primary-key bound sequences
and default-generation SQL
phrases that invoke separately when RETURNING
is not used with INSERT. [ticket:2459]
|
|
|
|
|
| |
- repair test_processors which wasn't hitting the python functions
- add another suite to test_processors that does distill_params
|
|
|
|
| |
- remove deprecated 0.7 engine methods
|
|
|
|
|
|
| |
now be associated with individual
Connection objects, not just Engine
objects. [ticket:2511]
|
|
|
|
|
|
|
|
|
|
|
|
| |
last_updated_params(), last_inserted_params(),
postfetch_cols(), prefetch_cols() all
assert that the given statement is a compiled
construct, and is an insert() or update()
statement as is appropriate, else
raise InvalidRequestError. [ticket:2498]
- ResultProxy.last_inserted_ids is removed,
replaced by inserted_primary_key.
|
|
|
|
|
|
|
|
| |
string positional parameters passed to
engine/connection execute() would fail to be
interpreted correctly, due to __iter__
being present on Py3K string.
[ticket:2503]. Also in 0.7.8.
|
|
|
|
|
|
| |
"with engine.begin()", the newly acquired
Connection is closed explicitly before
propagating the exception onward normally.
|
|
|
|
|
|
|
| |
dbapi_error(). Is called for all DBAPI-level
errors passing the original DBAPI exception
before SQLAlchemy modifies the state
of the cursor.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
option for connections. If no parameters
are present, will pass the statement
as cursor.execute(statement), thereby invoking
the DBAPIs behavior when no parameter collection
is present; for psycopg2 and mysql-python, this
means not interpreting % signs in the string.
This only occurs with this option, and not
just if the param list is blank, as otherwise
this would produce inconsistent behavior
of SQL expressions that normally escape percent
signs (and while compiling, can't know ahead of
time if parameters will be present in
some cases). [ticket:2407]
|
| |
|
|
|
|
|
|
| |
- add a test suite for all the Engine/Connection/TLEngine transaction/begin
helpers/context managers
- update docs
|