Mike Bayer [Sat, 18 Dec 2010 17:14:23 +0000 (12:14 -0500)]
- some good inlinings to the whole cascade_iterator() thing.
cascade_iterator() should probably not yield the "instance" at all
and only deal in states. 30-40K methods taken off the orm2010 test.
Mike Bayer [Sat, 18 Dec 2010 00:27:01 +0000 (19:27 -0500)]
this innocuous change allows sqlite to work with pypy. sadly, pypy is twice as slow
even if i run the same test script four or five times to prime the jit.
Mike Bayer [Fri, 17 Dec 2010 02:08:26 +0000 (21:08 -0500)]
- remove the need to use LoadDeferredColumns, LoadLazyAttribute in most cases,
these are back to being part of LoaderStrategy
- simplify attribute.get()
- inline the dict get inside of attribute.__get__()
- revert some memoized attrs from InstanceState which are called in almost
all cases regardless
- inlining
Mike Bayer [Thu, 16 Dec 2010 22:52:43 +0000 (17:52 -0500)]
- MSSQL - the String/Unicode types, and their counterparts VARCHAR/
NVARCHAR, emit "max" as the length when no length is
specified. This makes it more compatible with Postgresql's
VARCHAR type which is similarly unbounded when no length
specified.
Mike Bayer [Wed, 15 Dec 2010 17:44:37 +0000 (12:44 -0500)]
- an approach I like better, remove most adapt() methods and use a generic
copier
- mssql reflection fix, but this will come in again from the tip merge
Mike Bayer [Mon, 13 Dec 2010 05:15:32 +0000 (00:15 -0500)]
- why type.dialect_impl(dialect).bind_processor(dialect), caching just the impl?
just call type._cached_bind_processor(dialect), cache the impl *and* the processor function.
same for result sets.
- use plain dict + update for defaultexecutioncontext.execution_options
Mike Bayer [Sun, 12 Dec 2010 06:35:37 +0000 (01:35 -0500)]
- refactor query._get() into two methods - a static one that does
just the identity map lookup + expired check, the other
which does the load unconditionally. All the refresh/deferred load
calls use the unconditional load method, query.get() and
LoadLazyAttribute call the identity check by itself first. m2o
lazyloads for object already in the identity map callcounts are
now cut in half, since no Query object is created.
Mike Bayer [Sat, 11 Dec 2010 22:44:46 +0000 (17:44 -0500)]
- support for cdecimal
- add --with-cdecimal flag to tests, monkeypatches cdecimal in
- fix mssql/pyodbc.py to not use private '_int' accessor in decimal conversion
routines
- pyodbc version 2.1.8 is needed for cdecimal in any case as
previous versions also called '_int', 2.1.8 adds the same string
logic as our own dialect, so that logic is skipped for modern
pyodbc version
- make the imports for "Decimal" consistent across the whole lib. not sure
yet how we should be importing "Decimal" or what the best way forward
is that would allow a clean user-invoked swap of cdecimal; for now,
added docs suggesting a global monkeypatch - the two decimal libs
are not compatible with each other so any chance of mixing produces
serious issues. adding adapters to DBAPIs tedious and adds in-python
overhead. suggestions welcome on how we should be doing
Decimal/cdecimal.
Mike Bayer [Sat, 11 Dec 2010 08:05:03 +0000 (03:05 -0500)]
- clean up the batch insert thing
- add a test for batch inserts
- don't need elaborate _inserted_primary_key thing
- take some cruft out of ExecutionContext, ResultProxy,
EC members can be non-underscored, have mapper just call the
EC members for now.
- simplify "connection_callable", no need for a "flush_opts"
dictionary since this point of expansion is not needed
Mike Bayer [Wed, 8 Dec 2010 18:46:29 +0000 (13:46 -0500)]
- Threadlocal engine methods rollback(), commit(),
prepare() won't raise if no transaction is in progress;
this was a regression introduced in 0.6. [ticket:1998]
Mike Bayer [Mon, 6 Dec 2010 23:45:19 +0000 (18:45 -0500)]
- hardwire the huge LIMIT number on MySQL. this might fix the OurSQL py3k
bug we're having, though I'm not able to get a good run of OurSQL
on OSX right now either Python 2 or 3.
Mike Bayer [Sun, 5 Dec 2010 06:41:37 +0000 (01:41 -0500)]
- inline the various construction methods of DefaultExecutionContext. This
makes it sort of easier to read, sort of harder, depending on where you look.
Cuts down two or three method calls on execute.
Mike Bayer [Sun, 5 Dec 2010 05:46:11 +0000 (00:46 -0500)]
- ResultProxy and friends always reference the DBAPI connection at the same time
as the cursor. There is no reason for CursorFairy - the only use case would be,
end-user is using the pool or pool.manage with DBAPI connections, uses a cursor,
deferences the owning connection and continues using cursor. This is an almost
nonexistent use case and isn't correct usage at a DBAPI level. Take out CursorFairy.
- move the "check for a dot in the colname" logic out to the sqlite dialect.
Mike Bayer [Mon, 29 Nov 2010 23:38:44 +0000 (18:38 -0500)]
- use class name by itself in flush warnings to prevent overflow of warnings registry
- test suite swaps out warnings.warn with warnings.warn_explicit, to solve warnings registry issue
- explicitly disallow functions from inside test.bootstrap, test.lib being interpreted as tests