Click or drag to resize

QdbStringCompareAndSwap 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 string CompareAndSwap(
	string content,
	string comparand,
	DateTime? expiryTime = null
)

Parameters

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

Return Value

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