7.154 SDO_GEOR.setVersion

Format

SDO_GEOR.setVersion(
     georaster     IN OUT SDO_GEORASTER, 
     majorVersion  IN VARCHAR2, 
     minorVersion  IN VARCHAR2);

Description

Sets the user-specified version of a GeoRaster object.

Parameters

georaster

GeoRaster object.

majorVersion

String representing the major version of the GeoRaster object. For example, if the complete version string is 15a.beta1, specify the majorVersion value as 15a.

If the parameter value is null, any existing majorVersion value in the GeoRaster object is deleted.

minorVersion

String representing the minor version of the GeoRaster object. For example, if the complete version string is 15a.beta1, specify the minorVersion value as beta1.

If the parameter value is null, any existing minorVersion value in the GeoRaster object is deleted.

Usage Notes

The major and minor version strings can reflect any versioning scheme that you choose. The majorVersion and minorVersion values can be any string, except that neither can be an empty string (that is, neither can be '').

To retrieve the version string for a GeoRaster object, use the SDO_GEOR.getVersion function, which returns the version in the format major-version.minor-version.

Examples

The following example sets 15a.beta1 as the version for the GeoRaster object (GEORASTER column) in the row with the GEORID column value of 4 in the GEORASTER_TABLE table. (The GEORASTER_TABLE table definition is presented after Example 1-1 in Storage Parameters.)

DECLARE
  grobj sdo_georaster;
BEGIN
  SELECT georaster INTO grobj FROM georaster_table WHERE georid=4 FOR UPDATE;
  sdo_geor.setVersion(grobj, '15a', 'beta1');
  UPDATE georaster_table SET georaster = grobj WHERE georid=4;
  COMMIT;
END;
/