Commit Graph

803 Commits

Author SHA1 Message Date
Jason Kirtland c2092c7254 - Refinements for maxdb's handling of SERIAL and FIXED columns
- Expanded maxdb's set of paren-less functions
2007-10-31 00:28:53 +00:00
Mike Bayer 4a4daad81a - removed regular expression step from most statement compilations.
also fixes [ticket:833]
- inlining on PG with_returning() call
- extra options added for profiling
2007-10-27 17:41:30 +00:00
Jason Kirtland 6378c34799 - Added initial version of MaxDB dialect.
- All optional test Sequences are now optional=True
2007-10-23 07:38:07 +00:00
Mike Bayer 726bb2a24c bumped sqlite version for empty insert test to 3.4 2007-10-21 16:45:58 +00:00
Jason Kirtland 565dfd3790 Excluding older sqlite versions from the new insert tests. Currently conservative- 2.8 definitely fails, 3.3 works. The 3.0 and 3.1 binaries from sqlite.org segfault for me so the version check should be revisited when possible. 2007-10-20 17:14:46 +00:00
Jason Kirtland 974f59f091 Fixed empty (zero column) sqlite inserts, allowing inserts on
autoincrementing single column tables.
2007-10-19 07:02:48 +00:00
Jason Kirtland 5154d30418 - Added support for UPDATE with LIMIT on mysql.
- Added mysql dialect tests for SET columns and the in_ operator.
2007-10-16 23:59:05 +00:00
Ants Aasma 6bbc7dd157 change the in_ API to accept a sequence or a selectable [ticket:750] 2007-10-16 22:57:05 +00:00
Jason Kirtland dda6a5f5a8 Added a missing @supported. 2007-10-14 17:20:13 +00:00
Mike Bayer 9f856b88f6 - attempted to add a test for #622 / #751, but cant reproduce the failing condition
- fixed major oracle bug introduced by r3561, since colnames come back as unicode now,
need to encode keys in setinputsizes() step
2007-10-14 16:56:32 +00:00
Jason Kirtland 0b73be7b46 - sybase cleanups: unused imports, adjusted docstrings, trailing whitespace
- added sybase dialect test
- added sybase and access to generated docs
2007-10-13 20:10:14 +00:00
Jason Kirtland c1a8db6791 - sqlite housekeeping- added dialect test & moved tests there, pruned the dialect's reserved words. 2007-10-11 17:35:13 +00:00
Mike Bayer 74064ce9fd - fixed Oracle non-ansi join syntax 2007-10-10 02:30:00 +00:00
Ants Aasma d87ecbdd00 a typo on postgres returning test version check - change <8.4 -> <8.2 2007-10-06 01:31:22 +00:00
Mike Bayer f67fcd1822 - move PG RETURNING tests to postgres dialect test
- added server_version_info() support for PG dialect
- exclude PG versions < 8.4 for RETURNING tests
2007-10-04 03:19:38 +00:00
Ants Aasma 4924007317 - added partial index support for postgres
- fixed create and drop methods on MockConnection
2007-09-29 06:21:34 +00:00
Jason Kirtland 6f3f85e48c Changed MySQL dialect to use the older LIMIT <offset>, <limit> syntax instead
of LIMIT <l> OFFSET <o> for folks using 3.23. ([ticket:794], thanks for the
patch!)
2007-09-26 23:37:11 +00:00
Mike Bayer e37a3a961c - the behavior of String/Unicode types regarding that they auto-convert
to TEXT/CLOB when no length is present now occurs *only* for an exact type
  of String or Unicode with no arguments.  If you use VARCHAR or NCHAR
  (subclasses of String/Unicode) with no length, they will be interpreted
  by the dialect as VARCHAR/NCHAR; no "magic" conversion happens there.
  This is less surprising behavior and in particular this helps Oracle keep
  string-based bind parameters as VARCHARs and not CLOBs [ticket:793].
2007-09-26 14:55:44 +00:00
Mike Bayer 4be3b2664d fixed firebird visit_alias [ticket:779] 2007-09-22 18:13:23 +00:00
Mike Bayer 32dcfdf808 - added "schema" argument to Sequence; use this with Postgres /Oracle when the sequence is
located in an alternate schema.  Implements part of [ticket:584], should fix [ticket:761].
2007-09-22 17:14:15 +00:00
Jason Kirtland 0718103370 Fixed repr() of mysql floats [ticket:775]
Added repr testing to mysql dialect
2007-09-07 17:58:47 +00:00
Jason Kirtland a072e50c9d mysql SETs and ENUMs now unescape embedded quotes before storage in .enums and .values. An ancient bug. 2007-09-06 18:46:53 +00:00
Jason Kirtland c3c79b997b Fixed reflection of the empty string for mysql enums. 2007-09-05 19:39:07 +00:00
Mike Bayer 5df1759e15 - got all examples working
- inline default execution occurs for *all* non-PK columns
unconditionally - preexecute only for non-executemany PK cols on
PG, Oracle, etc.
- new default docs
2007-09-01 21:21:29 +00:00
Mike Bayer 69f7084c9b - merged inline inserts branch
- all executemany() style calls put all sequences and SQL defaults inline into a single SQL statement
and don't do any pre-execution
- regular Insert and Update objects can have inline=True, forcing all executions to be inlined.
- no last_inserted_ids(), lastrow_has_defaults() available with inline execution
- calculation of pre/post execute pushed into compiler; DefaultExecutionContext greatly simplified
- fixed postgres reflection of primary key columns with no sequence/default generator, sets autoincrement=False
- fixed postgres executemany() behavior regarding sequences present, not present, passivedefaults, etc.
- all tests pass for sqlite, mysql, postgres; oracle tests pass as well as they did previously including all
insert/update/default functionality
2007-09-01 19:49:26 +00:00
Jason Kirtland 731dd1e96f - Restored reflection for mysql VIEWs [ticket:748]
- Fixed anonymous pk reflection for mysql 5.1
- Tested table and view reflection against the 'sakila' database from
  MySQL AB on 3.23 - 6.0. (with some schema adjustments, obviously)
  Maybe this will go into the SA test suite someday.
- Tweaked mysql server version tuplification, now also splitting on hyphens
- Light janitorial
2007-08-28 23:44:00 +00:00
Jason Kirtland f981981235 Added a test for the SELECT DISTINCT ON postgresqlism.
Test currently fails due to two problems in postgres.py, but I'm leaving
it uncorrected for now as its not clear what the original intent was
for lists.
2007-08-22 07:33:03 +00:00
Mike Bayer 8ebbfae0a4 fixed imports 2007-08-21 23:42:34 +00:00
Mike Bayer 7f46c8b8d9 fixed "SmallInteger" 2007-08-21 16:56:22 +00:00
Jason Kirtland 6228e72cb1 - omitted 'table' and 'column' from 'from sqlalchemy import *'
- also omitted all modules and classes that aren't expicitly public
- omitted 'Smallinteger' (small i), but it's still in schema
- omitted NullType-related items from types.__all__
- patched up a few tests to use sql.table and sql.column, other related.
2007-08-21 01:31:23 +00:00
Jason Kirtland 83eb243124 added stub/import tests for all dialects
post-refactor fix for access dialect
2007-08-21 00:47:48 +00:00
Jason Kirtland e9015b2d05 fix line ending svn prop 2007-08-21 00:43:47 +00:00
Mike Bayer 8f9b4bc427 adding an "already exists" catch for CREATE DOMAIN 2007-08-18 21:43:53 +00:00
Mike Bayer 7c6c1b99c2 1. Module layout. sql.py and related move into a package called "sql".
2. compiler names changed to be less verbose, unused classes removed.
3. Methods on Dialect which return compilers, schema generators, identifier preparers
have changed to direct class references, typically on the Dialect class itself
or optionally as attributes on an individual Dialect instance if conditional behavior is needed.
This takes away the need for Dialect subclasses to know how to instantiate these
objects, and also reduces method overhead by one call for each one.
4. as a result of 3., some internal signatures have changed for things like compiler() (now statement_compiler()), preparer(), etc., mostly in that the dialect needs to be passed explicitly as the first argument (since they are just class references now).  The compiler() method on Engine and Connection is now also named statement_compiler(), but as before does not take the dialect as an argument.

5. changed _process_row function on RowProxy to be a class reference, cuts out 50K method calls from insertspeed.py
2007-08-18 21:37:48 +00:00
Jason Kirtland 534cf5fdbd - fixed prefixes= argument to select()
- mysql can now generate DISTINCT or ALL for queries, select(..., distinct='ALL')
- documented 'prefixes' arg to select()
- rearranged doc order for select args to mirror that of a generated statement
- went nutty and fixed wrapping and line length on most docstrings in sql.py
2007-08-18 18:15:11 +00:00
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
Mike Bayer 6e477b750e - got is_subquery() working in the case of compound selects, test for ms-sql 2007-08-12 22:01: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
Jason Kirtland 138eee02f5 Allow auto_increment on any pk column, not just the first. 2007-08-12 01:11:44 +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
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
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 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
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
Mike Bayer 68f706b5ba - foreign key specs can have any chararcter in their identifiers
[ticket:667]
2007-07-18 18:32:48 +00:00
Mike Bayer af611b1018 - ForeignKey to a table in a schema thats not the default schema
requires the schema to be explicit; i.e. ForeignKey('alt_schema.users.id')
- the fix in "schema" above fixes postgres reflection of foreign keys from an
alt-schema table to a public schema table
2007-07-08 21:18:46 +00:00
Jason Kirtland 177d30cc01 - Deprecated DynamicMetaData- use ThreadLocalMetaData or MetaData instead
- Deprecated BoundMetaData- use MetaData instead
- Removed DMD and BMD from documentation
2007-07-06 00:58:09 +00:00
Mike Bayer 3f3d84e754 postgres:
- added support for reflection of domains [ticket:570]
    - types which are missing during reflection resolve to Null type
      instead of raising an error
    - moved reflection/types/query unit tests specific to postgres to new
      postgres unittest module
2007-06-29 23:50:25 +00:00
Jason Kirtland 0a713f408d - Emit BOOL rather than BOOLEAN for MySQL booleans in DDL, for old versions
of MySQL (#583)
- MySQL columns (such as times) with colons in their default values couldn't
  be roundtripped, fixed  (also in Postgres, but not fixed here.)
- BINARY/VARBINARY columns aren't really binary at all on ancient versions
  of MySQL.  The type.Binary(123) passthrough now always makes BLOBs.
  Removed the short-lived MSBaseBinary.
- Added mysql.get_version_info, given a connectable returns a tuple of server
  version info.
- Backed off on the reflection tests for older versions of MySQL, for now.
2007-05-31 22:56:24 +00:00