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

Converters are ignored on queries from cursor.fetchall

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.1.2
    • 1.1.4
    • DBAPI 2.0
    • None
    • 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

            georg Georg Richter
            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.