connection
This page is part of MariaDB's Enterprise Documentation.
The parent of this page is: Connector/Python API
Topics on this page:
Overview
Returns the connection object that was used to create the cursor. (read-only)
See also: MariaDB Connector/Python 1.1 and in 1.0
EXAMPLES
In the following example, the text "They are the same" will be output:
import mariadb
conn = mariadb.connect(
host = '127.0.0.1',
user = 'root',
password = 'secret',
)
cursor = conn.cursor()
if cursor.connection == conn:
print("They are the same")
conn.close()
CHANGE HISTORY
Release Series | History |
---|---|
1.1 |
|
1.0 |
|