Home | Trees | Indices | Help |
|
---|
|
Helpers for morphing modules
Classes | |
State is a scratchpad for morphers to communicate state among themselves. |
|
Morpher A class managing the process of morphing an ADQL expression. |
Functions | |||
|
|||
|
|||
|
Variables | |
__package__ =
|
Function Details |
prepends a NOT to expr if operator and operand suggest there should be one for ADQL integerized boolean expressions. The function will return None for unknown combinations of operator and operand, and it will simply hand through Nones for expr, so calling functions can just return addNotToBooleanized(...). |
registers handler as a booleanizer for ADQL functions called funcName. funcName must be all-uppercase for this to work. handler(node, operand, operator) is a function that receives a function node and the operand and operator of the comparison and either returns None to say it can't handle it, or something else; that something else is what the entire comparison node is morphed into. You can call multiple booleanizers for the same function; they will be tried in sequence. Hence, make sure you get your import sequences right if you do this. |
turns a comparison expression that's really a boolean expression into a boolean expression. New-style: handler functions of children of this just set an OVERRIDE_RESULT attribute, and this just returns it. The DISTANCE MORPHER already does this. Old-style functionality (should be moved to new-style at some point): This is for things like the geometry predicates (CONTAINS, INTERSECTS) or stuff like ivo_hasword and such. Embedding these as booleans helps the query planner a lot (though it might change semantics slightly in the presence of NULLs). The way this works is that morphing code can call registerBooleanizer with the function name and callable that receives the function node, the operator, and the operand. If that function returns non-None, that result is used instead of the current node. |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu May 2 07:29:09 2019 | http://epydoc.sourceforge.net |