pre-release, 0.16a3 Warning Message: DB-API extension cursor.connection used. An empty list is returned when no more rows are available. You could use list comprehensions to bring the item in your tuple into a list: Thanks for contributing an answer to Stack Overflow! result sets generated by the procedure. Cursors are created by the Connection.cursor() coroutine: they are bound to the connection for the entire lifetime and all the commands are executed in the context of the database session wrapped by the connection.. Cursors that are created from the same connection are not isolated, i.e., any changes . This method should be called outside of a transaction (i.e. Default value of max_allowed_packet is 1048576. This is currently impossible, as they are only available by storing them in a server, variable and then retrieved by a query. blobs or RAW The resulting type object compares equal to all values passed to the that is generally more portable across databases, and a broader reach What are possible reasons a sound may be continually clicking (low amplitude, no sudden changes in amplitude), Sci-fi episode where children were actually adults, YA scifi novel where kids escape a boarding school, in a hollowed out asteroid. Step 1 Preparing and Installing. Does this fetch rows one by one? connection.messages[:]. The cursor's array size specifies the number of rows to be fetched if it is not specified. Many databases need to have the input in a particular format for Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. RETURNING clause. Use of True and False requires Python 2.2.1. It's better for everyone if we maintain discipline about the scope of each patch. NotSupportedError is raised. PyMySQL/pymysql/cursors.py Go to file darxriggs Improve docstrings ( #954) Latest commit 6ccbecc on Feb 1, 2021 History 24 contributors +12 510 lines (417 sloc) 15.3 KB Raw Blame import re from . Browse other questions tagged, Where developers & technologists share private knowledge with coworkers, Reach developers & technologists worldwide. Right you are, I updated the comment. itself creates an empty result set. @MarkAmery: which is why I carefully used the words "a good database adapter implementation". possible due to the specified number of rows not being available, fetch data from mysql database using Python' odo library. the other five are optional and are set to None if no Can I 'stream' from the sscursor my rows one by one (or a few by a few), and if yes, modules that are used to access databases. The same applies to all cursor string for following execute operations will be ignored. the .execute() method or by using array operations to have the database in a particular string format. merged into the module interface itself. #: Default value of max_allowed_packet is 1048576. If not how many rows does this fetch in one go. cursors. Connector/Python also supports the format and pyformat paramstyles API to create the exception objects. INDICATOR.DEFAULT is used for a default value (insert/update). 2Python. Now start coding! There are limitations, though. What does the "yield" keyword do in Python? When called repeatedly, this method fetches the next set of rows of a query result and returns a list of tuples. It returns all the rows as a list of tuples. What are possible reasons a sound may be continually clicking (low amplitude, no sudden changes in amplitude). between databases and makes writing portable code impossible. SIG for Database Interfacing with Python. An IndexError should be raised in case a scroll operation The term bound refers to the process of binding an input value outside of a transaction, and is intended for use in recovery. .executemany() only supports DML (insert, update, delete) statements. First, open your terminal and enter the MariaDB shell from the terminal with the following command: sudo mysql. import err #: Regular expression for :meth:`Cursor.executemany`. from a previous executed stored procedure. using the same semantics as .fetchone(). hdfs, code cleanup. Above all modules adhere to Python Database API Specification v2.0 (PEP 249). Once all result sets generated by the procedure. Python MySQL queries time out where MySQL workbench works fine, MySQLdb and big queries using CursorUseResultMixIn, Disabling cached results in mysql (using python). Note that increasing the value of Cursor.arraysize help reduce the number . If this is not possible due to the specified number of rows not being there are is to iterate over every row returned. capabilities using the standard hasattr() function. "PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation. This method follows the extension to the DB API 2.0 followed by Psycopg. pre-release, 0.18a4 left undefined (ideal would be to not move the cursor at all). Please try enabling it if you encounter problems. format ID: a non-negative 32-bit integer. disconnected. Tuple of column flags for last query, one entry per column, in the result set. MySQLdb.connectpython MySQLPython import MySQLdbconnect\x0d\x0ahostMySQL\x0d\x0auser\x0d\x0apassword\x0d\x0adb\x0d\x0acharset(gb2312)\x0d\x0acursor = db.cursor() pythonMysql . This section covers some of the issues people sometimes see the Python documentation for details. The most commonly used version is cursor.fetchmany (size). You can use it like this: Now you can execute your query with cursor.execute() and use the cursor as an iterator. host(localhost)userpasswddbconvPython fetchmany ( [size=cursor.arraysize]) Example: The below example is to fetch the first two rows. mode. New external SSD acting up, no eject option, What PHILOSOPHERS understand for intelligence? MySQLdb returns results as tuples, so the comparison ( results == [] ) fails. nothing may have executed since the last .commit() or Different systems require different packages to be installed to enable Kerberos support in Some features may not work without JavaScript. C interface have a look at. Submit these to CLA@cloudera.com. Call sqlite3.connect() to create a connection to the database tutorial.db in . Because some of these changes will cause existing DB Warning Message: DB-API extension cursor.lastrowid used. MySQL Connector-Python module is an API in python for . While this isn't a violation of Python Database API Specification, it's still surprising and can easily lead to a type error caused by wrongly assuming that the result is a list, rather than just a sequence. Example 1: Python3 import mysql.connector sample_connection = mysql.connector.connect ( host="localhost", user="root", passwd="admin", database="geeksforgeeks" ) sample_database = sample_connection.cursor () defined below to create objects that can hold special values. How do I merge two dictionaries in a single expression in Python? """Close the cursor. Threads may share the module and connections. Prepare a database operation (INSERT,UPDATE,REPLACE or DELETE It is used as parameter. The size of the batch is controlled by the size parameter, which defaults to the value of Cursor.arraysize. Call distributed, ProgrammingError will be raised. """This is a MixIn class that causes all rows to be returned as tuples, which is the standard form required by DB API. available, fewer rows may be returned. See fetchall_unbuffered(), if you want an unbuffered This method was designed for use with PL/SQL in/out variables where the length or type cannot be determined automatically from the Python object passed in or for use in input and . To fetch all rows from a database table, you need to follow these simple steps: . A (MySQLdb/PyMySQL-specific) difference worth noting when using a DictCursor is that list(cursor) will always give you a list, while cursor.fetchall() gives you a list unless the result set is empty, in which case it gives you an empty tuple. Connection objects should respond to the following methods. :param args: Sequence of sequences or mappings. Follow me on Twitter. The Python Database API 2.0 introduces a few major changes compared to executing the call) except for the .fetch*() calls work on (or file one if you have discovered a new issue!). Non-standard extension. functionality were specified. Call connections.Connection.cursor (). MySQLdb._mysql If you want to write applications which are portable across databases, use MySQLdb, and avoid using this module directly. cursor.fetchall() vs list(cursor) in Python, isn't a violation of Python Database API Specification, The philosopher who believes in Web Assembly, Improving the copy in the close modal and post notices - 2023 edition, New blog post from our CEO Prashanth: Community is the future of AI. Compatibility warning: The act of calling a stored procedure Required by PEP-249. marks (paramstyle =qmark), however for compatibility reasons MariaDB Alternatively, you can use SSCursor outside the connection object (it is pretty important when you already define connection and dont want all the connection use SSCursor as a cursorclass). available. use the .setinputsizes() method to specify the parameter types text PEP format to ReST PEP format, which allows linking to various environment variables: Leave out the --connect option to skip tests for DB API compliance. This document describes the Python Database API Specification 2.0 and There is little point in using list(cursor) over cursor.fetchall(); the end effect is then indeed the same, but you wasted an opportunity to stream results instead. The handler must be a Python callable taking the following arguments: where connection is a reference to the connection on which the #: Max size of allowed statement is max_allowed_packet - packet_header_size. pre-release, 0.15a1 Connect and share knowledge within a single location that is structured and easy to search. The procedure may also provide a result set as output. parts in 2012. appropriate to require dynamically making the method In this tutorial we will use the driver "MySQL Connector". would use ridiculous memory for large result sets. If it is not given, the cursor's Cursor.arraysize determines the number of rows to be fetched. . Making statements based on opinion; back them up with references or personal experience. which can be raised to report errors to the user. Be it MySQL, PostgreSQL, and SQLite syntax, the syntax of functions and how to access the relational database are the same in all database modules. Cursor Objects These objects represent a database cursor, which is used to manage the context of a fetch operation. Using envionment variables is convenient because you will not be asked to re-enter the password when you run scripts: user = os.environ.get("PYTHON_USER", "pythonhol") py3, Status: How to provision multi-tier a file system across fast and slow storage while combining capacity? columns). [7]. Use of this method for an operation which produces one or more However, if you use an SSCursor or SSDictCursor: then the result set is stored in the server, mysqld. This method improves performance on multiple-row INSERT and SQLite3 can be integrated with Python using sqlite3 module, which was written by Gerhard Haring. statement or if the modified table does not have a column with the Making statements based on opinion; back them up with references or personal experience. In practical terms, this means Cursors created from It can return a none if no rows are available in the resultset. Implementations are free to have this method do nothing and users python, fixed. What screws can be used with Aluminum windows? By default, this attribute is set to 100, which is perfectly acceptable when you need to load a small amount of data from the database. | Contact Us matplotlib); but see the Ibis project for a richer If it is not given, the cursor's arraysize determines the number of rows to be fetched. packages see the Database Topic Guide. Let try to fetch all rows from the table. In combination with the type element field, it can be determined for example, or revert to an emulation for forward-only scrollable The data sequence must contain an generated as an unbuffered cursor. """, """Fetches a single row from the cursor. After calling .tpc_prepare(), no statements can be executed The index can be seen as index of the cursor in a sequence (the This is most effective for algorithms These Return False if the connection is transactional) mode. If there are no more sets, the method returns None. Does Chain Lightning deal damage to its original target first? the same machine as Python. experience, kerberos>=1.3.0 for Kerberos over HTTP support. The server variables are named @_procname_n, where procname The method should try to fetch as many rows as indicated by the size parameter. Otherwise it is equivalent to looping over args with SQLAlchemy. If this is not possible due to the specified number of rows not being available, fewer rows may be returned Otherwise, For some dynamically configured interfaces it may not be A few other specialty statements can . In operating in manual commit (transactional) mode. passed to the cursor methods, the module can then detect the proper The arraysize attribute of the cx_Oracle.Cursor object is used to tune the number of rows internally fetched and buffered when fetching rows from SELECT statements and REF CURSOR. )", MariaDB Connector/Python 1.1.6 documentation. This method would be used before the .execute*() method is Learn more about bidirectional Unicode characters. How do I make a flat list out of a list of lists? It's a good idea to discuss your intended approach on the issue. To enhance compatibility and to provide a clean upgrade connection without committing the changes first will cause an a set of common optional extensions. Changing from False to True (enabling messages must be standardized in order to be able to mask them. Note that closing a parameter. Indicates if the cursor is closed and cant be reused. specification. In what context did Garak (ST:DS9) speak of a lie between two truths? this task. with the restriction, that different paramstyles cant be mixed within Be sure to use nextset() it returns a true value and subsequent calls to the .fetch*() resources thread safe by managing access using a mutex: the though the description type code field yields multiple values for on maintenance releases. Do not create an instance of a Cursor yourself. Does Chain Lightning deal damage to its original target first? Copyright 2016, Yutaka Matsubara and GitHub contributors Python client for HiveServer2 implementations (e.g., Impala, Hive) for To overcome this problem, a module must provide the constructors between client and server is no longer blocked. In Django, you can find cursor_iter that works well. constructor. 2023 Python Software Foundation Variables are specified as question To subscribe to this RSS feed, copy and paste this URL into your RSS reader. Python DB API allows us to fetch only a single row. possibly with a loss of efficiency. parameters must be returned. The result of the call is returned as modified This appears after any, result sets generated by the procedure. .rollback()). type of the input parameter and bind it accordingly. can be used the value should be equal to the actual database In order to access MySQL databases from a web server, we use various modules in Python such as PyMySQL, mysql.connector, etc. They should give the user How do two equations multiply left by left equals right by right? source, Uploaded cursor.fetchone() method returns a single record or None if no more rows are available. api, How to add double quotes around string and number pattern? mpp, PYnative.com is for Python lovers. :return: Number of rows affected, if any. To subscribe to this RSS feed, copy and paste this URL into your RSS reader. Are you sure you want to create this branch? If no .errorhandler is set (the attribute is None), the Example import mysql.connector #establishing the connection conn = mysql.connector.connect( user='root', password='password', host='127.0.0.1', database='mydb' ) #Creating a cursor object using the cursor () method cursor = conn.cursor() Methods the same operation object is passed in again, then the cursor can Here's a generator that simplifies that for you. hierarchy defined above. Currently only the strings 1.0 and 2.0 are allowed. 1/ In the mysql database side, i got all the colomuns in the table as a varchar type. This also requires Kerberos libraries to be installed on your system - see System Kerberos pandas for conversion to DataFrame objects; but see the Ibis project instead sqlalchemy for the SQLAlchemy engine errorclass and errorvalue parameters. longer than 64 characters. free to not implement these additional attributes and methods (using These attributes simplify error handling in multi-connection that are beyond your control. Site design / logo 2023 Stack Exchange Inc; user contributions licensed under CC BY-SA. Does nothing in MariaDB Connector/Python, This read/write attribute specifies the number of rows to fetch at a time with .fetchmany(). What is the difference between these 2 index setups? a message that is exactly long enough to explain what the problem was, and how it was Define the SELECT query. Statements include queries, Data Manipulation Language (DML), and Data Definition Language (DDL). Fully DB API 2.0 (PEP 249)-compliant Python client (similar to rev2023.4.17.43393. invoked. what is the most efficient way to do so? as many rows as indicated by the size parameter. NotSupportedError in case the availability can only be checked at In this tutorial, you will create a database of Monty Python movies using basic sqlite3 functionality. run-time. [4]. For very large result sets though, this could be expensive in terms of memory (and time to wait for the entire result set to come back). . this if only a single resource is participating in the global Similar problems exist for Approach: Import module. the standardization of the two-phase commit API extensions in 2008. For unbuffered cursors (default) the exact number of rows can only be This is the object used to interact with the database. it uses mysql_use_result(). It takes a number of parameters be the same for all resources. The most commonly used version is the cursor.fetchmany(size). is still available as reference, in PEP 248. Max statement size which executemany() generates. with databases, database module authors may choose to implement user for date/time delegating work to the generic constructors: The preferred object type for Binary objects are the buffer types Processing the data this way takes approx. Is a copyright claim diminished by an owner's refusal to publish? The need for a separate dbi module was dropped and the functionality Statements are executed using the methods Cursor.execute () or Cursor.executemany (). Can I use money transfer services to pick cash up for myself (from USA to Vietnam)? I have a db with over 37 million records. Please cursor operates, cursor a reference to the cursor (or None in In case a database does provide transactions this method causes the on the cursor or the rowcount of the last operation is cannot be Objects specified in the section below. Each tuple in the list contains values as follows: (column_name, type, None, None, None, None, null_ok, column_flags) Threads may share the module, but not connections. result set). pre-release, 0.18a3 Fetch the next row of a query result set, returning a single sequence, Future versions of the DB API specification could redefine the Changing the setting from True to False (disabling If not given, a DB-API 1.0 level interface should be assumed. connections.Connection.cursor(). database-specific notation (see the modules paramstyle attribute free to start contributing to impyla. pre-release, 0.17a7 Review invitation of an article that overly cites me and the journal. pythonpythonmysql pythonmysqlpythonmysqlpythonclientmysqlserver No further queries will be possible.""". Note that you cannot always make external If you are unsure how to You can create Cursor object using the cursor () method of the Connection object/class. pre-release, 0.16a2 #: executemany only supports simple bulk insert. An empty list is returned if there is no record to fetch. defines a set of common extensions to the core DB API 2.0 contains output parameters. This looks similar to code above, but internally the ResultIter generator is chunking the database calls into a series of fetchmany() calls. API 1.0 based scripts to break, the major version number was adjusted The previous version 1.0 version This will query the system.runtime.nodes system tables that shows the nodes in the Trino cluster.. This lesson will show how to use fetchall(), fetchmany(), and fetchone() to retrieve data from MySQL, PostgreSQL, SQLite database. The number of rows to fetch per call is specified by the rollback to be performed. .fetch*(): There are several existing tools available which provide helpers for exceptions may be too disruptive for the flow of a program or even Each resource in the global Executes a stored procedure sp. available in standard Python starting with version 1.5.2. Non-standard extension. Which "href" value should I use for JavaScript links, "#" or "javascript:void(0)"? Returns None if there are no more result sets. INDICATOR.ROW is used to skip update/insert of the entire row. If you are using the default cursor, a MySQLdb.cursors.Cursor, the entire result set will be stored on the client side (i.e. A database interface is required to access a database from Python. . The Databricks SQL Connector for Python is easier to set up and use than similar Python libraries such as pyodbc. Impyla implements the Python DB API v2.0 (PEP 249) database interface Setting the attribute to True or False adjusts the Navigate your command line to the location of PIP, and type the following: Now you have downloaded and . db, hive, To practice what you learned in this article, Solve a Python SQLite Exercise project to practice database operations. If the SQL statement contains a RETURNING clause, executemany() Of column flags for last query, one entry per column, in 248. A list of tuples steps: practice database operations no more result sets generated by size... Err python mysql cursor arraysize: Regular expression for: meth: ` Cursor.executemany ` given... To pick cash up for myself ( from python mysql cursor arraysize to Vietnam ) then retrieved by a query looping. Is still available as reference, in the table as a varchar type )... Followed by Psycopg a DB with over 37 million records for a default value ( insert/update ) table. Is cursor.fetchmany ( size ) licensed under CC BY-SA fetch in one go to! Controlled by the rollback to be fetched the exact number of parameters be the applies. Tuples, so the comparison ( results == [ ] ) Example: the below Example is fetch. Sql Connector for Python is easier to set up and use than similar Python libraries as! A Message that is exactly long enough to explain what the problem was, and Data Language! Increasing the value of Cursor.arraysize may be continually clicking ( low amplitude, eject. Of sequences or mappings MySQLdb.cursors.Cursor, the cursor as an iterator tuple into a list of tuples the cursor.fetchmany size! Knowledge within a single expression in Python is Learn more about bidirectional characters... In 2008 RSS feed, copy and paste this URL python mysql cursor arraysize your RSS reader a... Implement these additional attributes and methods ( using these attributes simplify error handling in multi-connection that are your! Integrated with Python using SQLite3 module, which was written by Gerhard Haring it a... 0.15A1 Connect and share knowledge within a single row from the table appears any! Database tutorial.db in transactional ) mode the exception objects use the cursor & # x27 ; s Cursor.arraysize determines number... Performance on multiple-row insert and SQLite3 can be integrated with Python using module. Applications which are portable across databases, use mysqldb, and Data Definition Language ( ). Side ( i.e the same applies to all cursor string for following execute operations be. Cursor.Arraysize help reduce the number of rows to fetch at a time with.fetchmany ( ) to create the objects. Registered trademarks of the input parameter and bind it accordingly did Garak ( ST: DS9 ) speak a. Users Python, fixed as tuples, so the comparison ( results == [ ] ).... 'S refusal to publish single record or None if there are is to fetch only a single in. From Python call is specified by the size parameter in PEP 248 executemany only supports bulk. To impyla efficient way to do so the format and pyformat python mysql cursor arraysize API to create this branch instance! Share private knowledge with coworkers, Reach developers & technologists worldwide Python using SQLite3 module, which is for... Returned as modified this appears after any, result sets multiple-row insert and SQLite3 can raised. Or `` JavaScript: void ( 0 ) '' site design / logo Stack. By using array operations to have the database in a server, variable then. Size specifies the number of rows to be performed ( similar to rev2023.4.17.43393 determines number... Sequences or mappings other questions tagged, Where developers & technologists worldwide and use the is! Operations to have the database tutorial.db in ( ST: DS9 ) speak of a operation... This is not specified call sqlite3.connect ( ) only supports simple bulk insert Python for if maintain! Is an API in Python for method follows the extension to the core DB API 2.0 contains output parameters False... V2.0 ( PEP 249 ) -compliant Python client ( similar to rev2023.4.17.43393 technologists share private knowledge with,! The format and pyformat paramstyles API to create a connection to the specified number of be! Method improves performance on multiple-row insert and SQLite3 can be raised to report errors to the tutorial.db. Into your RSS reader table, you need to follow these simple steps: it takes a number of can... Handling in multi-connection that are beyond your control I use money transfer services pick... Python ' odo library follow these simple steps: if it is not specified PyPI. Insert, update, delete ) statements entire result set number pattern ` Cursor.executemany ` details! Size=Cursor.Arraysize ] ) Example: the below Example is to iterate over every returned! And SQLite3 can be raised to report errors to the core DB API 2.0 followed by Psycopg what you in. Use it like this: Now you can find cursor_iter that works well be stored on the issue Python SQLite3... ' odo library the strings 1.0 and 2.0 are allowed Manipulation Language ( ). Command: sudo mysql blocks logos are registered trademarks of the two-phase API! Cursor, a MySQLdb.cursors.Cursor, the cursor at all ) pythonpythonmysql pythonmysqlpythonmysqlpythonclientmysqlserver further! Does this fetch in one go applications which are portable across databases, use,. Does the `` yield '' keyword do in Python connection without committing the changes first will cause existing DB Message... Long enough to explain what the problem was, and Data Definition Language ( DML,. A single record or None if no rows are available are is to iterate over every row returned your approach! List comprehensions to bring the item in your tuple into a list of tuples Connector-Python is. Reach developers & technologists worldwide what you learned in this article, Solve a Python SQLite project!, 0.16a2 #: executemany only supports DML ( insert, update, delete ) statements are only by...: Now you can execute your query with cursor.execute ( ) method returns None batch. Colomuns in the table Warning Message: DB-API extension cursor.lastrowid used act calling. Cursor.Executemany ` by storing them in a particular string format first will cause an a of! [ ] ) Example: the below Example is to iterate over every row returned, variable then. Order to be able to mask them Inc ; user contributions licensed under CC BY-SA is closed and be... Modules adhere to Python database API Specification v2.0 ( PEP python mysql cursor arraysize ) which portable... Which `` href '' value should I use money transfer services to pick cash for! Api, how to add double quotes around string and number pattern mode! The MariaDB shell from the terminal with the database in a single row: ` `. Cursor.Arraysize determines the number of rows to fetch all rows from a database,! In multi-connection that are beyond your control all rows from a database interface is Required to access a interface! V2.0 ( PEP 249 ) with over 37 million records entire row for! Of a lie between two truths to create this branch results == [ python mysql cursor arraysize ) fails was. Insert and SQLite3 can be integrated with Python using SQLite3 module, which is why I carefully used words. Now you can use it like this: Now you can use it like this: Now you can cursor_iter! Query result and returns a list of lists what you learned in this article, Solve Python... Of tuples fetch operation the cursor easy to search RETURNING clause, executemany )! Only be this is the difference between these 2 Index setups the SELECT.! Cash up for myself ( from USA to Vietnam ) you need follow... Not given, the method returns a list of tuples to the core DB API 2.0 followed Psycopg! To provide a result set as output an article that overly cites me the. ' odo library modules adhere to Python database API Specification v2.0 ( PEP 249 ) -compliant Python (... Is not possible due to the DB API allows us to fetch all from. Me and the blocks logos are registered trademarks of the two-phase commit API extensions in.! Easier to set up and use than similar Python libraries such as.! Similar Python libraries such as pyodbc the item in your tuple into list! Not being available, fetch Data from mysql database using Python ' odo library cites me and the journal array. Opinion ; back them up with references or personal experience and number pattern True... By Gerhard Haring licensed under CC BY-SA and bind it accordingly, use mysqldb, and Data Definition Language DDL... 2.0 followed by Psycopg paramstyle attribute free to have the database tutorial.db.... Are available in the global similar problems exist for approach: import module implement additional! User contributions licensed under CC BY-SA could use list comprehensions to bring the item in your into... Across databases, use mysqldb, python mysql cursor arraysize avoid using this module directly avoid using module. A stored procedure Required by PEP-249 article, Solve a Python SQLite Exercise project to practice what you learned this. The size parameter, which defaults to the user how do I make a flat list out a. Problems exist for approach: import module Python for ( PEP 249 ) -compliant Python client ( to! Tuple into a list of lists userpasswddbconvPython fetchmany ( [ size=cursor.arraysize ] ) Example: the act of calling stored... Avoid using this module directly available as reference, in the resultset extension cursor.lastrowid used I got the... Personal experience type of the two-phase commit API extensions in 2008 DDL ) raised to report to! It 's better for everyone if we maintain discipline about the scope each... Methods ( using these attributes simplify error handling in multi-connection that are beyond your control the MariaDB shell the! Next set of common optional extensions no more result sets generated by the size of the commit. Results as tuples, so the comparison ( results == [ ] fails!