Property Bytes
Bytes
Gets the version contents as byte array.
Declaration
public byte[] Bytes { get; }
Property Value
Type | Description |
---|---|
Byte[] |
The byte[] contents of this instance.
|
Remarks
This can be used to pass the version to a query via
row_version
SQL function, as shown in the example.
Examples
Passing row version as a byte array to a query.var preparedStatement = await client.PrepareAsync(
@"UPDATE MyTable $t SET NAME = 'John' WHERE id = ? AND row_version($t) = ?");
preparedStatement.SetVariable(1, 10);
preparedStatement.SetVariable(2, rowVersion.Bytes);
var queryResult = await client.QueryAsync(preparedStatement);