OmniSciDB  471d68cefb
 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 816 of file

Member Function Documentation

def generate_TableFunctionsFactory_init.SupportedAnnotationsTransformer.visit_udtf_node (   self,

Definition at line 820 of file

821  def visit_udtf_node(self, udtf_node):
822  for idx, t in enumerate(udtf_node.inputs):
823  for a in t.annotations:
824  if a.key not in SupportedAnnotations:
825  raise TransformerException('unknown input annotation: `%s`' % (a.key))
826  for t in udtf_node.outputs:
827  for a in t.annotations:
828  if a.key not in SupportedAnnotations:
829  raise TransformerException('unknown output annotation: `%s`' % (a.key))
830  for annot in udtf_node.annotations:
831  if annot.key not in SupportedFunctionAnnotations:
832  raise TransformerException('unknown function annotation: `%s`' % (annot.key))
833  if annot.value.lower() in ['enable', 'on', '1', 'true']:
834  annot.value = '1'
835  elif annot.value.lower() in ['disable', 'off', '0', 'false']:
836  annot.value = '0'
837  return udtf_node

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