Commit Graph

366 Commits

Author SHA1 Message Date
Mike Bayer 223bd3688d oracle doesnt seem to like CLOB in unions.... 2008-10-18 17:45:04 +00:00
Mike Bayer 1127b10b27 - "not equals" comparisons of simple many-to-one relation
to an instance will not drop into an EXISTS clause
and will compare foreign key columns instead.

- removed not-really-working use cases of comparing
a collection to an iterable.  Use contains() to test
for collection membership.

- Further simplified SELECT compilation and its relationship
to result row processing.

- Direct execution of a union() construct will properly set up
result-row processing. [ticket:1194]
2008-10-18 17:34:52 +00:00
Michael Trier fc35f5b6e0 Unless I'm missing something mssql doesn't support and / or within column selects. Even using the case when syntax it's not possible to test truth in this manner. 2008-10-16 17:14:30 +00:00
Michael Trier 41e1f5526c Removed the visit_function stuff in mssql dialect. Added some tests for the function overrides. Fixed up the test_select in the sql/defaults.py tests which was a mess. 2008-10-11 16:14:20 +00:00
Michael Trier b3c39decc1 Correction of mssql schema reflection in reflectable. Still a problem since the assumed default is dbo, whereas it could be modified by the connection. Allows SchemaTest.test_select to pass now. 2008-10-11 16:14:07 +00:00
Michael Trier cba429c0bc Change in #1165 tests to prevent MySQL from choking on a varchar without a length. 2008-10-04 23:46:02 +00:00
Mike Bayer f487169777 - added a few more assertions for [ticket:1165]
- removed non-2.5 partial.keywords, partial.name, etc., not sure what those are getting us here
2008-10-04 16:09:16 +00:00
Michael Trier dc5f360cd3 Didnt think about <2.5. When will I learn. 2008-10-04 02:57:19 +00:00
Michael Trier 56e88ed7c3 Allowed column types to be callables. Fixes #1165. 2008-10-04 01:49:14 +00:00
Mike Bayer 8d2fd5f87a - Overhauled SQLite date/time bind/result processing
to use regular expressions and format strings, rather
than strptime/strftime, to generically support
pre-1900 dates, dates with microseconds.  [ticket:968]
2008-09-19 22:59:28 +00:00
Mike Bayer d47a469732 - version bump
- turned properties in sql/expressions.py to @property
- column.in_(someselect) can now be used as
a columns-clause expression without the subquery
bleeding into the FROM clause [ticket:1074]
2008-09-16 18:17:34 +00:00
Mike Bayer 01de711098 - 0.5.0rc1
- removed unneeded grouping from BooleanClauseList, generated needless parens
2008-09-11 20:48:39 +00:00
Mike Bayer 3b724ae1cc - Bind params now subclass ColumnElement which allows them to be
selectable by orm.query (they already had most ColumnElement
semantics).

- Added select_from() method to exists() construct, which becomes
more and more compatible with a regular select().

- Bind parameters/literals given a True/False value will detect
their type as Boolean
2008-09-09 15:54:10 +00:00
Mike Bayer e158234478 - The exists() construct won't "export" its contained list
of elements as FROM clauses, allowing them to be used more
effectively in the columns clause of a SELECT.

- and_() and or_() now generate a ColumnElement, allowing
boolean expressions as result columns, i.e.
select([and_(1, 0)]).  [ticket:798]
2008-09-08 22:50:37 +00:00
Mike Bayer 58c5bb7fc1 - Added func.min(), func.max(), func.sum() as "generic functions",
which basically allows for their return type to be determined
automatically.  Helps with dates on SQLite, decimal types,
others. [ticket:1160]

- added decimal.Decimal as an "auto-detect" type; bind parameters
and generic functions will set their type to Numeric when a
Decimal is used.
2008-09-08 03:51:47 +00:00
Mike Bayer 36570c6595 - Dropped 0.3-compatibility for user defined types
(convert_result_value, convert_bind_param).
2008-09-07 00:13:28 +00:00
Mike Bayer 9eafb43c0f - limit/offset no longer uses ROW NUMBER OVER to limit rows,
and instead uses subqueries in conjunction with a special
      Oracle optimization comment.  Allows LIMIT/OFFSET to work
      in conjunction with DISTINCT. [ticket:536]
2008-09-03 16:53:05 +00:00
Mike Bayer 6f60e76883 - The 'length' argument to all Numeric types has been renamed
to 'scale'.  'length' is deprecated and is still accepted
with a warning. [ticket:827]
- The 'length' argument to MSInteger, MSBigInteger, MSTinyInteger,
MSSmallInteger and MSYear has been renamed to 'display_width'.
[ticket:827]
- mysql._Numeric now consumes 'unsigned' and 'zerofill' from
the given kw, so that the same kw can be passed along to Numeric
and allow the 'length' deprecation logic to still take effect
- added testlib.engines.all_dialects() to return a dialect for
every db module
- informix added to sqlalchemy.databases.__all__.  Since other
"experimental" dbs like access and sybase are there, informix
should be as well.
2008-08-24 19:52:54 +00:00
Mike Bayer 665cd4d36a - Temporarily rolled back the "ORDER BY" enhancement
from [ticket:1068].  This feature is on hold
pending further development.
2008-08-06 15:46:31 +00:00
Mike Bayer edf6b16fae - compiler visit_label() checks a flag "within_order_by" and will render its own name
and not its contained expression, if the dialect reports true for supports_simple_order_by_label.
the flag is not propagated forwards, meant to closely mimic the syntax Postgres expects which is
that only a simple name can be in the ORDER BY, not a more complex expression or function call
with the label name embedded (mysql and sqlite support more complex expressions).

This further sets the standard for propigation of **kwargs within compiler, that we can't just send
**kwargs along blindly to each XXX.process() call; whenever a **kwarg needs to propagate through,
most methods will have to be aware of it and know when they should send it on forward and when not.
This was actually already the case with result_map as well.

The supports_simple_order_by dialect flag defaults to True but is conservatively explicitly set to
False on all dialects except SQLite/MySQL/Postgres to start.

[ticket:1068]
2008-08-03 21:19:32 +00:00
Jason Kirtland b403f156fe - func.count() with no argument emits COUNT(*) 2008-07-24 21:36:16 +00:00
Jason Kirtland b155b60280 - Spiffed up the deprecated decorators & @flipped 'em up top 2008-07-16 17:34:41 +00:00
Jason Kirtland 8b12c8f1c2 - Removed 2.3 Decimal compat 2008-07-15 19:40:08 +00:00
Jason Kirtland 8fa48edbf9 - Removed 2.3 set emulations/enhancements.
(sets.Set-based collections & DB-API returns still work.)
2008-07-15 19:23:52 +00:00
Mike Bayer deaff3e97f - Fixed bug when calling select([literal('foo')])
or select([bindparam('foo')]).
2008-07-15 15:04:43 +00:00
Mike Bayer 45a2b0fedf possible fix for MS-SQL version of match() test, but the real solution here may be to have the correct default paramstyle set up on the MS-SQL dialect. 2008-07-14 19:39:50 +00:00
Michael Trier f899157ca9 Added new basic match() operator that performs a full-text search. Supported on PostgreSQL, SQLite, MySQL, MS-SQL, and Oracle backends. 2008-07-13 04:45:37 +00:00
Mike Bayer f3a9acc7e2 merge r4889, SQLite Float type, from 0.4 branch 2008-07-02 18:29:36 +00:00
Mike Bayer 8c1f08c8aa merged r4870 from 0.4 branch, index name truncation, [ticket:820] 2008-06-22 17:52:13 +00:00
Mike Bayer b2b754c2ce - merged r4868, disallow overly long names from create/drop, from 0.4 branch, [ticket:571] 2008-06-22 16:56:16 +00:00
Jason Kirtland 18a31d0316 - Quick cleanup of defaults.py. The main DefaultTest is still a mess. 2008-05-20 00:14:51 +00:00
Jason Kirtland 8e9fce417a Split out a couple true autoincrement/identity tests from emulated-with-sequences autoincrement=True tests. 2008-05-19 23:15:41 +00:00
Mike Bayer b3102a097a - changed char_length() to use a fake, neutral "generic function"
- assert_compile() reports the dialect in use
2008-05-19 22:46:14 +00:00
Mike Bayer 07496da9b5 - added some help for a heavily flush-order-dependent test
- quote flag propagates to _Label, [ticket:1045]
2008-05-16 22:10:04 +00:00
Jason Kirtland f7cc199d37 Don't blat Table.quote= when resolving foreign keys. 2008-05-15 16:20:50 +00:00
Lele Gaifax d044346a3c Corrected Firebird failure reasons 2008-05-15 00:18:58 +00:00
Jason Kirtland dd20ca5cb9 - Removed @unsupported 2008-05-14 22:09:23 +00:00
Jason Kirtland 65f4f02ec8 Columns now have default= and server_default=. PassiveDefault fades away. 2008-05-14 19:49:40 +00:00
Lele Gaifax 78c9603af4 Tag some tests that fail under Firebird 2008-05-13 09:06:27 +00:00
Mike Bayer e02114ce49 - clause adaption hits _raw_columns of a select() (though no ORM tests need this feature currently)
- broke up adapter chaining in eagerload, erroneous "wrapping" in row_decorator.  column_property() subqueries are now affected only by the ORMAdapter for that mapper.  fixes [ticket:1037], and may possibly impact some of [ticket:949]
2008-05-12 16:15:28 +00:00
Lele Gaifax 52c965a188 Tagged two tests that fail under Firebird 2008-05-12 10:10:21 +00:00
Mike Bayer d3621ae961 - fixed a fairly critical bug in clause adaption/corresponding column in conjunction with annotations
- implicit order by is removed, modified many tests to explicitly set ordering, probably many more to go
once it hits the buildbot.
2008-05-09 23:58:30 +00:00
Jason Kirtland e41c0f4107 Test suite modernization in progress. Big changes:
- @unsupported now only accepts a single target and demands a reason
   for not running the test.
 - @exclude also demands an exclusion reason
 - Greatly expanded @testing.requires.<feature>, eliminating many
   decorators in the suite and signficantly easing integration of
   multi-driver support.
 - New ORM test base class, and a featureful base for mapped tests
 - Usage of 'global' for shared setup going away, * imports as well
2008-05-09 20:26:09 +00:00
Mike Bayer 84ec085d47 MSText no longer implicitly creates TEXT for string with no length
(this actually allows CAST (foo, VARCHAR) to render too)
2008-05-09 19:00:55 +00:00
Mike Bayer 4a6afd469f r4695 merged to trunk; trunk now becomes 0.5.
0.4 development continues at /sqlalchemy/branches/rel_0_4
2008-05-09 16:34:10 +00:00
Mike Bayer 538861143f - _Label adds itself to the proxy collection so that it works in correspoinding column. fixes some eager load with column_property bugs.
- this partially fixes some issues in [ticket:1022] but leaving the "unlabeled" fix for 0.5 for now
2008-05-06 00:55:49 +00:00
Mike Bayer 5932e8649d - an unfortunate naming conflict
- needed sql import on and()
2008-05-02 01:15:26 +00:00
Mike Bayer e3460573d0 - factored out the logic used by Join to create its join condition
- With declarative, joined table inheritance mappers use a slightly relaxed
function to create the "inherit condition" to the parent
table, so that other foreign keys to not-yet-declared
Table objects don't trigger an error.
2008-05-02 01:02:23 +00:00
Mike Bayer 3560379ff7 fix order by for MySQL environment 2008-04-26 20:18:31 +00:00
Mike Bayer f3bcc15c5c - improved behavior of text() expressions when used as
FROM clauses, such as select().select_from(text("sometext"))
[ticket:1014]
- removed _TextFromClause; _TextClause just adds necessary FromClause descriptors
at the class level
2008-04-26 16:34:14 +00:00