Skip to content

Feature request: Add mogrify to Cursor #476

Closed

Description

@steveteahan

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!

Activity

  1. changed the title [-]Add mogrify to Cursor[/-] [+]Feature request: Add mogrify to Cursor[/+] on Jan 16, 2021
  2. steveteahan commented on Jan 16, 2021

    @steveteahan
    ContributorAuthor

    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.

  3. methane commented on Jan 18, 2021

    @methane
    Member

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

  4. methane commented on Jan 18, 2021

    @methane
    Member

    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.

  5. steveteahan commented on Jan 18, 2021

    @steveteahan
    ContributorAuthor

    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.

  6. moved this from Todo to In Progress in mysqlclient v2.2on May 15, 2023
  7. added a commit that references this issue on May 15, 2023
  8. moved this from In Progress to Done in mysqlclient v2.2on May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions