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

Member Function Documentation

def generate_TableFunctionsFactory_init.DeclBracketTransformer.visit_annotation_node (   self,
  annotation_node 
)

Definition at line 948 of file generate_TableFunctionsFactory_init.py.

949  def visit_annotation_node(self, annotation_node):
950  key = annotation_node.key
951  value = annotation_node.value
952  return (key, value)
953 
def generate_TableFunctionsFactory_init.DeclBracketTransformer.visit_arg_node (   self,
  arg_node 
)

Definition at line 928 of file generate_TableFunctionsFactory_init.py.

929  def visit_arg_node(self, arg_node):
930  t = arg_node.type.accept(self)
931  anns = [a.accept(self) for a in arg_node.annotations]
932  return Declaration(t, anns)
def generate_TableFunctionsFactory_init.DeclBracketTransformer.visit_composed_node (   self,
  composed_node 
)

Definition at line 933 of file generate_TableFunctionsFactory_init.py.

934  def visit_composed_node(self, composed_node):
935  typ = translate_map.get(composed_node.type, composed_node.type)
936  inner = [i.accept(self) for i in composed_node.inner]
937  if composed_node.is_cursor():
938  inner = list(map(lambda x: x.apply_column(), inner))
939  return Bracket(typ, args=tuple(inner))
940  elif composed_node.is_output_buffer_sizer():
941  return Bracket(typ, args=tuple(inner))
942  else:
943  return Bracket(typ + str(inner[0]))
def generate_TableFunctionsFactory_init.DeclBracketTransformer.visit_primitive_node (   self,
  primitive_node 
)

Definition at line 944 of file generate_TableFunctionsFactory_init.py.

945  def visit_primitive_node(self, primitive_node):
946  t = primitive_node.type
947  return Bracket(t)
def generate_TableFunctionsFactory_init.DeclBracketTransformer.visit_udtf_node (   self,
  udtf_node 
)

Definition at line 903 of file generate_TableFunctionsFactory_init.py.

References generate_TableFunctionsFactory_init.Signature.

904  def visit_udtf_node(self, udtf_node):
905  name = udtf_node.name
906  inputs = []
907  input_annotations = []
908  outputs = []
909  output_annotations = []
910  function_annotations = []
911  sizer = udtf_node.sizer
912 
913  for i in udtf_node.inputs:
914  decl = i.accept(self)
915  inputs.append(decl)
916  input_annotations.append(decl.annotations)
917 
918  for o in udtf_node.outputs:
919  decl = o.accept(self)
920  outputs.append(decl.type)
921  output_annotations.append(decl.annotations)
922 
923  for annot in udtf_node.annotations:
924  annot = annot.accept(self)
925  function_annotations.append(annot)
926 
927  return Signature(name, inputs, outputs, input_annotations, output_annotations, function_annotations, sizer)

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