summaryrefslogtreecommitdiff
path: root/test/sql/test_operators.py
Commit message (Collapse)AuthorAgeFilesLines
...
* - The precedence rules for the :meth:`.ColumnOperators.collate` operatorMike Bayer2013-12-051-0/+52
| | | | | | | | | | | have been modified, such that the COLLATE operator is now of lower precedence than the comparison operators. This has the effect that a COLLATE applied to a comparison will not render parenthesis around the comparison, which is not parsed by backends such as MSSQL. The change is backwards incompatible for those setups that were working around the issue by applying :meth:`.Operators.collate` to an individual element of the comparison expression, rather than the comparison expression as a whole. [ticket:2879]
* An overhaul of expression handling for special symbols particularlyMike Bayer2013-10-231-4/+206
| | | | | | | | | | with conjunctions, e.g. ``None`` :func:`.expression.null` :func:`.expression.true` :func:`.expression.false`, including consistency in rendering NULL in conjunctions, "short-circuiting" of :func:`.and_` and :func:`.or_` expressions which contain boolean constants, and rendering of boolean constants and expressions as compared to "1" or "0" for backends that don't feature ``true``/``false`` constants. [ticket:2804]
* - Removed some now unneeded version checks [ticket:2829] courtesy alex gaynorMike Bayer2013-09-221-1/+0
|
* - The :meth:`.Operators.notin_` operator added in 0.8 now properlyMike Bayer2013-08-071-0/+11
| | | | | produces the negation of the expression "IN" returns when used against an empty collection. Also in 0.8.3.
* - remove the ``__iter__()`` with notimplemented since it interferesMike Bayer2013-06-031-7/+6
| | | | with legitimate iterable detection, [ticket:2726]
* Fully implemented the IS and IS NOT operators withMike Bayer2013-04-221-1/+28
| | | | | | | | | | regards to the True/False constants. An expression like ``col.is_(True)`` will now render ``col IS true`` on the target platform, rather than converting the True/ False constant to an integer bound parameter. This allows the ``is_()`` operator to work on MySQL when given True/False constants. [ticket:2682]
* The :meth:`.ColumnOperators.in_` operator will now coerceMike Bayer2013-02-021-0/+6
| | | | | values of ``None`` to :func:`.null`. [ticket:2496]
* - BinaryExpression now keeps track of "left" and "right" as passed in,Mike Bayer2012-12-021-0/+52
| | | | | so that they can be compared in ``__nonzero__`` prior to their self_group() step. [ticket:2621]
* 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__()``.
* Added :meth:`.ColumnOperators.notin_`,Mike Bayer2012-10-241-1/+41
| | | | | | :meth:`.ColumnOperators.notlike`, :meth:`.ColumnOperators.notilike` to :class:`.ColumnOperators`. [ticket:2580]
* - move most/all operator specific tests into test_operator, convert fully to TOTMike Bayer2012-10-241-32/+334
|
* - get 100% lint/pep8 happening for test_compiler; next we will beginMike Bayer2012-10-241-26/+278
| | | | | | cutting up tests and removing old ones - move test_in() to test_operators - slice up migrated operator tests into TOT
* trying different approaches to test layout. in this one, the testing modulesMike Bayer2012-09-271-2/+3
| | | | | | | 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.
* - [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]
* 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
|
* - [feature] Reworked the startswith(), endswith(),Mike Bayer2012-08-271-1/+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 Core oeprator system now includesMike Bayer2012-08-201-0/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the `getitem` operator, i.e. the bracket operator in Python. This is used at first to provide index and slice behavior to the Postgresql ARRAY type, and also provides a hook for end-user definition of custom __getitem__ schemes which can be applied at the type level as well as within ORM-level custom operator schemes. Note that this change has the effect that descriptor-based __getitem__ schemes used by the ORM in conjunction with synonym() or other "descriptor-wrapped" schemes will need to start using a custom comparator in order to maintain this behavior. - [feature] postgresql.ARRAY now supports indexing and slicing. The Python [] operator is available on all SQL expressions that are of type ARRAY; integer or simple slices can be passed. The slices can also be used on the assignment side in the SET clause of an UPDATE statement by passing them into Update.values(); see the docs for examples. - [feature] Added new "array literal" construct postgresql.array(). Basically a "tuple" that renders as ARRAY[1,2,3].
* _adapt_expression() moves fully to _DefaultColumnComparator which resumesMike Bayer2012-08-161-49/+9
| | | | | | its original role as stateful, forms the basis of TypeEngine.Comparator. lots of code goes back mostly as it was just with cleaner typing behavior, such as simple flow in _binary_operate now.
* -we move all the invocation of "_adapt_expression" into ↵Mike Bayer2012-08-161-1/+1
| | | | | | TypeEngine.Comparator. at this point the split of operator stuff is getting awkward and we might want to move _DefaultComparator.
* - fix concat() operator, testsMike Bayer2012-08-141-2/+64
| | | | | | | | - [feature] Custom unary operators can now be used by combining operators.custom_op() with UnaryExpression(). - clean up the operator dispatch system and make it more consistent. This does change the compiler contract for custom ops.
* move the whole thing to TypeEngine. the feature is pretty much for free ↵Mike Bayer2012-08-131-31/+130
| | | | like this.
* - develop new system of applying custom operators to ColumnElement classes. ↵Mike Bayer2012-08-131-0/+105
resembles that of the ORM so far.