OmniSciDB  c1a53651b2
 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 874 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 876 of file

References run_benchmark_import.type.

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

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