Uploaded image for project: 'MariaDB Connector/Python'
  1. MariaDB Connector/Python
  2. CONPY-29

Support pyformat and format paramstyle

    XMLWordPrintable

Details

    • Task
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 0.9.52, 0.9.1
    • 0.9.52
    • DBAPI 2.0
    • None

    Description

      Currently only paramstyle 'qmark' is supported. This makes it hard to migrate application which use the pyformat style (which is default in MySQLDB and MySQL Connector/C).

      Suggestion: Additionally support the following paramstyles:

      1. format

      cursor.execute("SELECT a FROM b WHERE id=%s", ('foo',))
      

      2. pyformat

      cursor.execute("SELECT a FROM b WHERE id=%(name)s", {'name' : 'foo'}))
      

      mixing paramstyles shouldn't be allowed and should result in a parsing error.

      Attachments

        Activity

          People

            georg Georg Richter
            georg Georg Richter
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.