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

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

Definition at line 870 of file

Member Function Documentation

def generate_TableFunctionsFactory_init.FieldAnnotationTransformer.visit_udtf_node (   self,
* Generate fields annotation to Cursor if non-existing

Definition at line 872 of file

References run_benchmark_import.type.

873  def visit_udtf_node(self, udtf_node):
874  """
875  * Generate fields annotation to Cursor if non-existing
876  """
877  udtf_node = super(type(self), self).visit_udtf_node(udtf_node)
879  for t in udtf_node.inputs:
881  if not isinstance(t.type, ComposedNode):
882  continue
884  if t.type.is_cursor() and t.get_annotation('fields') is None:
885  fields = list(PrimitiveNode(a.get_annotation('name', 'field%s' % i)) for i, a in enumerate(t.type.inner))
886  t.annotations.append(AnnotationNode('fields', fields))
888  return udtf_node

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