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

Support dictionary option in cursor class

    XMLWordPrintable

    Details

      Description

      Support returning Dict class instead of default list when fetching rows:

      import mariadb
       
      connection=mariadb.connect(user="user")
      cursor=connection.cursor(dictionary=True)
      cursor.execute("SELECT 1 as foo")
      row= cursor.fetchone
      print(row)
      

      should return

      {'foo': 1}
      

        Attachments

          Activity

            People

            Assignee:
            georg Georg Richter
            Reporter:
            georg Georg Richter
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration