Participer au site avec un Tip
Rechercher
 

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 :

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)

Signature du constructeur Description
__new__(*args, **kwargs) Create and return a new object. See help(type) for accurate signature. [extrait de __new__.__doc__]
__init__(self, /, *args, **kwargs) Initialize self. See help(type(self)) for accurate signature. [extrait de __init__.__doc__]

Liste des attributs statiques

Nom de l'attribut Valeur
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
Signature de la méthodeDescription
__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__