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

Public Member Functions

def visit_udtf_node
 
- Public Member Functions inherited from TableFunctionsFactory_transformers.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 TableFunctionsFactory_transformers.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 286 of file TableFunctionsFactory_transformers.py.

Member Function Documentation

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

Definition at line 288 of file TableFunctionsFactory_transformers.py.

References run_benchmark_import.type.

289  def visit_udtf_node(self, udtf_node):
290  """
291  * Generate fields annotation to Cursor if non-existing
292  """
293  udtf_node = super(type(self), self).visit_udtf_node(udtf_node)
294 
295  for t in udtf_node.inputs:
296 
297  if not isinstance(t.type, tf_node.ComposedNode):
298  continue
299 
300  if t.type.is_cursor() and t.get_annotation('fields') is None:
301  fields = list(tf_node.PrimitiveNode(a.get_annotation('name', 'field%s' % i)) for i, a in enumerate(t.type.inner))
302  t.annotations.append(tf_node.AnnotationNode('fields', fields))
303 
304  return udtf_node
305 

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