Commit Graph

42 Commits

Author SHA1 Message Date
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 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 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 98674959d2 - initial patch for [ticket:1926] 2010-11-17 17:54:52 -05:00
Mike Bayer e1402efb19 - move sqlalchemy.test to test.lib 2010-11-15 19:37:50 -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 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 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 1149197a36 - moved out to on_before_execute, on_after_execute. not much option here,
need both forms, the wrapping thing is just silly
- fixed the listen() to not re-wrap continuously.
2010-08-29 11:22:46 -04:00
Mike Bayer a635750213 going back to the simple way, plus trying to make the engine thing simpler, and....doesn't work.
on_before_execute and on_after_execute really not appealing here.   might have to just go back to
what it was the other day.
2010-08-28 11:29:07 -04:00
Mike Bayer 63c1800c56 - its probably worthwhile to make the primary listen() interface humane, i.e.:
def listen(target, args)

so here we provide a "wrapper" approach that allows this, and it is
basically pass-by-value.  a pass-by-value event *may* support rewriting
some of the args in the dictionary.

 the current
listen will become "listen_raw" since it saves about 100% overhead versus
the coercion to dict, and will be used internally, and will remain
pass-by-reference.

proxyconnection probably will rely upon the newer style of pass-by-value
for "rewrite the args" types of calls.
2010-08-27 20:17:37 -04:00
Mike Bayer f665ae7464 this reorganizes things so the EventDescriptor and all is on a "Dispatch" object.
this leaves the original Event class alone so sphinx documents it.

this is all a mess right now but the pool/engine tests are working fully
at the moment so wanted to mark a working version.
2010-08-09 23:34:23 -04:00
Mike Bayer 9cbfe389f7 - pretty much all tests passing, maybe some callcounts are off
- test suite adjusted to use engine/pool events and not listeners
- deprecation warnings
2010-07-25 13:08:39 -04:00
Mike Bayer a6b62cc3fe Python-tidy test/engine and test/aaa_profiling, 80% auto + 20% manual intervention 2010-07-11 13:15:51 -04:00
Mike Bayer 9bab63b693 - Pool classes will reuse the same "pool_logging_name" setting
after a dispose() occurs.

- Engine gains an "execution_options" argument and
update_execution_options() method, which will apply to
all connections generated by this engine.

- Added more aggressive caching to the mapper's usage of
UPDATE, INSERT, and DELETE expressions.  Assuming the
statement has no per-object SQL expressions attached,
the expression objects are cached by the mapper after
the first create, and their compiled form is stored
persistently in a cache dictionary for the duration of
the related Engine.

- change #3 required change #1 so that we could test
a set of mappers operating over the course of many engines without
memory usage increase.
2010-05-30 20:24:08 -04:00
Mike Bayer 731ad9b0b9 further testing reveals that cursor.rowcount is only called with update/delete and DDL,
and also that FB's cursor.rowcount is a little expensive, but not dramatically.
added a test to ensure cursor.rowcount is only called on update/delete.
the current default for firebird enable_rowcount is now True, leaving all the
options to turn it off etc..
2010-04-12 20:20:50 -04:00
Mike Bayer fc157ed8c5 - added a test for the solution in [ticket:1757].
- this does imply that a lot of the "test the RowProxy" tests in sql/test_query might be better off in engine/test_execute or perhaps engine/test_resultproxy
2010-04-11 15:37:20 -04:00
Mike Bayer f3fb6fe1d8 fix this test for oracle 2010-04-07 20:25:37 -04:00
Mike Bayer 8842bbd8b5 - ah. oursql didn't have "extra steps" here, the previous system within execution_options()
used by oursql would generate a proxied connection from within the dialect.initialize() phase.  the new
clone system bypasses that.
2010-04-07 15:20:20 -04:00
Mike Bayer 5d61549f3d - Added new 'compiled_cache' execution option. A dictionary
where Compiled objects will be cached when the Connection
compiles a clause expression into a dialect- and parameter-
specific Compiled object.  It is the user's responsibility to
manage the size of this dictionary, which will have keys
corresponding to the dialect, clause element, the column
names within the VALUES or SET clause of an INSERT or UPDATE,
as well as the "batch" mode for an INSERT or UPDATE statement.
2010-04-07 13:59:18 -04:00
Mike Bayer 48ccd63a84 arg, oracle, bah 2010-03-13 14:53:38 -05:00
Mike Bayer 5f1fbf5759 - Added "logging_name" argument to create_engine(), Pool() constructor
as well as "pool_logging_name" argument to create_engine() which
filters down to that of Pool.   Issues the given string name
within the "name" field of logging messages instead of the default
hex identifier string.  [ticket:1555]
2010-03-13 13:53:31 -05:00
Philip Jenvey 0b78ef9e7a fix extending of a tuple 2010-03-12 17:19:07 -08:00
Mike Bayer 52d89f7225 skip test for oursql 2010-03-01 22:12:25 +00:00
Michael Trier 3eee887232 Changes to get mysqlconnector passing most tests. 2010-02-28 23:56:11 +00:00
Mike Bayer a76927f584 - the execution sequence pulls all rowcount/last inserted ID
info from the cursor before commit() is called on the
DBAPI connection in an "autocommit" scenario.  This helps
mxodbc with rowcount and is probably a good idea overall.
- cx_oracle wants list(), not tuple(), for empty execute.
- cleaned up plain SQL param handling
2010-02-28 23:51:54 +00:00
Michael Trier 7a629b6d41 Changed bind parameters to be passed as a tuple. Some drivers don't like to receive a list. 2010-02-26 19:05:00 +00:00
Michael Trier e3ffcf82ce The py-postgresql dialect supports raw python. 2010-02-22 22:54:35 +00:00
Philip Jenvey ff09d5709d missing import, forcefully compile the expression to str 2010-01-26 23:23:13 +00:00
Philip Jenvey 8d22a984be oracle compat 2010-01-26 06:17:02 +00:00
Mike Bayer da21efabb4 - agnosticize checking for the two phase events 2010-01-21 01:46:06 +00:00
Mike Bayer 16ca025657 - ConnectionProxy now has wrapper methods for all transaction
lifecycle events, including begin(), rollback(), commit()
begin_nested(), begin_prepared(), prepare(), release_savepoint(),
etc.
2010-01-16 19:04:39 +00:00
Mike Bayer 9911443b9d - new oursql dialect added. [ticket:1613] 2009-11-10 22:39:42 +00:00
Philip Jenvey fc59a5e0c4 oracle+zxjdbc returning support 2009-08-18 05:28:05 +00:00
Philip Jenvey b365cc8396 ensure order of larger comparisons 2009-08-08 02:01:46 +00:00
Mike Bayer 8fc5005dfe merge 0.6 series to trunk. 2009-08-06 21:11:27 +00:00
Mike Bayer 45cec095b4 - unit tests have been migrated from unittest to nose.
See README.unittests for information on how to run
the tests.  [ticket:970]
2009-06-10 21:18:24 +00:00