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 :

Vous êtes un professionnel et vous avez besoin d'une formation ? Calcul scientifique
avec Python
Voir le programme détaillé
Module « pymongo »

Classe « WriteConcern »

Informations générales

Héritage

builtins.object
    WriteConcern

Définition

class WriteConcern(builtins.object):

help(WriteConcern)

WriteConcern

:param w: (integer or string) Used with replication, write operations
      will block until they have been replicated to the specified number
      or tagged set of servers. `w=<integer>` always includes the replica
      set primary (e.g. w=3 means write to the primary and wait until
      replicated to **two** secondaries). **w=0 disables acknowledgement
      of write operations and can not be used with other write concern
      options.**
:param wtimeout: (integer) **DEPRECATED** Used in conjunction with `w`.
      Specify a value in milliseconds to control how long to wait for write
      propagation to complete. If replication does not complete in the given
      timeframe, a timeout exception is raised.
:param j: If ``True`` block until write operations have been committed
      to the journal. Cannot be used in combination with `fsync`. Write
      operations will fail with an exception if this option is used when
      the server is running without journaling.
:param fsync: If ``True`` and the server is running without journaling,
      blocks until the server has synced all data files to disk. If the
      server is running with journaling, this acts the same as the `j`
      option, blocking until write operations have been committed to the
      journal. Cannot be used in combination with `j`.


.. versionchanged:: 4.7
    Deprecated parameter ``wtimeout``, use :meth:`~pymongo.timeout`.

Constructeur(s)

Signature du constructeur Description
__init__(self, w: 'Optional[Union[int, str]]' = None, wtimeout: 'Optional[int]' = None, j: 'Optional[bool]' = None, fsync: 'Optional[bool]' = None) -> 'None'

Liste des propriétés

Nom de la propriétéDescription
acknowledgedIf ``True`` write operations will wait for acknowledgement before [extrait de acknowledged.__doc__]
documentThe document representation of this write concern. [extrait de document.__doc__]
is_server_defaultDoes this WriteConcern match the server default. [extrait de is_server_default.__doc__]

Liste des opérateurs

Signature de l'opérateur Description
__eq__(self, other: 'Any') -> 'bool'
__ne__(self, other: 'Any') -> 'bool'

Opérateurs hérités de la classe object

__ge__, __gt__, __le__, __lt__

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
__repr__(self) -> 'str'

Méthodes héritées de la classe object

__delattr__, __dir__, __format__, __getattribute__, __getstate__, __hash__, __init_subclass__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Vous êtes un professionnel et vous avez besoin d'une formation ? Programmation Python
Les fondamentaux
Voir le programme détaillé