The code currently checks for type(bol)==bytearray, but how can I get it to do the same for longtext columns? I've tried use_pure = true/false as well as raw = true/false. I have mysql-python-connector 8.0.6 installed, running python 3.5.4
it will return b'data'
vs data
for longtext
columns
class MyConverter(mysql.connector.conversion.MySQLConverter):
def row_to_python(self, row, fields):
row = super(MyConverter, self).row_to_python(row, fields)
def to_unicode(col):
if type(col) == bytearray:
return col.decode('utf-8')
return col
return[to_unicode(col) for col in row]