OmniSciDB  91042dcc5b
 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 857 of file generate_TableFunctionsFactory_init.py.

Member Function Documentation

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

Definition at line 859 of file generate_TableFunctionsFactory_init.py.

References run_benchmark_import.type.

860  def visit_udtf_node(self, udtf_node):
861  """
862  * Generate fields annotation to Cursor if non-existing
863  """
864  udtf_node = super(type(self), self).visit_udtf_node(udtf_node)
865 
866  for _, t in enumerate(udtf_node.inputs):
867 
868  if not isinstance(t.type, ComposedNode):
869  continue
870 
871 
872  if t.type.is_cursor() and t.get_annotation('fields') is None:
873  fields = list(PrimitiveNode(a.get_annotation('name', 'field%s' % i)) for i, a in enumerate(t.type.inner))
874  t.annotations.append(AnnotationNode('fields', fields))
875 
876  return udtf_node
877 

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