Commit Graph

271 Commits

Author SHA1 Message Date
Mike Bayer c4d429fc2a fix the timeout test once and for all 2010-03-13 11:52:17 -05: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
Mike Bayer da21efabb4 - agnosticize checking for the two phase events 2010-01-21 01:46:06 +00:00
Mike Bayer 3188ad6043 - implement dynamic type_affinity for Oracle.NUMBER
- standardize type tests on type affinity matches
2010-01-17 21:29:03 +00:00
Mike Bayer 2b1937a31e - reorganized and re-documented Oracle schema tests to assume
test user has DBA privs, and all objects can be created /dropped.
- added ORDER BY to oracle column listing
- Oracle all_tables always limits to current user if schema not given.
- views reflect - added documentation + a unit test for this.
- Table(autoload) with no bind produces an error message specific to
the fact that autoload_with should be the first option to try.
2010-01-17 20:32:45 +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 7ead46cbf2 merge r6616 of 0.5 branch, allow DefaultGenerators as "default" and "onupdate" 2010-01-07 00:24:30 +00:00
Mike Bayer 5d711348da - have inspector properly return default_schema_name [ticket:1626] 2010-01-03 18:27:38 +00:00
Mike Bayer d05a35daf8 - The copy() method on Column now supports uninitialized,
unnamed Column objects. This allows easy creation of
declarative helpers which place common columns on multiple
subclasses (merged from 0.5 with changes).
2010-01-02 03:50:50 +00:00
Mike Bayer 404be6e761 - added _with_options() to Connection. not publicizing this yet.
- updated oursql driver with latest fixes using options. [ticket:1613]
- all the MySQL drivers get a shoutout in the docs
- marked tests that OurSQL has problems with (only three), passes 100% now
2009-12-18 20:41:34 +00:00
Mike Bayer f9cb6f5834 - reworked the DDL generation of ENUM and similar to be more platform agnostic.
Uses a straight CheckConstraint with a generic expression.  Preparing for boolean
constraint in [ticket:1589]
- CheckConstraint now accepts SQL expressions, though support for quoting of values
will be very limited.  we don't want to get into formatting dates and such.
2009-12-06 19:51:10 +00:00
Mike Bayer 648e0eb70c - The cursor associated with connection pool connections
(i.e. _CursorFairy) now proxies `__iter__()` to the
underlying cursor correctly. [ticket:1632]
2009-12-03 02:34:47 +00:00
Mike Bayer b14d53aba1 fix StaticPool [ticket:1615] 2009-11-12 21:46:14 +00:00
Mike Bayer 9911443b9d - new oursql dialect added. [ticket:1613] 2009-11-10 22:39:42 +00:00
Mike Bayer f8e098544b - ForeignKey(constraint=some_parent) is now private _constraint
- ForeignKey and ForeignKeyConstraint objects now correctly
copy() all their public keyword arguments.  [ticket:1605]
2009-11-09 23:40:57 +00:00
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