OmniSciDB  a987f07e93
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
generate_TableFunctionsFactory_init.DeclBracketTransformer Class Reference
+ Inheritance diagram for generate_TableFunctionsFactory_init.DeclBracketTransformer:
+ Collaboration diagram for generate_TableFunctionsFactory_init.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 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 937 of file generate_TableFunctionsFactory_init.py.

Member Function Documentation

def generate_TableFunctionsFactory_init.DeclBracketTransformer.visit_annotation_node (   self,
  annotation_node 
)

Definition at line 984 of file generate_TableFunctionsFactory_init.py.

985  def visit_annotation_node(self, annotation_node):
986  key = annotation_node.key
987  value = annotation_node.value
988  return (key, value)
989 
def generate_TableFunctionsFactory_init.DeclBracketTransformer.visit_arg_node (   self,
  arg_node 
)

Definition at line 964 of file generate_TableFunctionsFactory_init.py.

965  def visit_arg_node(self, arg_node):
966  t = arg_node.type.accept(self)
967  anns = [a.accept(self) for a in arg_node.annotations]
968  return Declaration(t, anns)
def generate_TableFunctionsFactory_init.DeclBracketTransformer.visit_composed_node (   self,
  composed_node 
)

Definition at line 969 of file generate_TableFunctionsFactory_init.py.

970  def visit_composed_node(self, composed_node):
971  typ = translate_map.get(composed_node.type, composed_node.type)
972  inner = [i.accept(self) for i in composed_node.inner]
973  if composed_node.is_cursor():
974  inner = list(map(lambda x: x.apply_column(), inner))
975  return Bracket(typ, args=tuple(inner))
976  elif composed_node.is_output_buffer_sizer():
977  return Bracket(typ, args=tuple(inner))
978  else:
979  return Bracket(typ + str(inner[0]))
def generate_TableFunctionsFactory_init.DeclBracketTransformer.visit_primitive_node (   self,
  primitive_node 
)

Definition at line 980 of file generate_TableFunctionsFactory_init.py.

981  def visit_primitive_node(self, primitive_node):
982  t = primitive_node.type
983  return Bracket(t)
def generate_TableFunctionsFactory_init.DeclBracketTransformer.visit_udtf_node (   self,
  udtf_node 
)

Definition at line 939 of file generate_TableFunctionsFactory_init.py.

References generate_TableFunctionsFactory_init.Signature.

940  def visit_udtf_node(self, udtf_node):
941  name = udtf_node.name
942  inputs = []
943  input_annotations = []
944  outputs = []
945  output_annotations = []
946  function_annotations = []
947  sizer = udtf_node.sizer
948 
949  for i in udtf_node.inputs:
950  decl = i.accept(self)
951  inputs.append(decl)
952  input_annotations.append(decl.annotations)
953 
954  for o in udtf_node.outputs:
955  decl = o.accept(self)
956  outputs.append(decl.type)
957  output_annotations.append(decl.annotations)
958 
959  for annot in udtf_node.annotations:
960  annot = annot.accept(self)
961  function_annotations.append(annot)
962 
963  return Signature(name, inputs, outputs, input_annotations, output_annotations, function_annotations, sizer)

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