OmniSciDB  085a039ca4
 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 876 of file generate_TableFunctionsFactory_init.py.

Member Function Documentation

def generate_TableFunctionsFactory_init.SupportedAnnotationsTransformer.visit_udtf_node (   self,
  udtf_node 
)

Definition at line 880 of file generate_TableFunctionsFactory_init.py.

881  def visit_udtf_node(self, udtf_node):
882  for idx, t in enumerate(udtf_node.inputs):
883  for a in t.annotations:
884  if a.key not in SupportedAnnotations:
885  raise TransformerException('unknown input annotation: `%s`' % (a.key))
886  for t in udtf_node.outputs:
887  for a in t.annotations:
888  if a.key not in SupportedAnnotations:
889  raise TransformerException('unknown output annotation: `%s`' % (a.key))
890  for annot in udtf_node.annotations:
891  if annot.key not in SupportedFunctionAnnotations:
892  raise TransformerException('unknown function annotation: `%s`' % (annot.key))
893  if annot.value.lower() in ['enable', 'on', '1', 'true']:
894  annot.value = '1'
895  elif annot.value.lower() in ['disable', 'off', '0', 'false']:
896  annot.value = '0'
897  return udtf_node
898 

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