Commit Graph

232 Commits

Author SHA1 Message Date
Mike Bayer a69a094db5 - Fixed bug in two-phase transaction whereby commit() method
didn't set the full state which allows subsequent close()
call to succeed. [ticket:1603]
2009-11-04 17:15:36 +00:00
Mike Bayer 6acbb4fb93 - simplify default schema name test
- MySQL + zxjdbc *is* unicode by default.  it was the broken initialize()
2009-11-03 19:48:07 +00:00
Mike Bayer 7115454c70 added test for [ticket:1450] 2009-11-01 21:08:12 +00:00
Mike Bayer 2cefbf11c3 add "dialect" to the __all__ of each root dialect package 2009-11-01 20:59:40 +00:00
Mike Bayer 0d2ae16aee - the __contains__() method of MetaData now accepts
strings or `Table` objects as arguments.  If given
a `Table`, the argument is converted to `table.key` first,
i.e. "[schemaname.]<tablename>" [ticket:1541]
2009-11-01 20:39:43 +00:00
Mike Bayer bc714d614d test fixes 2009-10-26 01:29:56 +00:00
Mike Bayer 4a7f889d8a oracle test fixes 2009-10-26 01:20:38 +00:00
Mike Bayer 5119ce78b5 - The psycopg2 dialect now uses psycopg2's "unicode extension"
on all new connections, which allows all String/Text/etc.
types to skip the need to post-process bytestrings into
unicode (an expensive step due to its volume).  Other
dialects which return unicode natively (pg8000, zxjdbc)
also skip unicode post-processing.

- String/Text/Unicode types now skip the unicode() check
on each result column value if the dialect has
detected the DBAPI as returning Python unicode objects
natively.  This check is issued on first connect
using "SELECT CAST 'some text' AS VARCHAR(10)" or
equivalent, then checking if the returned object
is a Python unicode.   This allows vast performance
increases for native-unicode DBAPIs, including
pysqlite/sqlite3, psycopg2, and pg8000.
2009-10-26 00:32:39 +00:00
Mike Bayer 5a140299b3 - Corrected the "has_sequence" query to take current schema,
or explicit sequence-stated schema, into account.
[ticket:1576]
2009-10-21 04:47:02 +00:00
Mike Bayer d6239f2262 - added "ddl" argument to the "on" callable of DDLElement [ticket:1538]
- fixed the imports in the "postgres" cleanup dialect
- renamed "schema_item" attribute/argument of DDLElement
  to "target".
2009-10-12 00:11:00 +00:00
Mike Bayer 9bab004a9b - unit test fixes
- py3k readme
- removed column.sequence accessor
2009-10-10 16:14:13 +00:00
Philip Jenvey 5a9c1b8824 merge from branches/clauseelement-nonzero
adds a __nonzero__ to _BinaryExpression to avoid faulty comparisons during hash
collisions (which only occur on Jython)
fixes #1547
2009-09-24 02:11:56 +00:00
Philip Jenvey ed486e9523 close cursors: mostly fetchone -> first 2009-09-11 22:53:50 +00:00
Mike Bayer 5ca7fa3abd all about DDL events 2009-09-11 22:37:13 +00:00
Mike Bayer a6b56237fe fix, comes back funky on PG reflection 2009-08-28 20:36:28 +00:00
Mike Bayer f892d1a3fe - Fixed column.copy() to copy defaults and onupdates.
[ticket:1373]
2009-08-28 19:00:44 +00:00
Philip Jenvey fc59a5e0c4 oracle+zxjdbc returning support 2009-08-18 05:28:05 +00:00
Mike Bayer 00d247edcc close out py3k + pg8000 bugs that are fixable for now without pg8000 decimal fix 2009-08-09 21:41:56 +00:00
Mike Bayer e7241263aa python3k fixes 2009-08-09 20:50:46 +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 05a82671c3 - Fixed bug in Table and Column whereby passing empty
dict for "info" argument would raise an exception.
[ticket:1482]
2009-07-25 21:40:27 +00:00
Mike Bayer 5503028d8c changed reference to PostgreSQL in docs. 2009-07-13 02:04:54 +00:00
Jason Kirtland ca4744c1cb Implemented recreate() for StaticPool 2009-07-10 21:48:45 +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
Mike Bayer 37b7e458c2 - use ForeignKey.column as _colspec source in Column._make_proxy(), preventing needless
redundant string arithmetic in memoized ForeignKey.column method
- _pre_existing_column attribute becomes optional, only needed for original Table-bound column, not proxies
- compare two ForeignKeys based on target_fullname, don't assume self._colspec is a string
- Fixed bug when overriding a Column with a ForeignKey
on a reflected table, where derived columns (i.e. the
"virtual" columns of a select, etc.) would inadvertently
call upon schema-level cleanup logic intended only
for the original column. [ticket:1278]
2009-01-14 20:48:01 +00:00
Mike Bayer fbcaa34b9e - NullPool supports reconnect on failure behavior.
[ticket:1094]
2008-12-27 18:07:35 +00:00
Mike Bayer 83a756c541 - Reflected foreign keys will properly locate
their referenced column, even if the column
was given a "key" attribute different from
the reflected name.  This is achieved via a
new flag on ForeignKey/ForeignKeyConstraint
called "link_to_name", if True means the given
name is the referred-to column's name, not its
assigned key.
[ticket:650]
- removed column types from sqlite doc, we
aren't going to list out "implementation" types
since they aren't significant and are less present
in 0.6
- mysql will report on missing reflected foreign
key targets in the same way as other dialects
(we can improve that to be immediate within
reflecttable(), but it should be within
ForeignKeyConstraint()).
- postgres dialect can reflect table with
an include_columns list that doesn't include
one or more primary key columns
2008-12-26 05:28:38 +00:00
Mike Bayer 3ea2888b7f fix imports for index reflection unit test 2008-12-26 00:51:44 +00:00
Mike Bayer 864644bee4 - Added Index reflection support to Postgres, using a
great patch we long neglected, submitted by
Ken Kuhlman. [ticket:714]
2008-12-23 04:47:52 +00:00
Mike Bayer d76dc73f33 merge the test/ directory from -r5438:5439 of py3k_warnings branch. this gives
us a 2.5-frozen copy of unittest so we're insulated from unittest changes.
2008-12-18 18:11:12 +00:00
Mike Bayer 6a99f29313 - _execute_clauseelement() goes back to being
a private method.  Subclassing Connection
is not needed now that ConnectionProxy
is available.
- tightened the interface for the various _execute_XXX()
methods to reduce ambiguity
- __distill_params() no longer creates artificial [{}] entry,
blank dict is no longer passed through to do_execute()
in any case unless explicitly sent from the outside
as in connection.execute("somestring"), {})
- fixed a few old sql.query tests which were doing that
- removed needless do_execute() from mysql dialect
- fixed charset param not properly being sent to
_compat_fetchone() in mysql
2008-12-17 23:09:51 +00:00
Michael Trier 1d90146210 Modified fails_on testing decorator to take a reason for the failure.
This should assist with helping to document the reasons for testing failures.
Currently unspecified failures are defaulted to 'FIXME: unknown'.
2008-12-12 03:41:05 +00:00
Mike Bayer eaa359f177 - Restored "active rowcount" fetch before ResultProxy
autocloses the cursor.  This was removed in 0.5rc3.
2008-11-10 16:42:35 +00:00
Michael Trier 4cd99f5536 Global propigate -> propagate change to correct spelling. Additionally found a couple of insures that should be ensure. 2008-11-09 01:53:08 +00:00
Michael Trier a8c308f349 Corrected problems with reflection on mssql when dealing with schemas. Fixes #1217. 2008-11-09 01:27:25 +00:00
Mike Bayer 8a04f99784 - Repaired the table.tometadata() method so that a passed-in
schema argument is propigated to ForeignKey constructs.
2008-11-07 16:19:24 +00:00
Jason Kirtland c9591657dd Fixed mysql FK reflection for the edge case where a Table has expicitly provided a schema= that matches the connection's default schema. 2008-10-27 22:56:53 +00:00
Mike Bayer 1ccdfb5172 call count pinata party 2008-10-23 02:22:57 +00:00
Michael Trier 188a990e22 indicated that test_empty_insert fails on mssql since pyodbc returns a -1 always for the result.rowcount. 2008-10-09 23:28:45 +00:00
Mike Bayer 4597c678ac fixed test for #1175 2008-10-05 00:24:43 +00:00
Michael Trier c9afdb5072 Corrects issue where engine.execute raised exception when given empty list. Fixes #1175. 2008-10-04 23:19:05 +00:00
Jason Kirtland 0d9fc31fa1 re-enabled memusage and connect tests. 2008-09-27 01:41:45 +00:00
Jason Kirtland 29a6af6d46 Added query_cls= override to scoped_session's query_property 2008-09-27 01:37:26 +00:00
Mike Bayer e0cc32c937 added gc.collect() for pypy/jython compat, [ticket:1076] 2008-09-16 17:43:13 +00:00
Mike Bayer 714e629aeb - broke pool tests out into QueuePoolTest/SingletonThreadPoolTest
- added test for r5061/r5062 [ticket:1157]
2008-09-01 18:14:03 +00:00
Mike Bayer 427ed1966f - fixed a bug in declarative test which was looking for old version of history
- Added "sorted_tables" accessor to MetaData, which returns
Table objects sorted in order of dependency as a list.
This deprecates the MetaData.table_iterator() method.
The "reverse=False" keyword argument has also been
removed from util.sort_tables(); use the Python
'reversed' function to reverse the results.
[ticket:1033]
2008-08-19 21:27:34 +00:00
Jason Kirtland 10848388a3 - Mock engines take on the .name of their dialect. [ticket:1123]
Slightly backward incompatible: the .name is a read-only property.
  The test suite was assigning .name = 'mock'; this no longer works.
2008-08-15 23:17:24 +00:00
Mike Bayer c374f7b8b5 added import for interfaces, otherwise tsa.interfaces is undef if the test is run standalone 2008-08-13 21:11:42 +00:00
Mike Bayer 50c4825b54 merged r5018 from 0.4 branch, but using contextual_connect() (will fix in 0.4 too) 2008-08-10 05:26:16 +00:00