Package oracle.nosql.driver
Class Version
java.lang.Object
oracle.nosql.driver.Version
Version is an opaque class that represents the version of a row in the
database. It is returned by successful
NoSQLHandle.get(oracle.nosql.driver.ops.GetRequest)
operations
and can be used in PutRequest.setMatchVersion(oracle.nosql.driver.Version)
and
DeleteRequest.setMatchVersion(oracle.nosql.driver.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
-
Method Summary
Modifier and TypeMethodDescriptionstatic Version
createVersion
(byte[] version) Creates a Version instance from a byte[] which may have been acquired from a query using the row_version() function which returns a FieldValue of type BINARY.
-
Method Details
-
createVersion
Creates a Version instance from a byte[] which may have been acquired from a query using the row_version() function which returns a FieldValue of type BINARY.- Parameters:
version
- the version to use- Returns:
- a new Version instance
-