Jason Kirtland [Sun, 19 Aug 2007 17:57:51 +0000 (17:57 +0000)]
- Connection.begin() no longer accepts nested=True, a possible source of confusion as two forms of nesting are supported. SAVEPOINT-style nesting logic is now contained soley in begin_nested().
- Docstring love for the engine package. More is needed.
Mike Bayer [Sat, 18 Aug 2007 21:37:48 +0000 (21:37 +0000)]
1. Module layout. sql.py and related move into a package called "sql".
2. compiler names changed to be less verbose, unused classes removed.
3. Methods on Dialect which return compilers, schema generators, identifier preparers
have changed to direct class references, typically on the Dialect class itself
or optionally as attributes on an individual Dialect instance if conditional behavior is needed.
This takes away the need for Dialect subclasses to know how to instantiate these
objects, and also reduces method overhead by one call for each one.
4. as a result of 3., some internal signatures have changed for things like compiler() (now statement_compiler()), preparer(), etc., mostly in that the dialect needs to be passed explicitly as the first argument (since they are just class references now). The compiler() method on Engine and Connection is now also named statement_compiler(), but as before does not take the dialect as an argument.
5. changed _process_row function on RowProxy to be a class reference, cuts out 50K method calls from insertspeed.py
Jason Kirtland [Sat, 18 Aug 2007 18:15:11 +0000 (18:15 +0000)]
- fixed prefixes= argument to select()
- mysql can now generate DISTINCT or ALL for queries, select(..., distinct='ALL')
- documented 'prefixes' arg to select()
- rearranged doc order for select args to mirror that of a generated statement
- went nutty and fixed wrapping and line length on most docstrings in sql.py
Mike Bayer [Fri, 17 Aug 2007 23:45:29 +0000 (23:45 +0000)]
- Added a "legacy" adapter to types, such that user-defined TypeEngine
and TypeDecorator classes which define convert_bind_param()/convert_result_value()
will continue to function. Also supports calling the super() version of
those methods.
Mike Bayer [Fri, 17 Aug 2007 21:20:49 +0000 (21:20 +0000)]
- added close() method to Transaction. closes out a transaction using rollback
if it's the outermost transaction, otherwise just ends without affecting
the outer transaction.
- transactional and non-transactional Session integrates better with bound
connection; a close() will ensure that connection transactional state is
the same as that which existed on it before being bound to the Session.
Mike Bayer [Fri, 17 Aug 2007 17:59:08 +0000 (17:59 +0000)]
- added extra argument con_proxy to ConnectionListener interface checkout/checkin methods
- changed testing connection closer to work on _ConnectionFairy instances, resulting in
pool checkins, not actual closes
- disabled session two phase test for now, needs work
- added some two-phase support to TLEngine, not tested
- TLTransaction is now a wrapper
Mike Bayer [Thu, 16 Aug 2007 22:15:15 +0000 (22:15 +0000)]
- moved test/orm/fixtures.py to testlib
- flattened mapper calls in _instance() to operate directly
through a default MapperExtension
- more tests for ScopedSession, fixed [ticket:746]
- threadlocal engine propagates **kwargs through begin()
Mike Bayer [Wed, 15 Aug 2007 16:48:57 +0000 (16:48 +0000)]
- moved unicode schema ORM tests to unitofwork.py tests. mostly
is to test mappers so limited DB support (really hard to get these unicode schemas
to work...)
- fixed [ticket:739]
Mike Bayer [Tue, 14 Aug 2007 21:53:32 +0000 (21:53 +0000)]
- merged "fasttypes" branch. this branch changes the signature
of convert_bind_param() and convert_result_value() to callable-returning
bind_processor() and result_processor() methods. if no callable is
returned, no pre/post processing function is called.
- hooks added throughout base/sql/defaults to optimize the calling
of bind param/result processors so that method call overhead is minimized.
special cases added for executemany() scenarios such that unneeded "last row id"
logic doesn't kick in, parameters aren't excessively traversed.
- new performance tests show a combined mass-insert/mass-select test as having 68%
fewer function calls than the same test run against 0.3.
- general performance improvement of result set iteration is around 10-20%.
Mike Bayer [Tue, 14 Aug 2007 03:19:46 +0000 (03:19 +0000)]
- base_mapper() becomes a plain attribute
- session.execute() and scalar() can search for a Table with which to bind
from using the given ClauseElement
- session automatically extrapolates tables from mappers with binds,
also uses base_mapper so that inheritance hierarchies bind automatically
- moved ClauseVisitor traversal back to inlined non-recursive
Mike Bayer [Mon, 13 Aug 2007 20:14:04 +0000 (20:14 +0000)]
- a rudimental SessionExtension class has been added, allowing user-defined
functionality to take place at flush(), commit(), and rollback() boundaries.
Mike Bayer [Mon, 13 Aug 2007 20:00:38 +0000 (20:00 +0000)]
- generalized a SQLCompileTest out of select.py, installed
into dialect/mssql.py, dialect/oracle.py, sql/generative.py
- fixed oracle issues [ticket:732], [ticket:733], [ticket:734]
Mike Bayer [Sun, 12 Aug 2007 21:36:33 +0000 (21:36 +0000)]
- fixed compiler bug in mssql
- marked as unsupported for mssql all two-phase and nested transcation tests
- marked as unsupported for mssql various transactional/session tests which require two connections looking at uncommitted/external data at the same time (ms-sql cant handle it)
- put better explicit closeout step in unitofwork.py tests to appease ms-sqls hard locking
Jason Kirtland [Sat, 11 Aug 2007 23:15:32 +0000 (23:15 +0000)]
Added an exception hierarchy shadowing DB-API exc types
No more generic SQLErrors wrappers- the shadow type matching the DB-API error is raised. [ticket:706]
SQLError is now (also) DBAPIError.
DBAPIError and subtype constructors will refuse to wrap a SystemExit or KeyboardInterrupt, returningthe original interrupt exception instead of a new instance. [ticket:689]
Added a passthroughs for SE/KI exceptions in a couple except-and-discard situations
Mike Bayer [Sat, 11 Aug 2007 16:04:38 +0000 (16:04 +0000)]
- removed _calculate_correlations() methods, removed correlation_stack, select_stack;
all are merged into a single stack thats all within ansicompiler. clause visiting cut down
significantly.
Mike Bayer [Sat, 11 Aug 2007 14:03:23 +0000 (14:03 +0000)]
- case_sensitive=(True|False) setting removed from schema items, since
checking this state added a lot of method call overhead and there was
no decent reason to ever set it to False. Table and column names which are
all lower case will be treated as case-insenstive (yes we adjust for
Oracle's UPPERCASE style too).
Jason Kirtland [Sat, 11 Aug 2007 01:03:37 +0000 (01:03 +0000)]
by popular demand, mysql reflection is now a single round-trip and uses a parse of SHOW CREATE TABLE ddl [ticket:612]
the ANSI_QUOTES mode is now supported
halfway there for auto_increment on secondary columns [ticket:649]
indexes are now reflected [ticket:663]