OmniSciDB  cde582ebc3
 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 859 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 861 of file generate_TableFunctionsFactory_init.py.

References run_benchmark_import.type.

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

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