]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
merge r6551 of trunk for [ticket:1354]
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 9 Dec 2009 00:01:35 +0000 (00:01 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 9 Dec 2009 00:01:35 +0000 (00:01 +0000)
doc/build/sqlexpression.rst
lib/sqlalchemy/sql/expression.py

index b6acf23434c5579373b6ab7b89037c8a6199cc78..19598f29cbff0d9d7fc8bb7f0af4afa2c14a6cee 100644 (file)
@@ -426,6 +426,12 @@ If you have come across an operator which really isn't available, you can always
     >>> print users.c.name.op('tiddlywinks')('foo')
     users.name tiddlywinks :name_1
     
+This function can also be used to make bitwise operators explicit. For example::
+
+    somecolumn.op('&')(0xff)
+
+is a bitwise AND of the value in `somecolumn`.
+    
 Conjunctions 
 =============
 
index cf08ec19511e7f55088a92cdf60032930d799faa..a1ebb179fc5bf9634b34e68a4379ca05abb2c4fd 100644 (file)
@@ -1506,11 +1506,17 @@ class _CompareMixin(ColumnOperators):
 
           somecolumn * 5
 
-        operator
-          a string which will be output as the infix operator between
+        
+        :param operator: a string which will be output as the infix operator between
           this ``ClauseElement`` and the expression passed to the
           generated function.
 
+        This function can also be used to make bitwise operators explicit. For example::
+
+          somecolumn.op('&')(0xff)
+
+        is a bitwise AND of the value in somecolumn.
+          
         """
         return lambda other: self.__operate(operator, other)