Version¶
- class borneo.Version(version)[source]¶
Bases:
objectVersion is an opaque class that represents the version of a row in the database. It is returned by successful
GetRequestand can be used inPutRequest.set_match_version()andDeleteRequest.set_match_version()to conditionally perform those operations to ensure an atomic read-modify-write cycle. This is an opaque object from an application perspective.Use of Version in this way adds cost to operations so it should be done only if necessary.
- Parameters:
version (bytearray) – a bytearray.
- Raises:
IllegalArgumentException – raises the exception if version is not a bytearray.
Methods Summary
create_version(version)Returns an instance of
Version.Returns the bytearray from the Version.
Methods Documentation
- static create_version(version)[source]¶
Returns an instance of
Version.- Parameters:
version (bytearray) – a bytearray or None.
- Returns:
an instance of Version.
- Return type:
- Raises:
IllegalArgumentException – raises the exception if version is not a bytearray or None.