Click or drag to resize

QdbBlobCompareAndSwap Method

Atomically compares and replaces the content when it matches.

Namespace:  Quasardb
Assembly:  Quasardb (in Quasardb.dll) Version: 3.15.0.0 (3.15.0.0)
Syntax
public byte[] CompareAndSwap(
	byte[] content,
	byte[] comparand,
	DateTime? expiryTime = null
)

Parameters

content
Type: SystemByte
The new content to put in the blob.
comparand
Type: SystemByte
The content to be compared to.
expiryTime (Optional)
Type: SystemNullableDateTime
The expiry time to set if the blob's content is replaced.

Return Value

Type: Byte
The previous content of the blob if it didn't match; null if it matched.
Exceptions
ExceptionCondition
QdbAliasNotFoundExceptionThe blob is not present in the database.
QdbIncompatibleTypeExceptionThe database entry is not a blob.
See Also