Commit Graph

453 Commits

Author SHA1 Message Date
Mike Bayer 6614209895 - generalized a SQLCompileTest out of select.py, installed
into dialect/mssql.py, dialect/oracle.py, sql/generative.py
- fixed oracle issues [ticket:732], [ticket:733], [ticket:734]
2007-08-13 20:00:38 +00:00
Jason Kirtland 799f458667 adjusted mysql autoload from a named schema, esp. for windows 2007-08-13 18:57:05 +00:00
Jason Kirtland 05eb3073df Removed unused imports, other import adjustments per pyflakes 2007-08-13 07:09:56 +00:00
Jason Kirtland 872a882d0d auto-commit after LOAD DATA INFILE for mysql
caught a couple more uncompiled regexps
2007-08-12 22:05:30 +00:00
Mike Bayer 62410adeb9 - fixed compiler bug in mssql
- marked as unsupported for mssql all two-phase and nested transcation tests
- marked as unsupported for mssql various transactional/session tests which require two connections looking at uncommitted/external data at the same time (ms-sql cant handle it)
- put better explicit closeout step in unitofwork.py tests to appease ms-sqls hard locking
2007-08-12 21:36:33 +00:00
Paul Johnston 98166b253e Fix missing import of 'operator' 2007-08-12 20:18:04 +00:00
Jason Kirtland 685f281d40 Docs. 2007-08-12 04:51:21 +00:00
Jason Kirtland 138eee02f5 Allow auto_increment on any pk column, not just the first. 2007-08-12 01:11:44 +00:00
Mike Bayer e8793a5b59 - case_sensitive=(True|False) setting removed from schema items, since
checking this state added a lot of method call overhead and there was
    no decent reason to ever set it to False.  Table and column names which are
    all lower case will be treated as case-insenstive (yes we adjust for
    Oracle's UPPERCASE style too).
2007-08-11 14:03:23 +00:00
Mike Bayer 41c734b5a3 attempting to get oracle XID to work. not there yet. 2007-08-11 01:08:42 +00:00
Jason Kirtland 7a545a8869 by popular demand, mysql reflection is now a single round-trip and uses a parse of SHOW CREATE TABLE ddl [ticket:612]
the ANSI_QUOTES mode is now supported
halfway there for auto_increment on secondary columns [ticket:649]
indexes are now reflected [ticket:663]
2007-08-11 01:03:37 +00:00
Mike Bayer 1391efea78 repaired oracle savepoint implementation 2007-08-11 00:03:26 +00:00
Mike Bayer b852fcbce0 - oracle reflection of case-sensitive names all fixed up
- other unit tests corrected for oracle
2007-08-10 23:24:06 +00:00
Mike Bayer 219bcf8cb1 - fixes to PG unicode table/sequence reflection/create/drops 2007-08-10 18:07:46 +00:00
Jason Kirtland 72b02cc093 Added 'unformat_identifiers', produces a list of unquoted identifiers from an identifier or a fully qualified identifier string. 2007-08-09 21:01:50 +00:00
Mike Bayer b0253eb9b5 - added 'object_session' as classlevel method to Session
- moved 'identity_key' to be a classmethod on Session
- some docstrings
- merged r3229 from 0.3 branch to unconditonally quote schemaname in PG-reflected default
- name fixes in dynamic unit test
2007-08-09 19:51:36 +00:00
Jason Kirtland bdd780dd88 restore clipping value for YEAR DDL 2007-08-09 19:03:42 +00:00
Jason Kirtland 4e7dec51e1 Added set_types to util, a tuple of available set implementations.
Added BIT and SET ([ticket:674])- all mysql data types are now covered!
Fix for YEAR DDL generation, also no longer a concatenable type.
Expanded docs for some mysql column esoterica.
2007-08-08 23:45:26 +00:00
Ants Aasma 2f090b483d - fix mssql compiling explicitly added alias twice
- add is_select to mssql dialect. currently adds only sp_columns, someone familiar with mssql should update this
- update mssql get_default_schema_name api
- remove commented code from Query.filter_by
2007-08-08 22:35:05 +00:00
Paul Johnston 06bebbb41c merge [3215] into trunk 2007-08-08 20:45:25 +00:00
Mike Bayer 4cded36d21 'condition' misspelled 2007-08-07 04:12:29 +00:00
Paul Johnston 98230f7c32 Add initial version of MS Access support 2007-08-05 23:13:25 +00:00
Jason Kirtland 8613586f0d Pedantic tweak to coltype swappage... 2007-08-04 21:53:41 +00:00
Jason Kirtland d4e4e404b5 Further tweaks for lc strategies
Ensure that the recently added first-class tinyint plays nicely with boolean reflection
2007-08-04 21:43:42 +00:00
Mike Bayer 0b14d14db1 - fixed table_names for postgres to return as dialect.encoding-decoded unicode strings 2007-08-03 20:04:41 +00:00
Jonathan Ellis b5a7efe591 switch "if not len(x)" to "if not x" 2007-08-03 18:28:11 +00:00
Jonathan Ellis d7575a738d switch (simple) occurences of 'if len(x)' to 'if x': find . -name '*.py' |xargs perl -pi.bak -e 's/if len\((\S+)\):/if $1:/' && find . -name '*.bak' |xargs rm 2007-08-03 13:57:40 +00:00
Jonathan Ellis f4b524f9b3 table_names shouldn't include system tables. (if user wants that they should poke around in catalog manually.) 2007-08-03 04:01:41 +00:00
Jason Kirtland b8588ef4f7 - Dialects can be queried for the server version (sqlite and mysql only with this commit)
- Mark everything in a test suite as failed when setUpAll fails.
- Added test coverage for Unicode table names in metadata.reflect()
- @testing.exclude() filters out tests by server version
- Applied exclude to the test suite, MySQL 4.1 passes again (no XA or SAVEPOINT)
- Removed MySQL charset-setting pool hook- charset=utf8&use_unicode=0 works just as well.  (Am I nuts?  I'd swear this didn't work before.)
- Finally migrated some old MySQL-tests into the dialect test module
- Corrected 'commit' and 'rollback' logic (and comment) for ancient MySQL versions lacking transactions entirely
- Deprecated the MySQL get_version_info in favor of server_version_info
- Added a big hunk-o-doc for MySQL.
2007-08-03 02:38:00 +00:00
Jason Kirtland 8a5d576872 Remove unused mxDateTime 2007-08-01 20:07:46 +00:00
Jason Kirtland 6b7f670c4c Stopgap for post- #646 and r3030, wedge in 0.3 Decimals-are-floats behavior for vanilla 2.3 Python. 2007-08-01 20:07:07 +00:00
Jason Kirtland c4130498c0 Promoted format_table_seq from mysql to ansisql. Formats a fully qualified table reference as a quoted sequence, suitable for '.'.joining or whatever. [ticket:666] 2007-08-01 00:12:42 +00:00
Mike Bayer 8f17efd7a3 - assurances that context.connection is safe to use by column default functions, helps proposal for [ticket:703] 2007-07-31 17:15:36 +00:00
Jason Kirtland 04e8a839b4 MetaData can now reflect() all tables in the database en-masse thanks to table_names().
table_names changed to accept an explicit connection
ThreadLocalMetaData constructor now takes no arguments. If case_sensitive is needed in a multi-bind context, move it to Table or subclass TLMD to force it.
Banished **kwargs from MetaData
Lots of class doc and docstring improvements around MetaData and TLMD.
Some engine->bind internal naming updates + reorg in schema.
MySQL table_names now return Unicode. (Also, a unicode reflect() unit test is needed.)
2007-07-31 00:19:23 +00:00
Jonathan Ellis 030554d41b little too happy with the copy/paste there 2007-07-30 22:43:05 +00:00
Mike Bayer f94d9efecc - removed import of old sqlite module [ticket:654]
- removed sqlite version warning, all tests pass 100% with py2.5's older sqlite lib
- fixed dynamic test for py2.5
2007-07-29 17:39:37 +00:00
Jason Kirtland 6a1d279a9a Big MySQL dialect update, mostly efficiency and style.
Added TINYINT [ticket:691]- whoa, how did that one go missing for so long?
Added a charset-fixing pool listener. The driver-level option doesn't help everyone with this one.
New reflector code not quite done and omiited from this commit.
2007-07-29 16:13:23 +00:00
Jason Kirtland c9cc90bbdc Finish table_names. 2007-07-29 05:49:55 +00:00
Jonathan Ellis cbb9e7f191 add table_names() for mysql. maybe it works. 2007-07-29 04:23:32 +00:00
Jonathan Ellis 38e8793759 r/m information_schema from pg 2007-07-29 04:21:09 +00:00
Jonathan Ellis a9a1f912fd engine.table_names()
tested vs sqlite and pg.  mssql should also be ok (uses ischema like pg.)  others are best-guess based on has_table code.
2007-07-29 04:15:14 +00:00
Mike Bayer d43fbfb93a removed LONG_STRING, LONG_BINARY from "binary" types, [ticket:622] 2007-07-27 22:52:58 +00:00
Mike Bayer ed4fc64bb0 merging 0.4 branch to trunk. see CHANGES for details. 0.3 moves to maintenance branch in branches/rel_0_3. 2007-07-27 04:08:53 +00:00
Rick Morrison d918eb8ce8 mssql: indexes are now quoted when dropping from reflected tables [ticket:684] 2007-07-26 17:05:11 +00:00
Rick Morrison 1c66e35132 mssql: added support for TIME type (simulated via DATETIME col) [ticket:679] 2007-07-26 16:51:09 +00:00
Jason Kirtland 834c0e9056 Merged lower case caching, fetching from r2955
Be sure to close rows fetched in reflection (if not autoclosed)
Fixed bind test, needed transactional storage engine for mysql
2007-07-20 19:43:46 +00:00
Jason Kirtland c4b081cc1d Merged reference fixes from r2986 2007-07-19 23:46:37 +00:00
Jason Kirtland 7fed906a9b Better quoting of identifiers when manipulating schemas
Merged from r2981
2007-07-19 20:44:19 +00:00
Paul Johnston a966505992 Properly escape table names when reflecting for mssql and sqlite [ticket:653] 2007-07-17 20:13:36 +00:00
Jason Kirtland 7e1cf0cef4 Minor cleanups. 2007-07-17 13:56:50 +00:00