summaryrefslogtreecommitdiff
path: root/test/sql/query.py
Commit message (Collapse)AuthorAgeFilesLines
* - unit tests have been migrated from unittest to nose.Mike Bayer2009-06-101-1321/+0
| | | | | See README.unittests for information on how to run the tests. [ticket:970]
* - sqlMike Bayer2009-05-291-15/+0
| | | | | | | | | | | | | | | | - Removed an obscure feature of execute() (including connection, engine, Session) whereby a bindparam() construct can be sent as a key to the params dictionary. This usage is undocumented and is at the core of an issue whereby the bindparam() object created implicitly by a text() construct may have the same hash value as a string placed in the params dictionary and may result in an inappropriate match when computing the final bind parameters. Internal checks for this condition would add significant latency to the critical task of parameter rendering, so the behavior is removed. This is a backwards incompatible change for any application that may have been using this feature, however the feature has never been documented.
* - Further fixes to the "percent signs and spaces in column/tableMike Bayer2009-01-181-20/+37
| | | | | | | | names" functionality. [ticket:1284] - Still doesn't work for PG/MySQL, which unfortunately would require post_process_text() calls all over the place. Perhaps % escaping can be assembled into IdentifierPreparer.quote() since that's where identifier names are received.
* - Improved the methodology to handling percent signs in columnMike Bayer2009-01-141-1/+66
| | | | | | names from [ticket:1256]. Added more tests. MySQL and Postgres dialects still do not issue correct CREATE TABLE statements for identifiers with percent signs in them.
* - mysql, postgres: "%" signs in text() constructs are automatically escaped ↵Mike Bayer2009-01-021-1/+30
| | | | | | | to "%%". Because of the backwards incompatible nature of this change, a warning is emitted if '%%' is detected in the string. [ticket:1267]
* - RowProxy objects can be used in place of dictionary argumentsMike Bayer2008-12-281-2/+25
| | | | sent to connection.execute() and friends. [ticket:935]
* Major refactoring of the MSSQL dialect. Thanks zzzeek.Michael Trier2008-12-221-1/+1
| | | | | | Includes simplifying the IDENTITY handling and the exception handling. Also includes a cleanup of the connection string handling for pyodbc to favor the DSN syntax.
* - _execute_clauseelement() goes back to beingMike Bayer2008-12-171-3/+3
| | | | | | | | | | | | | | | | a private method. Subclassing Connection is not needed now that ConnectionProxy is available. - tightened the interface for the various _execute_XXX() methods to reduce ambiguity - __distill_params() no longer creates artificial [{}] entry, blank dict is no longer passed through to do_execute() in any case unless explicitly sent from the outside as in connection.execute("somestring"), {}) - fixed a few old sql.query tests which were doing that - removed needless do_execute() from mysql dialect - fixed charset param not properly being sent to _compat_fetchone() in mysql
* Modified fails_on testing decorator to take a reason for the failure.Michael Trier2008-12-121-16/+20
| | | | | This should assist with helping to document the reasons for testing failures. Currently unspecified failures are defaulted to 'FIXME: unknown'.
* Global propigate -> propagate change to correct spelling. Additionally found ↵Michael Trier2008-11-091-1/+1
| | | | a couple of insures that should be ensure.
* Corrected a lot of mssql limit / offset issues. Also ensured that mssql uses ↵Michael Trier2008-11-081-4/+6
| | | | the IN / NOT IN syntax when using a binary expression with a subquery.
* - fixed some oracle unit tests in test/sql/Mike Bayer2008-10-241-1/+1
| | | | | - wrote a docstring for oracle dialect, needs formatting perhaps - made FIRST_ROWS optimization optional based on optimize_limits=True, [ticket:536]
* Corrected the is_subquery() check based on recent changes. Excluded the ↵Michael Trier2008-10-211-1/+1
| | | | test_in_filtering_advanced test for mssql.
* Slightly changed behavior of IN operator for comparing to empty collections. ↵Ants Aasma2008-10-201-1/+8
| | | | Now results in inequality comparison against self. More portable, but breaks with stored procedures that aren't pure functions.
* Unless I'm missing something mssql doesn't support and / or within column ↵Michael Trier2008-10-161-0/+1
| | | | selects. Even using the case when syntax it's not possible to test truth in this manner.
* - Bind params now subclass ColumnElement which allows them to beMike Bayer2008-09-091-4/+1
| | | | | | | | | | | 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
* - The exists() construct won't "export" its contained listMike Bayer2008-09-081-0/+20
| | | | | | | | | 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]
* - limit/offset no longer uses ROW NUMBER OVER to limit rows,Mike Bayer2008-09-031-25/+69
| | | | | | and instead uses subqueries in conjunction with a special Oracle optimization comment. Allows LIMIT/OFFSET to work in conjunction with DISTINCT. [ticket:536]
* - compiler visit_label() checks a flag "within_order_by" and will render its ↵Mike Bayer2008-08-031-0/+32
| | | | | | | | | | | | | | | | | | | 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]
* Corrected Firebird failure reasonsLele Gaifax2008-05-151-7/+7
|
* - Removed @unsupportedJason Kirtland2008-05-141-18/+18
|
* Columns now have default= and server_default=. PassiveDefault fades away.Jason Kirtland2008-05-141-3/+3
|
* Tag some tests that fail under FirebirdLele Gaifax2008-05-131-2/+3
|
* Test suite modernization in progress. Big changes:Jason Kirtland2008-05-091-10/+32
| | | | | | | | | | | - @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
* r4695 merged to trunk; trunk now becomes 0.5.Mike Bayer2008-05-091-3/+3
| | | | 0.4 development continues at /sqlalchemy/branches/rel_0_4
* refactor of default_paramstyle, use paramstyle argument on Dialect to changeMatt Harrison2008-04-071-1/+1
|
* - fixed bug in result proxy where anonymously generatedMike Bayer2008-02-141-3/+17
| | | | | column labels would not be accessible using their straight string name
* - updated the naming scheme of the base test classes in test/testlib/testing.py;Mike Bayer2008-02-111-4/+4
| | | | | tests extend from either TestBase or ORMTest, using additional mixins for special assertion methods as needed
* - implemented RowProxy.__ne__ [ticket:945], thanks knutroyJason Kirtland2008-01-311-0/+14
| | | | - test coverage for same
* - testbase is gone, replaced by testenvJason Kirtland2008-01-121-22/+22
| | | | | | - 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
* - added "ilike()" operator to column operations.Mike Bayer2008-01-111-13/+26
| | | | | compiles to ILIKE on postgres, lower(x) LIKE lower(y) on all others [ticket:727]
* Reworked r4042- undeclared deprecation warnings are now *fatal* to tests. ↵Jason Kirtland2008-01-101-1/+1
| | | | No surprises.
* correction...Jason Kirtland2007-12-141-1/+1
|
* try to bang mysql tests to workMike Bayer2007-12-141-1/+1
|
* - Removed @testing.supported. Dialects in development or maintained outsideJason Kirtland2007-12-131-65/+3
| | | | | | | | | | | 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__.
* Disabled some tests with INTERSECT, not handled by FirebirdLele Gaifax2007-12-121-6/+6
|
* fix to unique bind params, you *can* use the same unique bindparam multiple ↵Mike Bayer2007-12-071-8/+4
| | | | | | | times in a statement. the collision check is strictly detecting non-unique's that happen to have the same name.
* - generation of "unique" bind parameters has been simplified to use the sameMike Bayer2007-12-061-0/+19
| | | | | | | | | | "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'})
* - basic framework for generic functions, [ticket:615]Mike Bayer2007-12-051-89/+0
| | | | | | | - 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.
* - column labels in the form "tablename.columname", i.e. with a dot, are nowMike Bayer2007-11-271-0/+5
| | | | supported.
* added a test to validate ResultProxy truncation behaviorMike Bayer2007-11-271-0/+7
|
* - identified some cases where Alias needs to be cloned; but still cant cloneMike Bayer2007-11-081-0/+1
| | | | | | 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
* Migrated maxdb behavioral assumptions from unsupported to fails_onJason Kirtland2007-11-051-90/+92
|
* - merged factor_down_bindparams branch.Mike Bayer2007-11-011-1/+2
| | | | | | - 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.
* - Added initial version of MaxDB dialect.Jason Kirtland2007-10-231-10/+18
| | | | - All optional test Sequences are now optional=True
* change the in_ API to accept a sequence or a selectable [ticket:750]Ants Aasma2007-10-161-15/+15
|
* - Fixed SQL compiler's awareness of top-level column labels as usedMike Bayer2007-10-161-1/+12
| | | | | | | | | | 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.
* Fixed a couple of typos & hardened against future similar errors.Jason Kirtland2007-10-161-62/+62
|
* More ORDER BY, now with use_labels.Jason Kirtland2007-10-121-33/+45
|
* - Added small DESC exercise to test_order_by.Jason Kirtland2007-10-121-0/+14
|