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

Public Member Functions

def visit_udtf_node
 
def visit_arg_node
 
def visit_composed_node
 
def visit_primitive_node
 
def visit_annotation_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 465 of file TableFunctionsFactory_transformers.py.

Member Function Documentation

def TableFunctionsFactory_transformers.DeclBracketTransformer.visit_annotation_node (   self,
  annotation_node 
)

Definition at line 512 of file TableFunctionsFactory_transformers.py.

513  def visit_annotation_node(self, annotation_node):
514  key = annotation_node.key
515  value = annotation_node.value
516  return (key, value)
517 
def TableFunctionsFactory_transformers.DeclBracketTransformer.visit_arg_node (   self,
  arg_node 
)

Definition at line 492 of file TableFunctionsFactory_transformers.py.

493  def visit_arg_node(self, arg_node):
494  t = arg_node.type.accept(self)
495  anns = [a.accept(self) for a in arg_node.annotations]
496  return declbracket.Declaration(t, anns)
def TableFunctionsFactory_transformers.DeclBracketTransformer.visit_composed_node (   self,
  composed_node 
)

Definition at line 497 of file TableFunctionsFactory_transformers.py.

498  def visit_composed_node(self, composed_node):
499  typ = util.translate_map.get(composed_node.type, composed_node.type)
500  inner = [i.accept(self) for i in composed_node.inner]
501  if composed_node.is_cursor():
502  inner = list(map(lambda x: x.apply_column(), inner))
503  return declbracket.Bracket(typ, args=tuple(inner))
504  elif composed_node.is_output_buffer_sizer():
505  return declbracket.Bracket(typ, args=tuple(inner))
506  else:
507  return declbracket.Bracket(typ + str(inner[0]))
def TableFunctionsFactory_transformers.DeclBracketTransformer.visit_primitive_node (   self,
  primitive_node 
)

Definition at line 508 of file TableFunctionsFactory_transformers.py.

509  def visit_primitive_node(self, primitive_node):
510  t = primitive_node.type
511  return declbracket.Bracket(t)
def TableFunctionsFactory_transformers.DeclBracketTransformer.visit_udtf_node (   self,
  udtf_node 
)

Definition at line 467 of file TableFunctionsFactory_transformers.py.

468  def visit_udtf_node(self, udtf_node):
469  name = udtf_node.name
470  inputs = []
471  input_annotations = []
472  outputs = []
473  output_annotations = []
474  function_annotations = []
475  sizer = udtf_node.sizer
476 
477  for i in udtf_node.inputs:
478  decl = i.accept(self)
479  inputs.append(decl)
480  input_annotations.append(decl.annotations)
481 
482  for o in udtf_node.outputs:
483  decl = o.accept(self)
484  outputs.append(decl.type)
485  output_annotations.append(decl.annotations)
486 
487  for annot in udtf_node.annotations:
488  annot = annot.accept(self)
489  function_annotations.append(annot)
490 
491  return util.Signature(name, inputs, outputs, input_annotations, output_annotations, function_annotations, sizer)

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