OmniSciDB  ca0c39ec8f
 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 889 of file

Member Function Documentation

def generate_TableFunctionsFactory_init.SupportedAnnotationsTransformer.visit_udtf_node (   self,

Definition at line 893 of file

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

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