Commit Graph

360 Commits

Author SHA1 Message Date
Mike Bayer 6f16b8db6f - add connection and cursor to is_disconnect(). We aren't using it yet,
but we'd like to.   Most DBAPIs don't give us anything we can do with it.
Some research was done on psycopg2 and it still seems like they give us
no adequate method (tried connection.closed, cursor.closed, connection.status).
mxodbc claims their .closed attribute will work (but I am skeptical).
- remove beahvior in pool that auto-invalidated a connection when
the cursor failed to create.  That's not the pool's job.  we need the conn
for the error logic.  Can't get any tests to fail, curious why that
behavior was there, guess we'll find out (or not).
- add support for psycopg2 version detection.  even though we have
no use for it yet...
- adjust one of the reconnect tests to work with oracle's
horrendously slow connect speed
2011-02-09 15:06:32 -05:00
Mike Bayer 5baeabb0c4 - use proper directive here 2011-02-05 16:10:14 -05:00
Mike Bayer 637fdd3251 - apply optimizations to alternate row proxies, [ticket:1787]
- add check to fetchmany() for None, don't send argument if not present,
helps DBAPIs which don't accept "None" for default (ie. pysqlite, maybe others)
- add tests to test_execute to provide 100% coverage for the three alternate
result proxy classes
2011-02-04 18:33:49 -05:00
Mike Bayer 1515073b96 - New DBAPI support for pymysql, a pure Python port
of MySQL-python.  [ticket:1991]
2011-01-26 11:18:03 -05:00
Mike Bayer 9122268ed0 - new dialect for Drizzle [ticket:2003]
- move mysqldb to a connector, can be shared among mysql/drizzle
2011-01-26 10:44:00 -05:00
Mike Bayer 7325ba60bc - execution_options() on Connection accepts
"isolation_level" argument, sets transaction isolation
level for that connection only until returned to the
connection pool, for thsoe backends which support it
(SQLite, Postgresql) [ticket:2001]
- disallow the option on Engine (use isolation_level to create_engine()),
Executable (we don't want to check/set per statement)
- docs
2011-01-16 17:04:07 -05:00
Mike Bayer a233638268 - add dialect.reset_isolation_level(), reverts
- base not implemented methods on Dialect
2011-01-16 13:15:26 -05:00
Mike Bayer aa62a3a833 - factor consistent set_isolation_level(), get_isolation_level()
per-connection methods for sqlite, postgresql, psycopg2 dialects
- move isolation test suite to test engines/test_transaction
- preparing for [ticket:2001]
2011-01-16 13:05:18 -05:00
Mike Bayer 4e9e0f041c - merge r43460573c27a:4993c7eae8e5d117ff342bdc59f3b0635b898e2c of 0.6 branch 2011-01-08 16:14:47 -05:00
Mike Bayer 350aed3fdb - whitespace removal bonanza 2011-01-02 14:23:42 -05:00
Mike Bayer 426c4356eb - removes the "on_" prefix. 2010-12-30 14:22:43 -05:00
Mike Bayer 7f7bccfc83 - they don't want "on_". First step, change the naming convention on Events
so that non-events are just _name.
2010-12-30 13:43:39 -05:00
Mike Bayer dff4e0591e - apply pep8 to compiler.py
- deprecate Compiled.compile() - have __init__ do compilation
if statement is present.
2010-12-21 16:34:00 -05:00
Mike Bayer 6e4515948f - further fixes to no trans in progress, no trans ever for TLEngine, [ticket:1998] 2010-12-09 10:04:23 -05:00
Mike Bayer 8df4dc4385 - 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]
2010-12-08 13:46:29 -05:00
Mike Bayer 987828194e oracle fixes 2010-12-06 17:05:32 -05:00
Mike Bayer d30678d18d new calling style: event.listen(target, identifier, fn) 2010-12-01 14:10:11 -05:00
Mike Bayer 71083b6977 combine test/engine/test_metadata.py and test/sql/test_columns.py into new
test/sql/test_metadata.py, [ticket:1970]
2010-11-28 15:34:41 -05:00
Mike Bayer 58b2939433 - sqlalchemy.test and nose plugin moves back to being entirely
outside of "sqlalchemy" and under "test/".

Rationale:

- coverage plugin works without issue, without need for an awkward
additional package install
- command line for "nosetests" isn't polluted with SQLAlchemy options

[ticket:1949]
2010-11-28 14:19:44 -05:00
Mike Bayer 134d78c8b4 - post_process_text() is called for DDL() constructs, in particular allowing
'%' with only one level of escaping.  Note this is backwards-incompatible
with previously triple-escaped sections.  [ticket:1897]
2010-11-28 11:52:24 -05:00
Mike Bayer 45cdb17ef0 - fixes for PG, mysql, twophase
- added "pool_events" arg to create_engine(), "events" to pool, allowing
establishment of listeners which fire before those of the dialect
2010-11-20 17:57:30 -05:00
Mike Bayer ca2d85540f - logging has been overhauled such that engines no longer need to encode the
"hex id" string in their logging name in order to maintain separate loggers
per engine. thanks to Vinay Sajip for assistance.  merge of [ticket:1926]
2010-11-20 16:28:39 -05:00
Mike Bayer e3ca3a773f - merge FromObj cleanup, immutable .c attribute patch, [ticket:1917] 2010-11-20 15:35:43 -05:00
Mike Bayer e187cc538d - merge metadata/schema/declarative branch, [ticket:1893] 2010-11-20 15:30:12 -05:00
Mike Bayer 98674959d2 - initial patch for [ticket:1926] 2010-11-17 17:54:52 -05:00
Mike Bayer 041a329e69 - adapt initial patch from [ticket:1917] to current tip
- raise TypeError for immutability
2010-11-16 15:53:14 -05:00
Mike Bayer e1402efb19 - move sqlalchemy.test to test.lib 2010-11-15 19:37:50 -05:00
Mike Bayer 166a8a0b73 [ticket:1893] implementation 2010-11-15 19:05:48 -05:00
Mike Bayer e85871c612 merge tip 2010-11-14 17:53:57 -05:00
Mike Bayer 4ac3240679 - SessionEvents is on board and the event model is done, can start building 0.7 tip soon 2010-11-14 17:51:54 -05:00
Mike Bayer 7513b46730 - pool event tests that don't depend on deprecated listener system,
attempting "test just one thing" style
- reorganize fixtures to come primarily from the base test class
2010-11-14 13:59:03 -05:00
Mike Bayer 588f7402c5 - The 'info' attribute of Column is copied during
Column.copy(), i.e. as occurs when using columns
in declarative mixins.  [ticket:1967]
2010-11-14 12:42:34 -05:00
Mike Bayer 6d630990dd merge tip 2010-11-13 15:53:32 -05:00
Mike Bayer 3564ea86e7 - move deprecated interfaces down to bottom of TOC, update verbiage
- more docs for engine, pool, DDL events
- update DDL sequences documentation to use events
- update DDL() docstring to refer to execute_if()
- document parameters for DDLElement.execute_if()
- add retval=True flag to Engine.on_before_execute(), on_before_cursor_execute().
wrap the function if retval=False, check for appropriate usage of the flag, add
tests.
- remove ScopedSession.mapper and tests entirely
- remove ExtensionCarrier and tests
- change remaining tests that use MapperExtension to use MapperEvents
2010-11-10 19:00:28 -05:00
Mike Bayer a9b270a3ed - basic docs
- poolevent accepts Engine as a target
2010-11-09 17:35:24 -05:00
Mike Bayer e1a30715d2 - and fix everything from the last checkin that breaks on py 2.4, 2.5 2010-11-09 11:46:52 -05:00
Mike Bayer a41c50ad63 - Implemented sequence check capability for the C
version of RowProxy, as well as 2.7 style
"collections.Sequence" registration for RowProxy.
[ticket:1871]
2010-11-09 11:40:23 -05:00
Mike Bayer 4761b66cc1 ding 2010-11-07 12:54:54 -05:00
Mike Bayer 4e2c0f10cd - merge tip 2010-11-06 11:49:45 -04:00
Mike Bayer 35508a30d7 - engine_from_config() now accepts 'debug' for
'echo', 'echo_pool', 'force' for 'convert_unicode',
boolean values for 'use_native_unicode'.
[ticket:1899]
2010-10-15 11:43:59 -04:00
Mike Bayer 15442ed1f4 - added "views=True" option to metadata.reflect(),
will add the list of available views to those
being reflected.  [ticket:1936]
2010-10-02 18:05:19 -04:00
Mike Bayer 25c08f6def merge tip 2010-10-02 11:00:22 -04:00
Mike Bayer 761b4f29e2 - *Major* cleanup / modernization of the Informix
dialect for 0.6, courtesy Florian Apolloner.
[ticket:1906]
2010-10-01 21:26:05 -04:00
Mike Bayer 611fb77186 - use "key in dict" rather than KeyError if the usual case
is that the key is not present.
- don't need to uniquify Index schemes, just don't copy Indexes
that were known to be generated from the index=True flag
- user facing changes go in CHANGES
- Table.c allows string lookup
2010-09-18 11:40:25 -04:00
Chris Withers f08ea3c113 d.uh 2010-09-17 12:26:49 +01:00
Chris Withers 4bcb4c98f9 add warning about dodgy use of tometadata 2010-09-16 21:10:17 +01:00
Chris Withers 27cf184b50 tometadata now copies indexes as well 2010-09-16 20:58:15 +01:00
Chris Withers fd6c85cf7f make sure kwargs are copied by tometadata 2010-09-16 20:03:18 +01:00
Mike Bayer 3d389b19b7 - reorganization
- attrbutes.py splits into attribtes.py and instrumentation.py
- all the various Event subclasses go into events.py modules
- some ideas for orm events
- move *Extension out to deprecated_interfaces
2010-09-14 20:43:48 -04:00
Mike Bayer 33b70a1f02 merge from tip 2010-09-03 17:57:20 -04:00