Commit Graph

91 Commits

Author SHA1 Message Date
Michael Trier 4cd99f5536 Global propigate -> propagate change to correct spelling. Additionally found a couple of insures that should be ensure. 2008-11-09 01:53:08 +00:00
Michael Trier 8924a0e4fe Corrected a lot of mssql limit / offset issues. Also ensured that mssql uses the IN / NOT IN syntax when using a binary expression with a subquery. 2008-11-08 04:43:35 +00:00
Mike Bayer 3bbf8037f8 - fixed some oracle unit tests in test/sql/
- wrote a docstring for oracle dialect, needs formatting perhaps
- made FIRST_ROWS optimization optional based on optimize_limits=True, [ticket:536]
2008-10-24 15:58:17 +00:00
Michael Trier 00cec7c088 Corrected the is_subquery() check based on recent changes. Excluded the test_in_filtering_advanced test for mssql. 2008-10-21 02:46:43 +00:00
Ants Aasma 11619ad8ee Slightly changed behavior of IN operator for comparing to empty collections. Now results in inequality comparison against self. More portable, but breaks with stored procedures that aren't pure functions. 2008-10-20 20:41:09 +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
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 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 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
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
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 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
Matt Harrison fdb9440d2e refactor of default_paramstyle, use paramstyle argument on Dialect to change 2008-04-07 22:42:28 +00:00
Mike Bayer 84485fb7bb - fixed bug in result proxy where anonymously generated
column labels would not be accessible using their straight
string name
2008-02-14 18:22:47 +00:00
Mike Bayer c0b5a0446b - updated the naming scheme of the base test classes in test/testlib/testing.py;
tests extend from either TestBase or ORMTest, using additional mixins for
special assertion methods as needed
2008-02-11 00:28:39 +00:00
Jason Kirtland e13fdb965f - implemented RowProxy.__ne__ [ticket:945], thanks knutroy
- test coverage for same
2008-01-31 04:49:31 +00:00
Jason Kirtland 17d3c8764e - testbase is gone, replaced by testenv
- Importing testenv has no side effects- explicit functions provide similar behavior to the old immediate behavior of testbase
- testing.db has the configured db
- Fixed up the perf/* scripts
2008-01-12 22:03:42 +00:00
Mike Bayer 6d2d5e923e - added "ilike()" operator to column operations.
compiles to ILIKE on postgres, lower(x) LIKE lower(y)
on all others [ticket:727]
2008-01-11 21:24:01 +00:00
Jason Kirtland bf36c648f2 Reworked r4042- undeclared deprecation warnings are now *fatal* to tests. No surprises. 2008-01-10 02:37:39 +00:00
Jason Kirtland f44a7f6ae9 correction... 2007-12-14 10:30:14 +00:00
Mike Bayer 1694e33838 try to bang mysql tests to work 2007-12-14 06:29:31 +00:00
Jason Kirtland 8128a6378a - Removed @testing.supported. Dialects in development or maintained outside
the tree can now run the full suite of tests out of the box.
- Migrated most @supported to @fails_on, @fails_on_everything_but, or (last
  resort) @unsupported.  @fails_on revealed a slew of bogus test skippage,
  which was corrected.
- Added @fails_on_everything_but.  Yes, the first usage *was*
  "fails_on_everything_but('postgres')".  How did you guess!
- Migrated @supported in dialect/* to the new test-class attribute __only_on__.
- Test classes can also have __unsupported_on__ and __excluded_on__.
2007-12-13 09:59:14 +00:00
Lele Gaifax 2522534311 Disabled some tests with INTERSECT, not handled by Firebird 2007-12-12 23:06:22 +00:00
Mike Bayer 7bf90e2f4d fix to unique bind params, you *can* use the same unique bindparam multiple times
in a statement.  the collision check is strictly detecting non-unique's that happen to have
the same name.
2007-12-07 16:47:00 +00:00
Mike Bayer 541b6772e9 - generation of "unique" bind parameters has been simplified to use the same
"unique identifier" mechanisms as everything else.  This doesn't affect
user code, except any code that might have been hardcoded against the generated
names.  Generated bind params now have the form "<paramname>_<num>",
whereas before only the second bind of the same name would have this form.

- bindparam() objects themselves can be used as keys for execute(), i.e.
statement.execute({bind1:'foo', bind2:'bar'})
2007-12-06 22:23:10 +00:00
Mike Bayer 238c2c8dbe - basic framework for generic functions, [ticket:615]
- changed the various "literal" generation functions to use an anonymous
bind parameter.  not much changes here except their labels now look
like ":param_1", ":param_2" instead of ":literal"
- from_obj keyword argument to select() can be a scalar or a list.
2007-12-05 03:07:21 +00:00
Mike Bayer 3f6e94e818 - column labels in the form "tablename.columname", i.e. with a dot, are now
supported.
2007-11-27 16:57:56 +00:00
Mike Bayer 65abc78010 added a test to validate ResultProxy truncation behavior 2007-11-27 16:13:45 +00:00
Mike Bayer 7a25be0f42 - identified some cases where Alias needs to be cloned; but still cant clone
when its an alias of a Table; added some test coverage for one particular
case from the doctests
- fixed "having" example in doctests, updated eager load example
2007-11-08 00:26:23 +00:00
Jason Kirtland bcb586a93c Migrated maxdb behavioral assumptions from unsupported to fails_on 2007-11-05 22:11:30 +00:00
Mike Bayer 66cd772094 - merged factor_down_bindparams branch.
- removed ClauseParameters object; compiled.params returns a regular dictionary
  now, as well as result.last_inserted_params()/last_updated_params().
- various code trimming, method removals.
2007-11-01 03:58:21 +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
Ants Aasma 6bbc7dd157 change the in_ API to accept a sequence or a selectable [ticket:750] 2007-10-16 22:57:05 +00:00
Mike Bayer 9b22fc0a9b - Fixed SQL compiler's awareness of top-level column labels as used
in result-set processing; nested selects which contain the same column
  names don't affect the result or conflict with result-column metadata.

- query.get() and related functions (like many-to-one lazyloading)
  use compile-time-aliased bind parameter names, to prevent
  name conflicts with bind parameters that already exist in the
  mapped selectable.
2007-10-16 16:03:59 +00:00
Jason Kirtland 9226871456 Fixed a couple of typos & hardened against future similar errors. 2007-10-16 01:17:39 +00:00
Jason Kirtland 833503ed23 More ORDER BY, now with use_labels. 2007-10-12 18:08:11 +00:00
Jason Kirtland df929d364d - Added small DESC exercise to test_order_by. 2007-10-12 17:46:42 +00:00
Jason Kirtland d174b3bd72 Added query coverage for ORDER BY over regular, aliased and DISTINCT columns. 2007-10-11 22:21:33 +00:00
Jason Kirtland 14563004a4 - Expanded JoinTest further, exercising joins the ORM depends on explicitly
in the 'sql' tests.
2007-10-10 20:42:58 +00:00
Mike Bayer ddf875dd0c - initial sybase support checkin, [ticket:785] 2007-10-10 15:19:28 +00:00
Jason Kirtland 2b084b76c0 - Expanded the outer join tests, now covering a situation that looked like it would be wonky in oracle. 2007-10-08 03:31:52 +00:00
Jason Kirtland afa713d9e8 - Loosened up test_cant_execute_join for oracle (probably) + bonus typo fix
- Some docstring formatting waiting for pg to finish the tests...  waiting...
2007-10-08 03:01:04 +00:00
Jason Kirtland 849743acac - Added some outerjoin() execution exercises to the query tests. 2007-10-08 02:17:07 +00:00
Jason Kirtland 585b425850 - Squashed assumption of transparent type coercion support in defaults test 2007-10-07 21:57:42 +00:00
Jason Kirtland a014d289f6 - Tweaked unordered select tests to not be sensitive to result set order, also split apart some tests (aliases) that sapdb has problems with. 2007-10-07 02:01:49 +00:00
Roger Demetrescu 11c70f9d8d Firebird dialect now uses SingletonThreadPool as its poolclass.
(this fixes all "unsuccessful metadata update\n  object XXXXX is in use" test errors)

Minor fixes in tests
2007-10-07 00:06:05 +00:00