Skip to content

Feature request: Add mogrify to Cursor #476

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

Closed
steveteahan opened this issue Jan 16, 2021 · 4 comments
Closed

Feature request: Add mogrify to Cursor #476

steveteahan opened this issue Jan 16, 2021 · 4 comments

Comments

@steveteahan
Copy link
Contributor

The reasoning behind this change was already covered in PyMySQL: PyMySQL/PyMySQL#330

I was wondering if there was any chance that this change would be considered for mysqlclient? I didn't see it mentioned in any of the previous issues. Having this consistent interface between PyMySQL and mysqlclient would make it simpler to support both projects.

Thank you for your time!

@steveteahan steveteahan changed the title Add mogrify to Cursor Feature request: Add mogrify to Cursor Jan 16, 2021
@steveteahan
Copy link
Contributor Author

I have what I believe to be an initial working version of this. I need to expand the testing, but I'll hold off until I get a sense for whether this would be considered as a feature or not.

@methane
Copy link
Member

methane commented Jan 18, 2021

It makes sense. Compatibility between mysqlclient and PyMySQL (except low level APIs provided by MySQLdb._mysql module) is welcome.

@methane
Copy link
Member

methane commented Jan 18, 2021

FWI, PyMySQL and mysqlclient provides Cursor._executed attribute.
I think this can be a public API (e.g. Cursor.last_executed_query) and both mysqlclient and PyMySQL implemented it.

@steveteahan
Copy link
Contributor Author

Thank you for the feedback, @methane. I was also thinking about exposing _executed as part of the public API. I think that having both could be useful depending on whether the query is needed before or after it is executed. The Cursor.last_executed_query change seems trivial at the surface, so I can probably get a PR together for that too.

steveteahan added a commit to steveteahan/mysqlclient that referenced this issue Jan 19, 2021
@methane methane mentioned this issue Mar 27, 2021
3 tasks
@methane methane mentioned this issue Oct 19, 2021
3 tasks
@methane methane moved this to Todo in mysqlclient v2.2 May 9, 2023
@methane methane moved this from Todo to In Progress in mysqlclient v2.2 May 15, 2023
methane added a commit that referenced this issue May 15, 2023
Implements #476

Co-authored-by: Inada Naoki <[email protected]>
@methane methane closed this as completed May 15, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in mysqlclient v2.2 May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants