PHP Class Phalcon\Db\Adapter\MongoDB\UpdateResult

Afficher le fichier Open project: phalcon/incubator

Méthodes publiques

Méthode Description
__construct ( MongoDB\Driver\WriteResult $writeResult ) Constructor.
getMatchedCount ( ) : integer Return the number of documents that were matched by the filter.
getModifiedCount ( ) : integer | null Return the number of documents that were modified.
getUpsertedCount ( ) : integer Return the number of documents that were upserted.
getUpsertedId ( ) : mixed | null Return the ID of the document inserted by an upsert operation.
isAcknowledged ( ) : boolean Return whether this update was acknowledged by the server.

Method Details

__construct() public méthode

Constructor.
public __construct ( MongoDB\Driver\WriteResult $writeResult )
$writeResult MongoDB\Driver\WriteResult

getMatchedCount() public méthode

This method should only be called if the write was acknowledged.
See also: UpdateResult::isAcknowledged()
public getMatchedCount ( ) : integer
Résultat integer

getModifiedCount() public méthode

This value is undefined (i.e. null) if the write executed as a legacy operation instead of command. This method should only be called if the write was acknowledged.
See also: UpdateResult::isAcknowledged()
public getModifiedCount ( ) : integer | null
Résultat integer | null

getUpsertedCount() public méthode

This method should only be called if the write was acknowledged.
See also: UpdateResult::isAcknowledged()
public getUpsertedCount ( ) : integer
Résultat integer

getUpsertedId() public méthode

This value is undefined (i.e. null) if an upsert did not take place. This method should only be called if the write was acknowledged.
See also: UpdateResult::isAcknowledged()
public getUpsertedId ( ) : mixed | null
Résultat mixed | null

isAcknowledged() public méthode

If the update was not acknowledged, other fields from the WriteResult (e.g. matchedCount) will be undefined and their getter methods should not be invoked.
public isAcknowledged ( ) : boolean
Résultat boolean