Vous êtes un professionnel et vous avez besoin d'une formation ?
Sensibilisation àl'Intelligence Artificielle
Voir le programme détaillé
Module « mariadb »
Classe « connection »
Informations générales
Héritage
builtins.object
connection
Définition
class connection (builtins.object ):
Description [extrait de connection.__doc__ ]
The Connection class is used to open and manage a connection to a
MariaDB or compatible database server
Constructeur(s)
Liste des attributs statiques
auto_reconnect <attribute 'auto_reconnect' of 'mariadb.connection' objects>
autocommit <attribute 'autocommit' of 'mariadb.connection' objects>
character_set <member 'character_set' of 'mariadb.connection' objects>
collation <member 'collation' of 'mariadb.connection' objects>
connection_id <attribute 'connection_id' of 'mariadb.connection' objects>
converter <member 'converter' of 'mariadb.connection' objects>
database <attribute 'database' of 'mariadb.connection' objects>
DatabaseError <attribute 'DatabaseError' of 'mariadb.connection' objects>
dsn <member 'dsn' of 'mariadb.connection' objects>
Error <attribute 'Error' of 'mariadb.connection' objects>
IntegrityError <attribute 'IntegrityError' of 'mariadb.connection' objects>
InterfaceError <attribute 'InterfaceError' of 'mariadb.connection' objects>
InternalError <attribute 'InternalError' of 'mariadb.connection' objects>
NotSupportedError <attribute 'NotSupportedError' of 'mariadb.connection' objects>
OperationalError <attribute 'OperationalError' of 'mariadb.connection' objects>
ProgrammingError <attribute 'ProgrammingError' of 'mariadb.connection' objects>
server_info <attribute 'server_info' of 'mariadb.connection' objects>
server_name <member 'server_name' of 'mariadb.connection' objects>
server_port <member 'server_port' of 'mariadb.connection' objects>
server_version <attribute 'server_version' of 'mariadb.connection' objects>
server_version_info <member 'server_version_info' of 'mariadb.connection' objects>
tls_cipher <member 'tls_cipher' of 'mariadb.connection' objects>
tls_version <member 'tls_version' of 'mariadb.connection' objects>
unix_socket <member 'unix_socket' of 'mariadb.connection' objects>
user <attribute 'user' of 'mariadb.connection' objects>
Warning <attribute 'Warning' of 'mariadb.connection' objects>
warnings <attribute 'warnings' of 'mariadb.connection' objects>
Liste des opérateurs
Opérateurs hérités de la classe object
__eq__ ,
__ge__ ,
__gt__ ,
__le__ ,
__lt__ ,
__ne__
Liste des méthodes
Toutes les méthodes
Méthodes d'instance
Méthodes statiques
Méthodes dépréciées
__enter__
(read) [extrait de __enter__.__doc__ ]
__exit__
-- [extrait de __exit__.__doc__ ]
change_user(user, password, database)
Parameters: [extrait de change_user.__doc__ ]
close()
Close the connection now (rather than whenever .__del__() is called). [extrait de close.__doc__ ]
commit()
Commit any pending transaction to the database. [extrait de commit.__doc__ ]
connect(*args, **kwargs)
Establishes a connection to a database server and returns a connection [extrait de connect.__doc__ ]
cursor
Returns a new cursor object for the current connection. [extrait de cursor.__doc__ ]
escape_string(statement)
Parameters: [extrait de escape_string.__doc__ ]
get_server_version
Returns a tuple representing the version of the connected server in [extrait de get_server_version.__doc__ ]
kill(connection_id)
Parameters: [extrait de kill.__doc__ ]
ping()
Checks if the connection to the database server is still available. [extrait de ping.__doc__ ]
reconnect()
tries to reconnect to a server in case the connection died due to timeout [extrait de reconnect.__doc__ ]
reset()
Resets the current connection and clears session state and pending [extrait de reset.__doc__ ]
rollback()
Causes the database to roll back to the start of any pending transaction [extrait de rollback.__doc__ ]
tpc_begin(xid)
Parameter: [extrait de tpc_begin.__doc__ ]
tpc_commit
Optional parameter: [extrait de tpc_commit.__doc__ ]
tpc_prepare(xid)
Parameter: [extrait de tpc_prepare.__doc__ ]
tpc_recover()
Returns a list of pending transaction IDs suitable for use with [extrait de tpc_recover.__doc__ ]
tpc_rollback
Optional parameter: [extrait de tpc_rollback.__doc__ ]
xid(format_id, global_transaction_id, branch_qualifier)
Parameters: [extrait de xid.__doc__ ]
Méthodes héritées de la classe object
__delattr__ ,
__dir__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__init_subclass__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
Vous êtes un professionnel et vous avez besoin d'une formation ?
Calcul scientifique avec Python
Voir le programme détaillé
2025 © SARL Infini Software - Tous droits réservés
Mentions légales
Les informations présentes dans ce site vous sont fournies dans le but de vous aider à acquérir les compétences nécessaires à
l'utilisation des langages ou des technologies considérés. Infini Software ne pourra nullement être tenu responsable de l'utilisation
des informations présentes dans ce site.
De plus, si vous remarquez des erreurs ou des oublis dans ce document, n'hésitez surtout pas à nous le signaler en envoyant un mail
à l'adresse : .
Les autres marques et les noms de produits cités dans ces documents sont la propriété de leurs éditeurs respectifs.
Améliorations / Corrections
Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.
Emplacement :
Description des améliorations :