Commit Graph

295 Commits

Author SHA1 Message Date
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
Mike Bayer 03bcdb5bfb increase the timeout here to accommodate slowness on the buildbot 2010-02-22 16:17:57 +00:00
Mike Bayer 0ee04dfcb0 another weird nose + py3k fix 2010-02-20 20:16:18 +00:00
Mike Bayer bde3ceb1d9 the order of rollback()s wasn't correct. slightly disturbing as the test usually passed,
began failing on PG as of somewhat unrelated commit r6705, and only when the full test/engine series
of tests were run.  very heisenbuggy. may want to add tests to assert that TLEngine is enforcing
nesting even with subtransactions.
2010-02-02 23:26:34 +00:00
Mike Bayer 5d265624e7 - the "connection" argument from engine.transaction() and
engine.run_callable() is removed - Connection itself
now has those methods.   All four methods accept
*args and **kwargs which are passed to the given callable,
as well as the operating connection.
2010-01-29 22:20:55 +00:00
Mike Bayer e78cee6618 - the "autocommit" flag on select() and text() as well
as select().autocommit() are deprecated - now call
      .execution_options(autocommit=True) on either of those
      constructs, also available directly on Connection and orm.Query.
2010-01-28 23:49:22 +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 dd01f817b7 - oracle + firebird: "case sensitivity" feature will detect an all-lowercase
case-sensitive column name during reflect and add
"quote=True" to the generated Column, so that proper
quoting is maintained.
2010-01-24 18:41:30 +00:00
Mike Bayer 9806d81675 - the "threadlocal" engine has been rewritten and simplified
and now supports SAVEPOINT operations.
2010-01-24 18:13:21 +00:00
Mike Bayer fc92d14bbe - types.Binary is renamed to types.LargeBinary, it only
produces BLOB, BYTEA, or a similar "long binary" type.
New base BINARY and VARBINARY
types have been added to access these MySQL/MS-SQL specific
types in an agnostic way [ticket:1664].
2010-01-23 19:44:06 +00:00