Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
result['field_count'] = Int.to_python(
ctype_object.field_count, *args, **kwargs
)
if hasattr(ctype_object, 'cursor'):
result['cursor'] = Long.to_python(
ctype_object.cursor, *args, **kwargs
)
for row_item in ctype_object.data._fields_:
row_name = row_item[0]
row_object = getattr(ctype_object.data, row_name)
row = []
for col_item in row_object._fields_:
col_name = col_item[0]
col_object = getattr(row_object, col_name)
row.append(
AnyDataObject.to_python(col_object, *args, **kwargs)
)
result['data'].append(row)
return result
result['field_count'] = Int.to_python(
ctype_object.field_count, *args, **kwargs
)
if hasattr(ctype_object, 'cursor'):
result['cursor'] = Long.to_python(
ctype_object.cursor, *args, **kwargs
)
for row_item in ctype_object.data._fields_:
row_name = row_item[0]
row_object = getattr(ctype_object.data, row_name)
row = []
for col_item in row_object._fields_:
col_name = col_item[0]
col_object = getattr(row_object, col_name)
row.append(
AnyDataObject.to_python(col_object, *args, **kwargs)
)
result['data'].append(row)
return result
result['field_count'] = Int.to_python(
ctype_object.field_count, *args, **kwargs
)
if hasattr(ctype_object, 'cursor'):
result['cursor'] = Long.to_python(
ctype_object.cursor, *args, **kwargs
)
for row_item in ctype_object.data._fields_:
row_name = row_item[0]
row_object = getattr(ctype_object.data, row_name)
row = []
for col_item in row_object._fields_:
col_name = col_item[0]
col_object = getattr(row_object, col_name)
row.append(
AnyDataObject.to_python(col_object, *args, **kwargs)
)
result['data'].append(row)
return result