OmniSciDB  ca0c39ec8f
 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 933 of file generate_TableFunctionsFactory_init.py.

Member Function Documentation

def generate_TableFunctionsFactory_init.DeclBracketTransformer.visit_annotation_node (   self,
  annotation_node 
)

Definition at line 980 of file generate_TableFunctionsFactory_init.py.

981  def visit_annotation_node(self, annotation_node):
982  key = annotation_node.key
983  value = annotation_node.value
984  return (key, value)
985 
def generate_TableFunctionsFactory_init.DeclBracketTransformer.visit_arg_node (   self,
  arg_node 
)

Definition at line 960 of file generate_TableFunctionsFactory_init.py.

961  def visit_arg_node(self, arg_node):
962  t = arg_node.type.accept(self)
963  anns = [a.accept(self) for a in arg_node.annotations]
964  return Declaration(t, anns)
def generate_TableFunctionsFactory_init.DeclBracketTransformer.visit_composed_node (   self,
  composed_node 
)

Definition at line 965 of file generate_TableFunctionsFactory_init.py.

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

Definition at line 976 of file generate_TableFunctionsFactory_init.py.

977  def visit_primitive_node(self, primitive_node):
978  t = primitive_node.type
979  return Bracket(t)
def generate_TableFunctionsFactory_init.DeclBracketTransformer.visit_udtf_node (   self,
  udtf_node 
)

Definition at line 935 of file generate_TableFunctionsFactory_init.py.

References generate_TableFunctionsFactory_init.Signature.

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

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