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

index 0ebcfa7878659f8481b4a6030e8857f31ac6c1bd..06b2eeb5f48a92e314d534a6ba7b3d20592d0642 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 b7708c338d95b725eb91e1f8f4e302a0910dc7ee..a87ef9bd1bc3feb9c99288f921f0ff7f177b2185 100644 (file)
@@ -1588,11 +1588,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)