Commit Graph

305 Commits

Author SHA1 Message Date
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 7d3a916fc3 - replaced all self.__connection.is_valid with
"safe" self._connection_is_valid.
- Fixed bug in Connection whereby if a "disconnect"
event occurred in the "initialize" phase of the
first connection pool connect, an AttributeError
would be raised when the Connection would attempt
to invalidate the DBAPI connection.  [ticket:1894]
- Connection.invalidate() can be called more than
once and subsequent calls do nothing.
2010-08-26 01:33:51 -04:00
Mike Bayer f8fb593132 mark this as intermittent crashes on the buildbot - reason for failures not clear 2010-08-08 11:41:26 -04:00
Mike Bayer 83c9b0dcdc - Fixed bug whereby replacing composite foreign key
columns in a reflected table would cause an attempt
to remove the reflected constraint from the table
a second time, raising a KeyError.  [ticket:1865]
- fixed test of error message now that we've improved it
(didn't know that msg had an assertion)
2010-08-04 21:30:53 -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 a8e53a4f31 - Column.copy() takes along the "unique" attribute
among others, fixes [ticket:1829] regarding declarative
mixins
2010-06-15 17:56:17 -04:00
Mike Bayer 27781263d9 - Inspector hits bind.connect() when invoked to ensure
initialize has been called.  the internal name ".conn"
is changed to ".bind", since that's what it is.
2010-06-11 11:38:06 -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 14d5232652 - Added table.add_is_dependent_on(othertable), allows manual
placement of dependency rules between two Table objects
for use within create_all(), drop_all(), sorted_tables.
[ticket:1801]
2010-05-13 15:53:18 -04:00
Mike Bayer 41d2e24c4a merge tip 2010-05-03 19:32:34 -04:00
Mike Bayer 74a8723df3 - Fixed bug in connection pool cursor wrapper whereby if a
cursor threw an exception on close(), the logging of the
message would fail.  [ticket:1786]
2010-04-28 16:16:56 -04:00
Mike Bayer ff19492160 - Fixed "table" argument on constructor of ForeginKeyConstraint
[ticket:1571]
2010-04-26 00:14:21 -04:00
Mike Bayer b437bb2132 some more metadata cleanup since --dropall isnt specified on the buildbot 2010-04-16 15:24:56 -04:00
Mike Bayer 23f8c6c241 - Table.create() and Table.drop() no longer apply metadata-
level create/drop events.  [ticket:1771]
2010-04-16 13:08:45 -04:00
Mike Bayer 82d194c9a6 - Added get_pk_constraint() to reflection.Inspector, similar
to get_primary_keys() except returns a dict that includes the
name of the constraint, for supported backends (PG so far).
[ticket:1769]
- Postgresql reflects the name of primary key constraints,
if one exists.  [ticket:1769]
2010-04-15 19:05:41 -04:00
Mike Bayer 2a2890cae3 merge tip 2010-04-13 13:31:41 -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 cf9cac34ac merge default 2010-04-10 19:45:34 -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 a998ddf0c5 merge default 2010-04-07 14:00:23 -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 822a6b5786 - Fixed bug in execution_options() feature whereby the existing
Transaction and other state information from the parent
connection would not be propagated to the sub-connection.
2010-04-07 13:42:31 -04:00
Mike Bayer 57335697c6 - EdgeCollection can now go away
- fix reflection test
2010-04-06 13:20:31 -04:00
Mike Bayer f4df21c578 - StaticPool now initializes, disposes and recreates without
opening a new connection - the connection is only opened when
first requested. dispose() also works on AssertionPool now.
[ticket:1728]
2010-03-19 17:51:50 -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
Mike Bayer 10659a005c merge tip 2010-03-13 11:52:50 -05:00
Mike Bayer c4d429fc2a fix the timeout test once and for all 2010-03-13 11:52:17 -05:00
Philip Jenvey 0b78ef9e7a fix extending of a tuple 2010-03-12 17:19:07 -08:00
Mike Bayer 19de4da70f - the copy() method of Column now copies over uninitialized
"on table attach" events.  Helps with the new declarative
"mixin" capability.
2010-03-11 12:42:06 -05:00
Philip Jenvey 649d1f11c3 fix last commit 2010-03-08 13:04:32 -08:00
Philip Jenvey d9c7d9e0b0 small cleanup 2010-03-08 12:22:33 -08:00
Mike Bayer 4233c6ceb4 there we go, that was the stupid gc bug 2010-03-01 23:13:21 +00: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
Mike Bayer 5fd371fa9c some ms/odbc fixes 2010-02-28 21:29:20 +00:00
Mike Bayer cd6af2e03b working on pyodbc / mxodbc 2010-02-27 20:03:33 +00:00
Mike Bayer 46fa536ba4 - threadlocal engine wasn't properly closing the connection
upon close() - fixed that.
- Transaction object doesn't rollback or commit if it isn't
"active", allows more accurate nesting of begin/rollback/commit.
- Added basic support for mxODBC [ticket:1710].
- Python unicode objects as binds result in the Unicode type,
not string, thus eliminating a certain class of unicode errors
on drivers that don't support unicode binds.
2010-02-27 00:44:26 +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 8056006f06 Support for the mysql+oursql dialect. Thank you Taavi Burns. 2010-02-25 10:07:59 +00:00
Michael Trier e759031b16 Added the ability to strip the schema when using tometadata by passing schema=None as an argument. Fixes #1673. 2010-02-25 06:34:37 +00:00
Mike Bayer 2aa9f5541b - "out" parameters require a type that is supported by
cx_oracle.  An error will be raised if no cx_oracle
type can be found.
- Column() requires a type if it has no foreign keys (this is
not new).  An error is now raised if a Column() has no type
and no foreign keys.  [ticket:1705]
2010-02-23 22:15:09 +00:00
Michael Trier e3ffcf82ce The py-postgresql dialect supports raw python. 2010-02-22 22:54:35 +00:00