Commit Graph

567 Commits

Author SHA1 Message Date
Mike Bayer 7dcfc49b34 fix test 2010-06-24 12:45:37 -04:00
Mike Bayer 87664ce88a - The argument to "ESCAPE" of a LIKE operator or similar
is passed through render_literal_value(), which may
implement escaping of backslashes.  [ticket:1400]
- Postgresql render_literal_value() is overridden which escapes
backslashes, currently applies to the ESCAPE clause
of LIKE and similar expressions.
Ultimately this will have to detect the value of
"standard_conforming_strings" for full behavior.
[ticket:1400]
- MySQL render_literal_value() is overridden which escapes
backslashes, currently applies to the ESCAPE clause
of LIKE and similar expressions.   This behavior
is derived from detecting the value of
NO_BACKSLASH_ESCAPES.  [ticket:1400]
2010-06-24 12:19:15 -04:00
Mike Bayer 77c3bb26c2 - Firebird dialect adds CHAR, VARCHAR types which
accept a "charset" flag, to support Firebird
"CHARACTER SET" clause.  [ticket:1813]
2010-06-19 13:51:55 -04:00
Mike Bayer 33f6dcc80b - Modified the internals of "column annotation" such that
a custom Column subclass can safely override
_constructor to return Column, for the purposes of
making "configurational" column classes that aren't
involved in proxying, etc.
2010-06-14 19:39:26 -04:00
Mike Bayer 4881873c6b fix the enum for MySQL after native_enum added to adaption keys 2010-06-09 18:27:43 -04:00
Mike Bayer 85f9619b03 - Fixed bug in Enum type which blew away native_enum
flag when used with TypeDecorators or other adaption
scenarios.
2010-06-08 19:25:15 -04:00
Mike Bayer 035ec314f6 - Fixed concatenation of constraints when "PRIMARY KEY"
constraint gets moved to column level due to SQLite
AUTOINCREMENT keyword being rendered.  [ticket:1812]
- remove some extra space in between constraint DDL
- added alias() to binary comparison test, fixing pg + mysql failures
2010-05-27 14:46:44 -04:00
Mike Bayer b086f9a815 - Re-established support for Oracle 8 with cx_oracle,
including that use_ansi is set to False automatically,
NVARCHAR2 and NCLOB are not rendered for Unicode,
"native unicode" check doesn't fail, cx_oracle
"native unicode" mode is disabled, VARCHAR() is emitted
with bytes count instead of char count. [ticket:1808]
2010-05-27 13:02:17 -04:00
Mike Bayer 6033b07409 - Columns of _Binary type (i.e. LargeBinary, BLOB, etc.)
will coerce a "basestring" on the right side into a
_Binary as well so that required DBAPI processing
takes place.
2010-05-22 19:08:48 -04:00
Mike Bayer 0a8f2207f0 - func.XXX() doesn't inadvertently resolve to non-Function
classes (e.g. fixes func.text()).  [ticket:1798]
2010-05-13 15:26:53 -04:00
Mike Bayer 074ecc4376 - expr.in_() now accepts a text() construct as the argument.
Grouping parenthesis are added automatically, i.e. usage
is like `col.in_(text("select id from table"))`.
[ticket:1793]
2010-05-08 16:25:30 -04:00
Mike Bayer 7b86a06d2d - Fixed errant space character when generating ADD CONSTRAINT
for a named UNIQUE constraint.
2010-04-26 00:11:22 -04:00
Mike Bayer ae495c69ad - Fixed bug that prevented implicit RETURNING from functioning
properly with composite primary key that contained zeroes.
[ticket:1778]
2010-04-22 11:24:25 -04:00
Mike Bayer 38d6c31a29 fix metadata import 2010-04-21 09:30:30 -04:00
Mike Bayer b437bb2132 some more metadata cleanup since --dropall isnt specified on the buildbot 2010-04-16 15:24:56 -04:00
Mike Bayer 1a352c69f9 do a check on this one to fix the buildbot 2010-04-16 14:13:13 -04:00
Mike Bayer 67878d13ed - Fixed an error in expression typing which caused an endless
loop for expressions with two NULL types.
2010-04-06 11:39:09 -04:00
Mike Bayer eefdbd3757 - Now using cx_oracle output converters so that the
DBAPI returns natively the kinds of values we prefer:
- NUMBER values with positive precision + scale convert
to cx_oracle.STRING and then to Decimal.   This
allows perfect precision for the Numeric type when
using cx_oracle.  [ticket:1759]
- STRING/FIXED_CHAR now convert to unicode natively.
SQLAlchemy's String types then don't need to
apply any kind of conversions.
2010-04-03 15:33:55 -04:00
Mike Bayer efa88d4af9 branch merge 2010-04-03 11:00:19 -04:00
Mike Bayer f432bc8fe1 - the Numeric type raises an *enormous* warning when expected
to convert floats to Decimal from a DBAPI that returns floats.
This includes SQLite, Oracle, Sybase, MS-SQL.
[ticket:1759]
2010-04-03 10:58:13 -04:00
Mike Bayer 5c758932a5 - Restored some bind-labeling logic from 0.5 which ensures
that tables with column names that overlap another column
of the form "<tablename>_<columnname>" won't produce
errors if column._label is used as a bind name during
an UPDATE.  Test coverage which wasn't present in 0.5
has been added.  [ticket:1755]
2010-03-31 13:01:40 -04:00
Mike Bayer 5d0d680693 comment out test that relies on dictionary ordering for now 2010-03-27 18:15:05 -04:00
Mike Bayer 36047e9bb2 - Added with_hint() method to Query() construct. This calls
directly down to select().with_hint() and also accepts
entities as well as tables and aliases.  See with_hint() in the
SQL section below. [ticket:921]
- Added with_hint() method to select() construct.  Specify
a table/alias, hint text, and optional dialect name, and
"hints" will be rendered in the appropriate place in the
statement.  Works for Oracle, Sybase, MySQL.  [ticket:921]
2010-03-27 17:18:53 -04:00
Mike Bayer f62bc637a0 this test is too db specific and is covered by dialect tests 2010-03-27 10:51:03 -04:00
Mike Bayer 832d508816 one additional oracle fix 2010-03-26 11:15:25 -04:00
Mike Bayer 6acc9e6d9e - The Oracle dialect will issue VARCHAR type definitions
using character counts, i.e. VARCHAR2(50 CHAR), so that
the column is sized in terms of characters and not bytes.
Column reflection of character types will also use
ALL_TAB_COLUMNS.CHAR_LENGTH instead of
ALL_TAB_COLUMNS.DATA_LENGTH.  Both of these behaviors take
effect when the server version is 9 or higher - for
version 8, the old behaviors are used.  [ticket:1744]
2010-03-25 22:26:11 +00:00
Mike Bayer 1321db6473 - Fixed bug introduced in 0.6beta2 where column labels would
render inside of column expressions already assigned a label.
[ticket:1747]
2010-03-23 20:41:40 -04:00
Mike Bayer 0a556d3220 - Fixed bug in Query whereby the usage of aliased() constructs
would fail if the underlying table (but not the actual alias)
were referenced inside the subquery generated by
q.from_self() or q.select_from().
2010-03-23 14:54:26 -04:00
Mike Bayer eb72838953 - pymssql now works again, expecting at least the 1.0 series. 2010-03-20 11:50:39 -04:00
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