MySQL Forums
Forum List  »  Connector/Python

Prepared Cursors, raw=True?
Posted by: Geoffrey Wiseman
Date: July 31, 2017 07:54AM

I'm comparing results from two MySQL databases with Python. The first database query is batch, to retrieve all the comparison records from the source, so I didn't prepare it. I'm getting back Unicode strings for the most part, as expected (use_unicode=True).

The target query is run once per record, so I'm using a cursor with prepared=True. The results I'm getting back from this cursor are bytearrays, so they don't match without conversion.

Is it true that prepared cursors in Connector/Python return raw values? Seems to be what I'm seeing. Doesn't change anything if I set raw=False. I can't find anything in the documentation that suggests this is true, but ... seems to be experimentally true.

Options: ReplyQuote

Written By
Prepared Cursors, raw=True?
July 31, 2017 07:54AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.