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

SELECT ? returns wrong type

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 2.0.0-rc
    • 2.0.1
    • DBAPI 2.0
    • None
    • 3.13

    Description

      Type tests for date/datetime fail in SQLAlchemy test suite - instead of date/datetime a string will be returned.

      With C/C Python 1.1:

      import mariadb
      >>> import datetime
      >>> data = datetime.date(2012, 10, 15)
      >>> conn=mariadb.connect()
      >>> cursor=conn.cursor()
      >>> cursor.execute("select ?", (data,))
      >>> cursor.fetchone()
      (datetime.date(2012, 10, 15),)
      

      With C/C Python 2.0:

      >>> import mariadb
      >>> import datetime
      >>> data = datetime.date(2012, 10, 15)
      >>> conn=mariadb.connect(user="georg")
      >>> cursor=conn.cursor()
      >>> cursor.execute("select ?", (data,))
      >>> cursor.fetchone()
      ('2012-10-15',)
      

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            georg Georg Richter
            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.