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-python-1.2.5 dict convert issue #789

Closed
984958198 opened this issue Dec 20, 2018 · 3 comments
Closed

MySQL-python-1.2.5 dict convert issue #789

984958198 opened this issue Dec 20, 2018 · 3 comments
Assignees

Comments

@984958198
Copy link

hue/desktop/core/ext-py/MySQL-python-1.2.5/MySQLdb/cursors.py

query = query % dict((key, db.literal(item))
                                     for key, item in args.iteritems())

I don't know how to write query
Do I need to change it to the following

query = query.format(**dict((key, db.literal(item))
                                     for key, item in args.iteritems()))


db.execute("insert into xx value({a})", **{"a":1})
@finchcn
Copy link

finchcn commented Mar 28, 2019

MySQL-python-1.2.5 is tooooooo old,and I cannot build on alpine
recommend use PyMySQL or other lib instead

@romainr
Copy link
Contributor

romainr commented Mar 28, 2019

Yes, and this will be clean-up with https://issues.cloudera.org/browse/HUE-8737 (@wing2fly )

@github-actions
Copy link

github-actions bot commented Mar 9, 2021

This issue is stale because it has been open 30 days with no activity and is not "roadmap" labeled or part of any milestone. Remove stale label or comment or this will be closed in 5 days.

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

4 participants