Search Results
https://dev.mysql.com/doc/connector-python/en/connector-python-api-mysqlconnection-commit.html
This method sends a COMMIT statement to the MySQL server, committing the current transaction. Since by default Connector/Python does not autocommit, it is important to call this method after every transaction that modifies data for tables that use ...
https://dev.mysql.com/doc/connector-python/en/connector-python-api-mysqlconnection-cursor.html
If prepared is True, the cursor is used for executing prepared statements. Syntax: cursor = cnx.cursor([arg=value[, arg=value]...]) This method returns a MySQLCursor() object, or a subclass of it depending on the passed arguments. For more ...
https://dev.mysql.com/doc/connector-python/en/connector-python-api-mysqlconnection-database.html
This property sets the current (default) database by executing a USE statement. The property can also be used to retrieve the current database name. >>> cnx.database = 'test' >>> cnx.database = 'mysql' >>> cnx.database u'mysql' Returns a string.
https://dev.mysql.com/doc/connector-python/en/connector-python-api-mysqlconnection-in-transaction.html
The value is True regardless of whether you start a transaction using the start_transaction() API call or by directly executing an SQL statement such as START TRANSACTION or BEGIN. This property returns True or False to indicate whether a ...
https://dev.mysql.com/doc/connector-python/en/connector-python-api-mysqlconnection-rollback.html
This method sends a ROLLBACK statement to the MySQL server, undoing all data changes from the current transaction. By default, Connector/Python does not autocommit, so it is possible to cancel transactions when using transactional storage engines ...
https://dev.mysql.com/doc/connector-python/en/connector-python-api-mysqlconnection.html
It also used to send commands and SQL statements and read the results. The MySQLConnection class is used to open and manage a connection to a MySQL server.
https://dev.mysql.com/doc/connector-python/en/connector-python-api-mysqlcursor-add-attribute.html
value: a value converted to the MySQL Binary Protocol, similar to how prepared statement parameters are converted. Syntax: cursor.add_attribute(name, value) Adds a new named query attribute to the list, as part of MySQL server's Query Attributes ...
https://dev.mysql.com/doc/connector-python/en/connector-python-api-mysqlcursor-fetchall.html
Syntax: rows = cursor.fetchall() The method fetches all (or all remaining) rows of a query result set and returns a list of tuples. If no more rows are available, it returns an empty list.
https://dev.mysql.com/doc/connector-python/en/connector-python-api-mysqlcursor-fetchmany.html
You must fetch all rows for the current query before executing new statements using the same connection. Syntax: rows = cursor.fetchmany(size=1) This method fetches the next set of rows of a query result and returns a list of tuples. If no more ...
https://dev.mysql.com/doc/connector-python/en/connector-python-api-mysqlcursor-fetchone.html
Syntax: row = cursor.fetchone() This method retrieves the next row of a query result set and returns a single sequence, or None if no more rows are available. By default, the returned tuple consists of data returned by the MySQL server, converted ...