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

Converters are ignored on queries from cursor.fetchall

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.2
    • Fix Version/s: 1.1.4
    • Component/s: DBAPI 2.0
    • Labels:
      None
    • Python Version:
      3.10

      Description

      Values aren't being casted accurately in 1.1.x. Casting worked fine until last 1.0.x. Setting the converter option with a map that looks like the following block:

      # converter map
      {
      	FIELD_TYPE.NEWDECIMAL: float,
      	FIELD_TYPE.DATETIME: get_datetime,
      }
       
      # sample snippet
      >>> cursor.execute("select 1.1-2.1")
      >>> cursor.fetchall()
      [(Decimal('-1.0'),)] # in version 1.1.3
      [(-1.0,),] # in version 1.0.x
      

        Attachments

          Activity

            People

            Assignee:
            georg Georg Richter
            Reporter:
            gavin Gavin D'souza
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.