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

Member Function Documentation

def generate_TableFunctionsFactory_init.DeclBracketTransformer.visit_annotation_node (   self,
  annotation_node 
)

Definition at line 949 of file generate_TableFunctionsFactory_init.py.

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

Definition at line 929 of file generate_TableFunctionsFactory_init.py.

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

Definition at line 934 of file generate_TableFunctionsFactory_init.py.

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

Definition at line 945 of file generate_TableFunctionsFactory_init.py.

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

Definition at line 904 of file generate_TableFunctionsFactory_init.py.

References generate_TableFunctionsFactory_init.Signature.

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

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