GET* member functions get the current data value of a type matching the type of the call.
The type of the current data value depends on the current access mode of the ANYDATA. For example, whether PIECEWICE has been called.
If PIECEWISE has not been called, the ANYDATA is accessed in its entirety and the type of the data value should match the type of the ANYDATA.
If PIECEWISE has been called, the ANYDATA is accessed in a piece-wise manner. The type of the data value should match the type of the attribute (or collection element) at the current position.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only the MySQL mode.
Syntax
MEMBER FUNCTION GetNumber(
self IN ANYDATA,
num OUT NOCOPY NUMBER)
RETURN PLS_INTEGER;
MEMBER FUNCTION GetDate(
self IN AnyData,
dat OUT NOCOPY DATE)
RETURN PLS_INTEGER;
MEMBER FUNCTION GetChar(
self IN AnyData,
c OUT NOCOPY CHAR)
RETURN PLS_INTEGER;
MEMBER FUNCTION GetVarchar(
self IN AnyData,
c OUT NOCOPY VARCHAR)
RETURN PLS_INTEGER;
MEMBER FUNCTION GetVarchar2(
self IN AnyData,
c OUT NOCOPY VARCHAR2)
RETURN PLS_INTEGER;
MEMBER FUNCTION GetRaw(
self IN AnyData,
r OUT NOCOPY RAW)
RETURN PLS_INTEGER;
MEMBER FUNCTION GetBlob(
self IN AnyData,
b OUT NOCOPY BLOB)
RETURN PLS_INTEGER;
MEMBER FUNCTION GetClob(
self IN AnyData,
c OUT NOCOPY CLOB)
RETURN PLS_INTEGER;
MEMBER FUNCTION GetObject(
self IN AnyData,
obj OUT NOCOPY "<ADT_1>")
RETURN PLS_INTEGER;
MEMBER FUNCTION GetCollection(
self IN AnyData,
col OUT NOCOPY "<COLLECTION_1>")
RETURN PLS_INTEGER;
MEMBER FUNCTION GetTimestamp(
self IN AnyData,
ts OUT NOCOPY TIMESTAMP_UNCONSTRAINED)
RETURN PLS_INTEGER;
MEMBER FUNCTION GetTimestampTZ(
self IN AnyData,
ts OUT NOCOPY TIMESTAMP_TZ_UNCONSTRAINED)
RETURN PLS_INTEGER;
MEMBER FUNCTION GetTimestampLTZ(
self IN AnyData,
ts OUT NOCOPY TIMESTAMP_LTZ_UNCONSTRAINED)
RETURN PLS_INTEGER;
MEMBER FUNCTION GetIntervalYM(
self IN AnyData,
inv IN OUT NOCOPY YMINTERVAL_UNCONSTRAINED)
RETURN PLS_INTEGER;
MEMBER FUNCTION GetIntervalDS(
self IN AnyData,
inv IN OUT NOCOPY DSINTERVAL_UNCONSTRAINED)
RETURN PLS_INTEGER;
MEMBER FUNCTION GetNchar(
self IN AnyData,
nc OUT NOCOPY NCHAR)
RETURN PLS_INTEGER;
MEMBER FUNCTION GetNVarchar2(
self IN AnyData,
nc OUT NOCOPY NVARCHAR2)
RETURN PLS_INTEGER;
MEMBER FUNCTION GetBFloat(
self IN AnyData,
fl OUT NOCOPY BINARY_FLOAT)
RETURN PLS_INTEGER;
MEMBER FUNCTION GetBDouble(
self IN AnyData,
dbl OUT NOCOPY BINARY_DOUBLE)
RETURN PLS_INTEGER;
Parameters
| Parameter | Description |
|---|---|
| self | An ANYDATA. |
| num | The number to be obtained. |
Return values
The return value has different meanings in different access modes. In PIECEWISE (for a collection) mode, DBMS_TYPES.NO_DATA signifies the end of access to the collection.
Exceptions
DBMS_TYPES.TYPE_MISMATCH: The expected type is different from the passed in type.DBMS_TYPES.INVALID_PARAMETERS: Invalid parameters. For example, it is inappropriate to add a number at this point during the creation process.DBMS_TYPES.INCORRECT_USAGE: Incorrect usage.