Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

你好,MySQL的里查询设置类型字段,得出结果有误 #4

Open
ulikestyle opened this issue Sep 7, 2018 · 1 comment
Open

Comments

@ulikestyle
Copy link

数据库字段类型如下
set('hot','index','recommended','top')NOT NULL

通过find()操作,得到的值u'flag':set([u'hot']),与预期不符

image

@ulikestyle
Copy link
Author

暂时使用此方法解决,判断下类型,对set类型进行特殊处理
if isinstance(val,set):
val =“,”.join(val)

我想的话,理想情况下应该是在 self.cur = self.con.cursor(dictionary=True) 这里处理,但没找到理想的解决方案,先MARK,后面再跟进下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant