Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
body_struct = Struct(following)
body_class, body_buffer = body_struct.parse(client)
body = body_class.from_buffer_copy(body_buffer)
if self.include_field_names:
field_count = body.fields.length
else:
field_count = body.field_count
data_fields = []
data_buffer = b''
for i in range(body.row_count):
row_fields = []
row_buffer = b''
for j in range(field_count):
field_class, field_buffer = AnyDataObject.parse(client)
row_fields.append(('column_{}'.format(j), field_class))
row_buffer += field_buffer
row_class = type(
'SQLResponseRow',
(ctypes.LittleEndianStructure,),
{
'_pack_': 1,
'_fields_': row_fields,
}
)
data_fields.append(('row_{}'.format(i), row_class))
data_buffer += row_buffer
data_class = type(
'SQLResponseData',
body_struct = Struct(following)
body_class, body_buffer = body_struct.parse(conn)
body = body_class.from_buffer_copy(body_buffer)
if self.include_field_names:
field_count = body.fields.length
else:
field_count = body.field_count
data_fields = []
data_buffer = b''
for i in range(body.row_count):
row_fields = []
row_buffer = b''
for j in range(field_count):
field_class, field_buffer = AnyDataObject.parse(conn)
row_fields.append(('column_{}'.format(j), field_class))
row_buffer += field_buffer
row_class = type(
'SQLResponseRow',
(ctypes.LittleEndianStructure,),
{
'_pack_': 1,
'_fields_': row_fields,
}
)
data_fields.append(('row_{}'.format(i), row_class))
data_buffer += row_buffer
data_class = type(
'SQLResponseData',
body_struct = Struct(following)
body_class, body_buffer = body_struct.parse(client)
body = body_class.from_buffer_copy(body_buffer)
if self.include_field_names:
field_count = body.fields.length
else:
field_count = body.field_count
data_fields = []
data_buffer = b''
for i in range(body.row_count):
row_fields = []
row_buffer = b''
for j in range(field_count):
field_class, field_buffer = AnyDataObject.parse(client)
row_fields.append(('column_{}'.format(j), field_class))
row_buffer += field_buffer
row_class = type(
'SQLResponseRow',
(ctypes.LittleEndianStructure,),
{
'_pack_': 1,
'_fields_': row_fields,
}
)
data_fields.append(('row_{}'.format(i), row_class))
data_buffer += row_buffer
data_class = type(
'SQLResponseData',