summaryrefslogtreecommitdiff
path: root/test/sql/test_query.py
Commit message (Collapse)AuthorAgeFilesLines
...
* - [bug] A significant change to how labelingMike Bayer2012-02-051-17/+43
| | | | | | | | | | | | | | is applied to columns in SELECT statements allows "truncated" labels, that is label names that are generated in Python which exceed the maximum identifier length (note this is configurable via label_length on create_engine()), to be properly referenced when rendered inside of a subquery, as well as to be present in a result set row using their original in-Python names. [ticket:2396] - apply pep8 to test_labels
* - adjust the test for [ticket:2377] to be less controversial onMike Bayer2012-01-221-2/+3
| | | | | | problematic backends like Oracle.i - move the check generated in r85017c4310d2 up for both label name/name comparisions, fixes additional mismatches which can occur
* pg8000 fixMike Bayer2012-01-221-1/+1
|
* - [bug] Fixed bug whereby a table-bound ColumnMike Bayer2012-01-221-1/+26
| | | | | | | | | | | object named "<a>_<b>" which matched a column labeled as "<tablename>_<colname>" could match inappropriately when targeting in a result set row. [ticket:2377] - requires that we change the tuple format in RowProxy. Makes an improvement to the cases tested against an unpickled RowProxy as well though doesn't solve the problem there entirely.
* - adjust some tests and such to work better with a mysql 5.5 installMike Bayer2011-10-111-1/+3
| | | | | - Added mysql_length parameter to Index construct, specifies "length" for indexes. [ticket:2293]
* try to get py3k to pass hereMike Bayer2011-06-221-1/+1
|
* fix testMike Bayer2011-06-221-1/+4
|
* - Adjusted the __contains__() method ofMike Bayer2011-06-041-0/+19
| | | | | | | | | a RowProxy result row such that no exception throw is generated internally; NoSuchColumnError() also will generate its message regardless of whether or not the column construct can be coerced to a string. [ticket:2178]. Also in 0.6.8.
* - move all the comments that got shoved below the fixture grabs back upMike Bayer2011-03-271-0/+5
|
* - remove test.sql._base, test.engine._base, test.orm._base, move those ↵Mike Bayer2011-03-271-6/+6
| | | | | | | classes to a new test.lib.fixtures module - move testing.TestBase to test.lib.fixtures - massive search and replace
* - Added accessors to ResultProxy "returns_rows", "is_insert"Mike Bayer2011-03-161-0/+30
| | | | [ticket:2089]
* psycopg2 2.4 no longer accepts % in bind place holdersDenise Govindarajan2011-03-151-0/+2
|
* - Added over() function, method to FunctionElementMike Bayer2011-02-101-0/+9
| | | | | | | | classes, produces the _Over() construct which in turn generates "window functions", i.e. "<window function> OVER (PARTITION BY <partition by>, ORDER BY <order by>)". [ticket:1844]
* - Non-DBAPI errors which occur in the scope of an `execute()`Mike Bayer2011-02-091-4/+4
| | | | | | | | call are now wrapped in sqlalchemy.exc.StatementError, and the text of the SQL statement and repr() of params is included. This makes it easier to identify statement executions which fail before the DBAPI becomes involved. [ticket:2015]
* - A TypeDecorator of Integer can be used with a primary keyMike Bayer2011-01-111-0/+21
| | | | | | | | | | | | | | | | | | | column, and the "autoincrement" feature of various dialects as well as the "sqlite_autoincrement" flag will honor the underlying database type as being Integer-based. [ticket:2005] - Result-row processors are applied to pre-executed SQL defaults, as well as cursor.lastrowid, when determining the contents of result.inserted_primary_key. [ticket:2006] - Bind parameters present in the "columns clause" of a select are now auto-labeled like other "anonymous" clauses, which among other things allows their "type" to be meaningful when the row is fetched, as in result row processors. - TypeDecorator is present in the "sqlalchemy" import space.
* - whitespace removal bonanzaMike Bayer2011-01-021-66/+66
|
* Ridding the world of a few wasteful imports.Michael Trier2010-12-191-2/+1
|
* Added NULLS FIRST and NULLS LAST support.Michael Trier2010-12-191-1/+57
| | | | | It's implemented as an extension to the asc() and desc() operators, called nullsfirst() and nullslast(). [ticket:723]
* - initial stab at using executemany() for inserts in the ORM when possibleMike Bayer2010-12-101-1/+18
|
* - move sqlalchemy.test to test.libMike Bayer2010-11-151-4/+4
|
* - *Major* cleanup / modernization of the InformixMike Bayer2010-10-011-1/+4
| | | | | dialect for 0.6, courtesy Florian Apolloner. [ticket:1906]
* - An informative error message is raised if a ColumnMike Bayer2010-09-181-1/+4
| | | | | | | | | which has not yet been assigned a name, i.e. as in declarative, is used in a context where it is exported to the columns collection of an enclosing select() construct, or if any construct involving that column is compiled before its name is assigned. [ticket:1862]
* - Fixed a regression in 0.6.4 whereby the change thatMike Bayer2010-09-161-0/+10
| | | | | | | | allowed cursor errors to be raised consistently broke the result.lastrowid accessor. Test coverage has been added for result.lastrowid. Note that lastrowid is only supported by Pysqlite and some MySQL drivers, so isn't super-useful in the general case.
* - pending deprecation in 0.7 for the execute/scalar on clauseelementMike Bayer2010-09-071-1/+1
|
* - rewrote the "connections" sectionMike Bayer2010-09-051-0/+1
| | | | | | | | | - improved pool docs - typos etc. - ClauseElement.execute() and scalar() make no sense - these are depreacted. The official home is Executable. - alias() is not executable, allowing it is sloppy so this goes under the deprecated umbrella
* - Calling fetchone() or similar on a result thatMike Bayer2010-08-031-1/+38
| | | | | | | | | | | | | | | | has already been exhausted, has been closed, or is not a result-returning result now raises ResourceClosedError, a subclass of InvalidRequestError, in all cases, regardless of backend. Previously, some DBAPIs would raise ProgrammingError (i.e. pysqlite), others would return None leading to downstream breakages (i.e. MySQL-python). - Connection, ResultProxy, as well as Session use ResourceClosedError for all "this connection/transaction/result is closed" types of errors.
* - The argument to "ESCAPE" of a LIKE operator or similarMike Bayer2010-06-241-4/+12
| | | | | | | | | | | | | | | | 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]
* - Firebird dialect adds CHAR, VARCHAR types whichMike Bayer2010-06-191-0/+1
| | | | | accept a "charset" flag, to support Firebird "CHARACTER SET" clause. [ticket:1813]
* - Fixed bug that prevented implicit RETURNING from functioningMike Bayer2010-04-221-0/+9
| | | | | properly with composite primary key that contained zeroes. [ticket:1778]
* per zzzeek, for mssql+mxodbc, disabled ↵Brad Allen2010-03-181-0/+1
| | | | test.sql.test_query.QueryTest.test_bind_in
* MergeBrad Allen2010-03-181-0/+1
|\
| * some ms fixesMike Bayer2010-03-171-0/+1
| |
* | Because of changes to SQLAlchemy bind parameter placement, removed all ↵Brad Allen2010-03-171-29/+0
| | | | | | | | mxodbc test disabling statements having this pattern: @testing.crashes('mssql+mxodbc', """Invalid bind parameter placement:
* | merged from main tipBrad Allen2010-03-171-32/+22
|\ \ | |/
| * working through syb capabilitiesMike Bayer2010-03-171-33/+23
| |
* | Merged from main tip, and resolved conflicts in mxodbc dialect and connector.Brad Allen2010-03-171-16/+38
|\ \ | |/
| * - added pyodbc for sybase driver.Mike Bayer2010-03-171-12/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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).
| * - The except_() method now renders as MINUS on Oracle,Mike Bayer2010-03-161-4/+0
| | | | | | | | | | which is more or less equivalent on that platform. [ticket:1712]
* | Disabling tests for mssql+mxodbc where mxODBC cursor.execute chokes on ↵Brad Allen2010-03-161-1/+30
|/ | | | invalid placement of bind parameter "?" within the SQL statement.
* - introduce an optimizing type _NativeUnicodeMixin to oracle plus supportingMike Bayer2010-03-121-2/+1
| | | | | | | | 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.
* think I came across a syntactical weirdism thereMike Bayer2010-03-111-1/+1
|
* Added a non-freetds specific exclusion for pyodbcMike Bayer2010-03-111-0/+4
|
* working on pyodbc / mxodbcMike Bayer2010-02-271-1/+12
|
* - threadlocal engine wasn't properly closing the connectionMike Bayer2010-02-271-8/+15
| | | | | | | | | | 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.
* - Added an optional C extension to speed up the sql layer byGaëtan de Menten2010-02-131-6/+6
| | | | | | | | | | | | | | | reimplementing the highest impact functions. The actual speedups will depend heavily on your DBAPI and the mix of datatypes used in your tables, and can vary from a 50% improvement to more than 200%. It also provides a modest (~20%) indirect improvement to ORM speed for large queries. Note that it is *not* built/installed by default. See README for installation instructions. - The most common result processors conversion function were moved to the new "processors" module. Dialect authors are encouraged to use those functions whenever they correspond to their needs instead of implementing custom ones.
* - Restored the keys() method to ResultProxy.Mike Bayer2010-02-101-1/+3
|
* - union(), intersect(), except() and other "compound" typesMike Bayer2010-01-251-8/+69
| | | | | | | | | | | | | | | | of statements have more consistent behavior w.r.t. parenthesizing. Each compound element embedded within another will now be grouped with parenthesis - previously, the first compound element in the list would not be grouped, as SQLite doesn't like a statement to start with parenthesis. However, Postgresql in particular has precedence rules regarding INTERSECT, and it is more consistent for parenthesis to be applied equally to all sub-elements. So now, the workaround for SQLite is also what the workaround for PG was previously - when nesting compound elements, the first one usually needs ".alias().select()" called on it to wrap it inside of a subquery. [ticket:1665]
* moved the metadata step of ResultProxy into a ResultMetaData object. this ↵Mike Bayer2010-01-201-1/+0
| | | | | | | | also replaces PickledResultProxy. Allows RowProxy objects to reference just the metadata they need and provides the "core" of ResultProxy detached from the object itself, allowing ResultProxy implementations to vary more easily. will also enable [ticket:1635]
* - calling expr.in_([]), i.e. with an empty list, emits a warningMike Bayer2009-12-291-0/+3
| | | | | | | | | before issuing the usual "expr != expr" clause. The "expr != expr" can be very expensive, and it's preferred that the user not issue in_() if the list is empty, instead simply not querying, or modifying the criterion as appropriate for more complex situations. [ticket:1628]
* - ResultProxy internals have been overhauled to greatly reduceMike Bayer2009-10-241-1/+18
| | | | | | | | method call counts when fetching columns that have no type-level processing applied. Provides a 100% speed improvement when fetching large result sets with no unicode conversion. Many thanks to Elixir's Gaëtan de Menten for this dramatic improvement ! [ticket:1586]