OmniSciDB  a987f07e93
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
generate_TableFunctionsFactory_init.SupportedAnnotationsTransformer Class Reference
+ Inheritance diagram for generate_TableFunctionsFactory_init.SupportedAnnotationsTransformer:
+ Collaboration diagram for generate_TableFunctionsFactory_init.SupportedAnnotationsTransformer:

Public Member Functions

def visit_udtf_node
 
- Public Member Functions inherited from generate_TableFunctionsFactory_init.AstTransformer
def visit_udtf_node
 
def visit_composed_node
 
def visit_arg_node
 
def visit_primitive_node
 
def visit_template_node
 
def visit_annotation_node
 
- Public Member Functions inherited from generate_TableFunctionsFactory_init.AstVisitor
def visit_udtf_node
 
def visit_composed_node
 
def visit_arg_node
 
def visit_primitive_node
 
def visit_annotation_node
 
def visit_template_node
 

Detailed Description

* Checks for supported annotations in a UDTF

Definition at line 893 of file generate_TableFunctionsFactory_init.py.

Member Function Documentation

def generate_TableFunctionsFactory_init.SupportedAnnotationsTransformer.visit_udtf_node (   self,
  udtf_node 
)

Definition at line 897 of file generate_TableFunctionsFactory_init.py.

898  def visit_udtf_node(self, udtf_node):
899  for t in udtf_node.inputs:
900  for a in t.annotations:
901  if a.key not in SupportedAnnotations:
902  raise TransformerException('unknown input annotation: `%s`' % (a.key))
903  for t in udtf_node.outputs:
904  for a in t.annotations:
905  if a.key not in SupportedAnnotations:
906  raise TransformerException('unknown output annotation: `%s`' % (a.key))
907  for annot in udtf_node.annotations:
908  if annot.key not in SupportedFunctionAnnotations:
909  raise TransformerException('unknown function annotation: `%s`' % (annot.key))
910  if annot.value.lower() in ['enable', 'on', '1', 'true']:
911  annot.value = '1'
912  elif annot.value.lower() in ['disable', 'off', '0', 'false']:
913  annot.value = '0'
914  return udtf_node
915 

The documentation for this class was generated from the following file: