summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/pool.py
Commit message (Collapse)AuthorAgeFilesLines
* - NullPool supports reconnect on failure behavior.Mike Bayer2008-12-271-0/+12
| | | | [ticket:1094]
* back-merged current 0.4 trunk into rel_0_4 branch, which will become the 0.4 ↵Mike Bayer2008-05-091-192/+278
| | | | maintenance branch
* _ConnectionRecord gains a .properties collection, with contents scoped toJason Kirtland2007-07-231-0/+20
| | | | the lifetime of the underlying DBAPI connection. Accessors on Connections and fairies.
* merged most recent overflow mutex tweakMike Bayer2007-07-201-2/+6
|
* merged pool fix from [changeset:2989] and timeout fix from [changeset:2990]Mike Bayer2007-07-201-2/+9
|
* Remove unused imports, typo and light formatting tweaks.Jason Kirtland2007-07-191-1/+1
| | | | Fixed comparison of _UnaryExpressions
* merged pool tweak from r2823Mike Bayer2007-06-301-7/+12
|
* - merged some tweaks to the pool overflow sync from trunk r2819Mike Bayer2007-06-301-9/+6
| | | | | - merged vertical.py delete tests from trunk r2820, fixed collection to new style collection
* - Eh, dummy_threading trick didn't actually work for no-op'ing overflow.Jason Kirtland2007-06-161-7/+11
| | | | | Works now, but less readable. - Shaped the script from ticket #608 into a test case
* - Put a mutex around the QueuePool's overflow handlingsJason Kirtland2007-06-161-5/+14
|
* merged StaticPool implementationMike Bayer2007-06-091-0/+25
|
* propigated detach() and invalidate() methods to Connection.Mike Bayer2007-05-101-0/+13
|
* - Connections can be detached from their pool, closing on dereference ↵Jason Kirtland2007-05-091-1/+11
| | | | instead of returning to the pool for reuse
* added "recreate()" argument to connection pool classesMike Bayer2007-04-171-5/+30
| | | | | | | this method is called when the invalidate() occurs for a disconnect condition, so that the entire pool is recreated, thereby avoiding repeat errors on remaining connections in the pool. dispose() called as well (also fixed up) but cant guarantee all connections closed.
* for #516, moved the "disconnect check" step out of pool and back into ↵Mike Bayer2007-04-031-21/+1
| | | | | | base.py. dialects have is_disconnect() method now. simpler design which also puts control of the ultimate "execute" call back into the hands of the dialects.
* - merged the patch from #516 + fixesMike Bayer2007-04-021-21/+47
| | | | | | | | - improves the framework for auto-invalidation of connections that have lost their underlying database - the error catching/invalidate step is totally moved to the connection pool. - added better condition checking for do_rollback() and do_commit() including SQLError excepetion wrapping
* - merged the "execcontext" branch, refactors engine/dialect codepathsMike Bayer2007-04-021-4/+10
| | | | | | | | | | | | | | | | | | | | - much more functionality moved into ExecutionContext, which impacted the API used by dialects to some degree - ResultProxy and subclasses now designed sanely - merged patch for #522, Unicode subclasses String directly, MSNVarchar implements for MS-SQL, removed MSUnicode. - String moves its "VARCHAR"/"TEXT" switchy thing into "get_search_list()" function, which VARCHAR and CHAR can override to not return TEXT in any case (didnt do the latter yet) - implements server side cursors for postgres, unit tests, #514 - includes overhaul of dbapi import strategy #480, all dbapi importing happens in dialect method "dbapi()", is only called inside of create_engine() for default and threadlocal strategies. Dialect subclasses have a datamember "dbapi" referencing the loaded module which may be None. - added "mock" engine strategy, doesnt require DBAPI module and gives you a "Connecition" which just sends all executes to a callable. can be used to create string output of create_all()/drop_all().
* thank you, SVN, for being completely idiotic and non-intutive. rolling back ↵Mike Bayer2007-03-301-7/+2
| | | | incorrect checkin to trunk
* current progress with exec branchMike Bayer2007-03-291-2/+7
|
* migrated (most) docstrings to pep-257 format, docstring generator using ↵Mike Bayer2007-02-251-138/+226
| | | | | | straight <pre> + trim() func for now. applies most of [ticket:214], compliemnts of Lele Gaifax
* r/m unused importJonathan Ellis2007-01-251-1/+1
|
* copyright updateMike Bayer2007-01-051-1/+1
|
* - fixed QueuePool bug whereby its better able to reconnect to a databaseMike Bayer2006-12-131-1/+5
| | | | that was not reachable, also fixed dispose() method
* cursors needs to be weak keyMike Bayer2006-12-081-1/+1
|
* - fix to connection pool _close() to properly clean up, fixesMike Bayer2006-12-081-14/+16
| | | | MySQL synchronization errors [ticket:387]
* - MySQL detects errors 2006 (server has gone away) and 2014Mike Bayer2006-12-081-4/+7
| | | | (commands out of sync) and invalidates the connection on which it occured.
* converted imports to absoluteMike Bayer2006-10-261-1/+1
|
* oops, removed pool debugging codeMike Bayer2006-10-241-7/+0
|
* - SingletonConnectionPool must use the "threadlocal" pooling behaviorMike Bayer2006-10-241-0/+8
| | | | | | - the "delete" cascade will load in all child objects, if they were not loaded already. this can be turned off (i.e. the old behavior) by setting passive_deletes=True on a relation().
* - some new Pool utility classes, updated docsMike Bayer2006-10-241-38/+129
| | | | - "use_threadlocal" on Pool defaults to False (same as create_engine)
* log connection closesMike Bayer2006-10-241-0/+1
|
* improved exceptions for closed connectionsMike Bayer2006-10-071-1/+3
|
* - pool will auto-close open cursors, or can be configured to raise an error ↵Mike Bayer2006-09-281-3/+11
| | | | | | | | instead - consolidated scalar() calls into ResultProxy scalar(), fixed ResultProxy scalar() to apply typing rules - general de-cruftification of ClauseElement/Compiled (yes i know theres crufty things everywhere)
* commented out open cursor check, until resolution of [ticket:312]Mike Bayer2006-09-261-2/+2
|
* - logging is now implemented via standard python "logging" module.Mike Bayer2006-09-241-10/+8
| | | | | | | | | | | | | "echo" keyword parameters are still functional but set/unset log levels for their respective classes/instances. all logging can be controlled directly through the Python API by setting INFO and DEBUG levels for loggers in the "sqlalchemy" namespace. class-level logging is under "sqlalchemy.<module>.<classname>", instance-level logging under "sqlalchemy.<module>.<classname>.<hexid>". Test suite includes "--log-info" and "--log-debug" arguments which work independently of --verbose/--quiet. Logging added to orm to allow tracking of mapper configurations, row iteration fixes [ticket:229] [ticket:79]
* - connection pool tracks open cursors and raises an error if connectionMike Bayer2006-09-231-0/+12
| | | | | is returned to pool with cursors still opened. fixes issues with MySQL, others
* removed auto-dispose on __del__, produces too much garbage exceptiongsMike Bayer2006-09-101-1/+3
|
* - changed "invalidate" semantics with pooled connection; willMike Bayer2006-08-261-37/+29
| | | | | | | | | instruct the underlying connection record to reconnect the next time its called. "invalidate" will also automatically be called if any error is thrown in the underlying call to connection.cursor(). this will hopefully allow the connection pool to reconnect to a database that had been stopped and started without restarting the connecting application [ticket:121]
* - cleanup on connection methods + documentation. custom DBAPIMike Bayer2006-08-251-52/+83
| | | | | | | | | | arguments specified in query string, 'connect_args' argument to 'create_engine', or custom creation function via 'creator' function to 'create_engine'. - added "recycle" argument to Pool, is "pool_recycle" on create_engine, defaults to 3600 seconds; connections after this age will be closed and replaced with a new one, to handle db's that automatically close stale connections [ticket:274]
* fixes for threadless python compilesJonathan Ellis2006-08-151-1/+1
|
* fix mysql borkageJonathan Ellis2006-08-101-1/+5
|
* improvement over previous changeset:Mike Bayer2006-08-051-2/+14
| | | | | | SingletonThreadPool has a size and does a cleanup pass, so that only a given number of thread-local connections stay around (needed for sqlite applications that dispose of threads en masse)
* temporary workaround dispose_local() added to SingletonThreadPoolMike Bayer2006-08-051-1/+7
| | | | for sqlite applications that dispose of threads en masse
* adjustments to pool stemming from changes made for [ticket:224].Mike Bayer2006-08-041-8/+9
| | | | | overflow counter should only be decremented if the connection actually succeeded. added a test script to attempt testing this.
* added workaround for funny pragma behavior on windows pysqliteMike Bayer2006-07-091-3/+14
| | | | | singletonthreadpool has a dispose() method, used by proxy_engine test to better clean up after itself on windows
* fixes to pool_invalidate [ticket:224]rel_0_2_4Mike Bayer2006-06-271-7/+9
|
* cursor() method on ConnectionFairy allows db-specific extensionMike Bayer2006-06-261-2/+2
| | | | arguments to be propigated [ticket:221]
* migrated Queue.Queue to its own module here, to assure RLock compatibilityMike Bayer2006-06-261-12/+3
|
* fix to timeoutMike Bayer2006-06-261-1/+1
|
* attempting to fix reentrant condition that can happen with Queue.QueueMike Bayer2006-06-261-0/+11
|