Commit Graph

538 Commits

Author SHA1 Message Date
Mike Bayer 0f55ef3bea rename test_select to test_compiler 2010-03-19 15:32:17 -04:00
Mike Bayer c6fbff56a3 - join() will now simulate a NATURAL JOIN by default. Meaning,
if the left side is a join, it will attempt to join the right
side to the rightmost side of the left first, and not raise
any exceptions about ambiguous join conditions if successful
even if there are further join targets across the rest of
the left.  [ticket:1714]
2010-03-19 15:30:48 -04:00
Mike Bayer 17b616236e nobody expects the insanely significant decimal 2010-03-19 16:35:31 +00:00
Mike Bayer 7de2b6923f - get firebird on board
- a lot of these drivers suck at decimals, not sure what to do
2010-03-19 12:30:22 -04:00
Mike Bayer e2807dcd36 make this test slightly easier, SQLite + win32 appears to not like it otherwise 2010-03-19 11:04:45 -05:00
Mike Bayer 32f8a11153 still poking at numerics 2010-03-19 11:55:59 -04:00
Mike Bayer 7a8f05d435 distinguish between small, large, and many significant digits. the irony
that oracle and sybase are the ones that have the most issues with decimal numbers.
2010-03-19 11:45:42 -04:00
Mike Bayer bb45ff1dbb - the string approach appears to be necessary for large numbers, however.
Don't know how to get large decimals through to Sybase.
2010-03-19 11:35:32 -04:00
Mike Bayer b2c2f58d98 some more tests. unfortunately i cant run them here since my osx freetds/pyodbc is hosed 2010-03-18 21:28:54 -04:00
Mike Bayer c8dfb3540a - normalize sybase version numbers
- sybase has 255 identifier length on 15, 30 earlier
2010-03-18 16:07:48 -04:00
Mike Bayer 6238032c8d - oracle needs a filter for this test
- oracle outparam test reveals usage of numeric proc with scale==None
2010-03-18 19:47:33 +00:00
Mike Bayer 9aa0868a41 clean up NumericTest to use a consistent one column at a time system 2010-03-18 15:34:09 -04:00
Brad Allen e9df4ff45a Merged from main tip. 2010-03-18 11:20:45 -06:00
Brad Allen b7f0b5b2c2 per zzzeek, for mssql+mxodbc, disabled test.sql.test_query.QueryTest.test_bind_in 2010-03-18 11:14:46 -06:00
Mike Bayer fc2f095c65 cx_oracle adjust 2010-03-18 16:10:29 +00:00
Mike Bayer 03965285a2 adjustment for pysybase 2010-03-18 16:08:39 +00:00
Mike Bayer 77fa087d15 turning the decimals to floats allows the E notation to work with sybase+pyodbc for small E notations 2010-03-18 12:05:20 -04:00
Mike Bayer 074cab9e7d - moved most Decimal bind/result handling into types.py, out of sqlite, mysql dialects.
- added an explicit test for [ticket:1216]
- some questions remain about MSSQL - would like to simplify/remove bind handling for numerics
2010-03-18 11:48:24 -04:00
Brad Allen 2282a4b8af Merge 2010-03-18 08:53:06 -06:00
Mike Bayer b6b4f60e74 some ms fixes 2010-03-17 22:33:08 -04:00
Brad Allen 87c50f2aac Because of changes to SQLAlchemy bind parameter placement, removed all mxodbc test disabling statements having this pattern: @testing.crashes('mssql+mxodbc', """Invalid bind parameter placement: 2010-03-17 16:27:39 -06:00
Brad Allen 75e7b1081c merged from main tip 2010-03-17 16:11:45 -06:00
Brad Allen e6a7f1ce0c Merged from main tip, and resolved conflicts in mxodbc dialect and connector. 2010-03-17 16:06:42 -06:00
Mike Bayer 95c0214356 working through syb capabilities 2010-03-17 17:29:35 -04:00
Mike Bayer 318f47dc80 - added pyodbc for sybase driver.
- generalized the "freetds" / "unicode statements" behavior of MS-SQL/pyodbc
into the base Pyodbc connector, as this seems to apply to Sybase as well.
- generalized the python-sybase "use autocommit for DDL" into the pyodbc
connector.  With pyodbc, the "autocommit" flag on connection is used,
as Pyodbc seems to have more database conversation than python-sybase that
can't otherwise be suppressed.
- Some platforms will now interpret certain literal values
as non-bind parameters, rendered literally into the SQL
statement.   This to support strict SQL-92 rules that are
enforced by some platforms including MS-SQL and Sybase.
In this model, bind parameters aren't allowed in the
columns clause of a SELECT, nor are certain ambiguous
expressions like "?=?".  When this mode is enabled, the base
compiler will render the binds as inline literals, but only across
strings and numeric values.  Other types such as dates
will raise an error, unless the dialect subclass defines
a literal rendering function for those.  The bind parameter
must have an embedded literal value already or an error
is raised (i.e. won't work with straight bindparam('x')).
Dialects can also expand upon the areas where binds are not
accepted, such as within argument lists of functions
(which don't work on MS-SQL when native SQL binding is used).
2010-03-17 15:15:44 -04:00
Brad Allen d6b5550f42 Disabling tests for mssql+mxodbc where mxODBC cursor.execute chokes on invalid placement of bind parameter "?" within the SQL statement. 2010-03-16 16:57:54 -06:00
Mike Bayer 811ece1397 - The except_() method now renders as MINUS on Oracle,
which is more or less equivalent on that platform.
[ticket:1712]
2010-03-16 22:38:18 +00:00
Mike Bayer b3ba365eea fix failing test due to sybase paramstyle 2010-03-14 19:50:50 -04:00
Philip Jenvey 09dc52c03d tweak to take advantage of returning support in executemany 2010-03-12 19:01:59 -08:00
Philip Jenvey 7ea254ea7a disable interval tests on oracle+zxjdbc for now, and also test_fk_nonpassive 2010-03-12 17:50:33 -08:00
Mike Bayer 1b16954864 - introduce an optimizing type _NativeUnicodeMixin to oracle plus supporting
changes to Enum/SchemaType to re-support adaptation of string types.
This approach can be adapted by "conditional" unicode returning dialects
(i.e. pyodbc and possibly mxodbc) to remove the overhead
of isinstance(value, unicode) calls when the dialect returned type is
of dbapi.UNICODE, dbapi.NVARCHAR, etc.
2010-03-12 18:30:38 +00:00
Mike Bayer b4f1fbc708 think I came across a syntactical weirdism there 2010-03-11 22:38:15 -05:00
Mike Bayer e66ca9edd5 adding windows-appropriate levels of pain to unicode handling 2010-03-11 22:10:25 -05:00
Mike Bayer 7c8942d4eb Added a non-freetds specific exclusion for pyodbc 2010-03-11 21:23:25 -05:00
Mike Bayer 30327525de this resolves the returning failures from #1733 2010-03-11 21:36:03 +00:00
Mike Bayer b763015642 re-enable these tests 2010-03-11 21:34:13 +00:00
Mike Bayer ec0fafc7b0 added better typing for integer expressions, since integer is implementing _DateAffinity 2010-03-11 16:18:37 -05:00
Mike Bayer 3254699f85 force an oracle test to pass. this is as usual an extremely fringy test for a feature nobody should be using normally. 2010-03-11 18:52:02 +00:00
Mike Bayer ee8eea4101 these fail for unknown reasons. Seems to be potentially VARCHAR used with RETURNING, or out params, not sure. 2010-03-11 18:39:15 +00:00
Mike Bayer 47f7b6f68e fix this test for oracle so all types return datetime.date 2010-03-11 18:34:27 +00:00
Mike Bayer 9a3a909ed2 this test requires a length for the varchar in mysql/oracle 2010-03-11 18:21:44 +00:00
Mike Bayer 86df449c2b - fixed internal error which would occur if calling has()
or similar complex expression on a single-table inheritance
relation(). [ticket:1731]
2010-03-11 12:07:08 -05:00
Mike Bayer 969c04860f almost there, some tests failing still. 2010-03-09 13:41:43 -05:00
Mike Bayer c3fd9a5536 still thinking about stuff here 2010-03-08 21:15:16 -05:00
Mike Bayer b9cc0ef326 working on getting operators/left hand type awareness into the "bind" coercion. this system has to be figured out somehow 2010-03-08 18:27:35 -05:00
Mike Bayer da1666cc18 - adjusted the literal coercion rules to take the left side's type into account, if it is
compatible with what was found for the right, so that things like oracle CHAR conversions
work.
- oracle dialect specific tests pass again.
2010-03-01 01:00:12 +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 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
Mike Bayer 2d95ef1f25 - the "scale" argument of the Numeric() type is honored when
coercing a returned floating point value into a string
on its way to Decimal - this allows accuracy to function
on SQLite, MySQL.  [ticket:1717]
2010-02-26 17:50:34 +00:00