Class Version

java.lang.Object
oracle.nosql.driver.Version

public class Version extends Object
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 Type
    Method
    Description
    static 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.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Method Details

    • createVersion

      public static 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.
      Parameters:
      version - the version to use
      Returns:
      a new Version instance