예제 #1
0
    def describe(self):
        result = dap_description_pb2.DapDescription()
        result.name = self.name

        for table_name, fields in self.structure_pb.items():
            result_table = result.table.add()
            result_table.name = table_name
            for field_name, field_type in fields.items():
                result_field = result_table.field.add()
                result_field.name = field_name
                result_field.type = field_type
        return result
    def describe(self):
        result = dap_description_pb2.DapDescription()
        result.name = self.name

        star_table = result.table.add()
        star_table.name = '*'

        star_field = star_table.field.add()
        star_field.name = '/them\\.[A-Za-z][-_A-Za-z0-9]*/'
        star_field.type = '*'

        result.options.append("lazy")

        return result
예제 #3
0
    def describe(self):
        result = dap_description_pb2.DapDescription()
        result.name = self.name

        for table_name in self.graphs.keys():
            result_table = result.table.add()
            result_table.name = table_name

            result_field = result_table.field.add()
            result_field.name = table_name + ".origin"
            result_field.type = "string_pair"

            result_field = result_table.field.add()
            result_field.name = table_name + ".label"
            result_field.type = "string"

            result_field = result_table.field.add()
            result_field.name = table_name + ".weight"
            result_field.type = "double"

        return result
예제 #4
0
    def describe(self):
        result = dap_description_pb2.DapDescription()
        result.name = self.name

        for table_name in self.geos.keys():
            result_table = result.table.add()
            result_table.name = table_name

            result_field = result_table.field.add()
            result_field.name = table_name + ".location"
            result_field.type = "location"
            result_field.options.extend(self.fields_by_table.get(table_name, {}).get( table_name + ".location", {}).get('options', []))

            result_field = result_table.field.add()
            result_field.name = table_name + ".radius"
            result_field.type = "double"

            result_field = result_table.field.add()
            result_field.name = table_name + ".update"
            result_field.type = "location"
        return result
예제 #5
0
 def describe(self) -> dap_description_pb2.DapDescription:
     result = dap_description_pb2.DapDescription()
     result.name = self.name
     result.options.append("late")
     result.options.append("all-branches")
     return result