Reimplement JSON support (#310)

This commit is contained in:
INADA Naoki
2018-12-13 12:41:53 +09:00
committed by GitHub
parent bf77dd0633
commit fe8032430c
3 changed files with 6 additions and 16 deletions

View File

@ -183,7 +183,7 @@ class Connection(_mysql.connection):
if use_unicode:
for t in (FIELD_TYPE.STRING, FIELD_TYPE.VAR_STRING, FIELD_TYPE.VARCHAR, FIELD_TYPE.TINY_BLOB,
FIELD_TYPE.MEDIUM_BLOB, FIELD_TYPE.LONG_BLOB, FIELD_TYPE.BLOB):
FIELD_TYPE.MEDIUM_BLOB, FIELD_TYPE.LONG_BLOB, FIELD_TYPE.BLOB, FIELD_TYPE.JSON):
self.converter[t] = _bytes_or_str
self.encoders[unicode] = unicode_literal