summaryrefslogtreecommitdiff
path: root/test/sql
Commit message (Collapse)AuthorAgeFilesLines
...
* first pass cleaning up test_labels #2610Diana Clarke2012-11-211-81/+212
|
* this test class had 2 'test_labels' methods, just changing one of them to ↵Diana Clarke2012-11-211-1/+1
| | | | 'test_labels3' for now
* Fixed a gotcha where inadvertently calling list() on aMike Bayer2012-11-181-0/+12
| | | | | | :class:`.ColumnElement` would go into an endless loop, if :meth:`.ColumnOperators.__getitem__` were implemented. A new NotImplementedError is emitted via ``__iter__()``.
* fix this testMike Bayer2012-11-141-1/+2
|
* Fixed bug whereby using "key" with ColumnMike Bayer2012-11-131-0/+21
| | | | | | | | in conjunction with "schema" for the owning Table would fail to locate result rows due to the MSSQL dialect's "schema rendering" logic's failure to take .key into account. Also in 0.7.10. [ticket:2607]
* Fixed bug in type_coerce() whereby typing informationMike Bayer2012-11-122-1/+15
| | | | | | | | could be lost if the statement were used as a subquery inside of another statement, as well as other similar situations. Among other things, would cause typing information to be lost when the Oracle/mssql dialects would apply limit/offset wrappings. [ticket:2603]
* - support "fails_if" requirements as __requires__; so far this just skips, ↵Mike Bayer2012-11-121-150/+0
| | | | | | | | | | doesn't actually run the test - add requirements for date/datetime/time capabilities - remove test/sql/test_types->DateTest and create new tests in suite/test_types - move the StringTest with the "no length create" test to the suite, though this is a weird test
* Fixed bug whereby the ".key" of a Column wasn't beingMike Bayer2012-10-311-0/+25
| | | | | | | used when producing a "proxy" of the column against a selectable. This probably didn't occur in 0.7 since 0.7 doesn't respect the ".key" in a wider range of scenarios. [ticket:2597]
* - remove remote_foreign annotationMike Bayer2012-10-281-0/+7
| | | | - support annotations on Column where name isn't immediately present
* Added :meth:`.ColumnOperators.notin_`,Mike Bayer2012-10-241-1/+41
| | | | | | :meth:`.ColumnOperators.notlike`, :meth:`.ColumnOperators.notilike` to :class:`.ColumnOperators`. [ticket:2580]
* Fixed bug where keyword arguments passed toMike Bayer2012-10-241-1/+48
| | | | | | | | :meth:`.Compiler.process` wouldn't get propagated to the column expressions present in the columns clause of a SELECT statement. In particular this would come up when used by custom compilation schemes that relied upon special flags. [ticket:2593]
* - move most/all operator specific tests into test_operator, convert fully to TOTMike Bayer2012-10-242-240/+334
|
* - get 100% lint/pep8 happening for test_compiler; next we will beginMike Bayer2012-10-243-621/+921
| | | | | | cutting up tests and removing old ones - move test_in() to test_operators - slice up migrated operator tests into TOT
* The auto-correlation feature of :func:`.select`, andMike Bayer2012-10-222-35/+49
| | | | | | | | | by proxy that of :class:`.orm.Query`, will not take effect for a SELECT statement that is being rendered directly in the FROM list of the enclosing SELECT. Correlation in SQL only applies to column expressions such as those in the WHERE, ORDER BY, columns clause. [ticket:2595]
* - [bug] TypeDecorator now includes a generic repr()Mike Bayer2012-10-181-0/+6
| | | | | | | | | that works in terms of the "impl" type by default. This is a behavioral change for those TypeDecorator classes that specify a custom __init__ method; those types will need to re-define __repr__() if they need __repr__() to provide a faithful constructor representation. [ticket:2594]
* - [feature] The Query can now load entity/scalar-mixedMike Bayer2012-10-153-3/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | "tuple" rows that contain types which aren't hashable, by setting the flag "hashable=False" on the corresponding TypeEngine object in use. Custom types that return unhashable types (typically lists) can set this flag to False. [ticket:2592] - [bug] Applying a column expression to a select statement using a label with or without other modifying constructs will no longer "target" that expression to the underlying Column; this affects ORM operations that rely upon Column targeting in order to retrieve results. That is, a query like query(User.id, User.id.label('foo')) will now track the value of each "User.id" expression separately instead of munging them together. It is not expected that any users will be impacted by this; however, a usage that uses select() in conjunction with query.from_statement() and attempts to load fully composed ORM entities may not function as expected if the select() named Column objects with arbitrary .label() names, as these will no longer target to the Column objects mapped by that entity. [ticket:2591]
* - [feature] "scalar" selects now have a WHERE methodMike Bayer2012-10-152-12/+29
| | | | | | | | | | | | | | | | | | | | to help with generative building. Also slight adjustment regarding how SS "correlates" columns; the new methodology no longer applies meaning to the underlying Table column being selected. This improves some fairly esoteric situations, and the logic that was there didn't seem to have any purpose. - [feature] Some support for auto-rendering of a relationship join condition based on the mapped attribute, with usage of core SQL constructs. E.g. select([SomeClass]).where(SomeClass.somerelationship) would render SELECT from "someclass" and use the primaryjoin of "somerelationship" as the WHERE clause. This changes the previous meaning of "SomeClass.somerelationship" when used in a core SQL context; previously, it would "resolve" to the parent selectable, which wasn't generally useful. Related to [ticket:2245].
* - keep dialect at default for type compileMike Bayer2012-10-111-1/+2
| | | | - python2.5/3 fixes
* - create new sqlalchemy.testing.suite.test_types, starting with Unicode ↵Mike Bayer2012-10-101-229/+84
| | | | | | | round trip tests. - clean out existing test_types:UnicodeTest to be strictly individual unit tests against Unicode(), String(), etc. with no database access.
* - [feature] Added "collation" parameter to allMike Bayer2012-10-101-21/+47
| | | | | | | | | | | String types. When present, renders as COLLATE <collation>. This to support the COLLATE keyword now supported by several databases including MySQL, SQLite, and Postgresql. [ticket:2276] - [change] The Text() type renders the length given to it, if a length was specified.
* - don't call get_lastrowid() on explicit returningMike Bayer2012-10-041-18/+15
| | | | | | - don't hardwire "subqueries" requirement in the base, mysql < 4.1 isn't working anyway - don't need explicit FB/PG exclusions in test_returning - hit db.connect() for the returning requirement
* - [bug] Fixed bug in over() construct wherebyMike Bayer2012-09-301-0/+28
| | | | | | | | passing an empty list for either partition_by or order_by, as opposed to None, would fail to generate correctly. Courtesy Gunnlaugur Por Briem. [ticket:2574]
* - more tests, move some tests out of test_reflection, test_queryMike Bayer2012-09-271-78/+8
|
* trying different approaches to test layout. in this one, the testing modulesMike Bayer2012-09-2720-66/+88
| | | | | | | become an externally usable package but still remains within the main sqlalchemy parent package. in this system, we use kind of an ugly hack to get the noseplugin imported outside of the "sqlalchemy" package, while still making it available within sqlalchemy for usage by third party libraries.
* - further reorganization of test suite:Mike Bayer2012-09-261-3/+0
| | | | | | | | | | | - bootstrap and lib move to all absolute imports - testing.py is no longer internally referenced. - requirements move to be a pluggable class which can be overridden. - cleanup in the interests of third party testing, test/lib and test/bootstrap may move to be an independent package.
* - [bug] Fixed the DropIndex construct to supportMike Bayer2012-09-241-0/+39
| | | | | an Index associated with a Table in a remote schema. [ticket:2571]
* - got firebird runningMike Bayer2012-09-233-23/+39
| | | | | | | | | | | | - add some failure cases - [bug] Firebird now uses strict "ansi bind rules" so that bound parameters don't render in the columns clause of a statement - they render literally instead. - [bug] Support for passing datetime as date when using the DateTime type with Firebird; other dialects support this.
* - [bug] When the primary key column of a TableMike Bayer2012-09-231-1/+16
| | | | | | | | is replaced, such as via extend_existing, the "auto increment" column used by insert() constructs is reset. Previously it would remain referring to the previous primary key column. [ticket:2525]
* - [feature] An explicit error is raised whenMike Bayer2012-09-231-0/+28
| | | | | | a ForeignKeyConstraint() that was constructed to refer to multiple remote tables is first used. [ticket:2455]
* - clean pyflakesMike Bayer2012-09-231-50/+48
|
* - [bug] A tweak to column precedence which moves theMike Bayer2012-09-221-0/+4
| | | | | | | "concat" and "match" operators to be the same as that of "is", "like", and others; this helps with parenthesization rendering when used in conjunction with "IS". [ticket:2564]
* - aaand actually get is/isnot to be usable with None/NULLMike Bayer2012-09-221-2/+7
|
* - [bug] Added missing operators is_(), isnot()Mike Bayer2012-09-221-0/+10
| | | | | | to the ColumnOperators base, so that these long-available operators are present as methods like all the other operators. [ticket:2544]
* finished fixes for mxodbc; need to use at least version 3.2.1Mike Bayer2012-09-213-2/+1
|
* - [feature] The cast() and extract() constructsMike Bayer2012-09-101-0/+6
| | | | | | | | | will now be produced via the func.* accessor as well, as users naturally try to access these names from func.* they might as well do what's expected, even though the returned object is not a FunctionElement. [ticket:2562]
* - [feature] Added a hook to the system of renderingMike Bayer2012-09-091-0/+42
| | | | | | | CREATE TABLE that provides access to the render for each Column individually, by constructing a @compiles function against the new schema.CreateColumn construct. [ticket:2463]
* add a contains() override testMike Bayer2012-09-041-0/+11
|
* `lshift` (<<) and `rshift` (>>) are also supported as optional operators.Mike Bayer2012-09-041-1/+37
|
* - type expressions invoke in SQL, but are only for the benefit of columnsMike Bayer2012-09-031-3/+39
| | | | | | delivered to a result set. therefore these expressions should only be rendered for those columns that are being delivered to the result, thereby preventing the expression from stacking onto itself within nesting scenarios.
* - fixes for mxODBC, some pyodbcMike Bayer2012-09-024-9/+41
| | | | | | - enhancements to test suite including ability to set up a testing engine for a whole test class, fixes to how noseplugin sets up/tears down per-class context
* - repair type expressions for columns when we aren't using ↵Mike Bayer2012-09-011-4/+22
| | | | | | select.apply_labels(), label should be the column name.
* - [bug] Fixed a regression since 0.6 regardingMike Bayer2012-08-311-4/+26
| | | | | | | | | | | | | | | | result-row targeting. It should be possible to use a select() statement with string based columns in it, that is select(['id', 'name']).select_from('mytable'), and have this statement be targetable by Column objects with those names; this is the mechanism by which query(MyClass).from_statement(some_statement) works. At some point the specific case of using select(['id']), which is equivalent to select([literal_column('id')]), stopped working here, so this has been re-instated and of course tested. [ticket:2558]
* skip this silly test entirely for PGMike Bayer2012-08-311-3/+3
|
* fixes to prevent the new MyISAM engine from breaking other testsMike Bayer2012-08-291-0/+1
|
* - [feature] Reworked the startswith(), endswith(),Mike Bayer2012-08-272-56/+245
| | | | | | | | | | | | contains() operators to do a better job with negation (NOT LIKE), and also to assemble them at compilation time so that their rendered SQL can be altered, such as in the case for Firebird STARTING WITH [ticket:2470] - [feature] firebird - The "startswith()" operator renders as "STARTING WITH", "~startswith()" renders as "NOT STARTING WITH", using FB's more efficient operator. [ticket:2470]
* - [feature] The "required" flag is set toMike Bayer2012-08-273-8/+83
| | | | | | | | | | True by default, if not passed explicitly, on bindparam() if the "value" or "callable" parameters are not passed. This will cause statement execution to check for the parameter being present in the final collection of bound parameters, rather than implicitly assigning None. [ticket:2556]
* - add "identifier", can differentiate between "name" rendered and ↵Mike Bayer2012-08-261-0/+29
| | | | "identifier" in func.
* - tweak the GenericFunction constructor more so that it's action in parsing theMike Bayer2012-08-261-0/+13
| | | | | arguments is easier to understand - add a test to ensure generic function can have a custom name
* oracle fixes...Mike Bayer2012-08-251-2/+2
|
* - fix for pypyMike Bayer2012-08-251-0/+2
| | | | - more oracle fixes