SET* member procedures are used to set the current data value.
Member procedures in the SET* list must be called based on the type of the current data value. The type of the data value should be the type of the attribute at the current position during the piece-wise construction process.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only the MySQL mode.
Syntax
MEMBER PROCEDURE SetNumber(
self IN OUT NOCOPY AnyData,
num IN NUMBER,
last_elem IN boolean DEFAULT FALSE);
MEMBER PROCEDURE SetDate(
self IN OUT NOCOPY AnyData,
dat IN DATE,
last_elem IN boolean DEFAULT FALSE);
MEMBER PROCEDURE SetChar(
self IN OUT NOCOPY AnyData,
c IN CHAR,
last_elem IN boolean DEFAULT FALSE);
MEMBER PROCEDURE SetVarchar(
self IN OUT NOCOPY AnyData,
c IN VARCHAR,
last_elem IN boolean DEFAULT FALSE);
MEMBER PROCEDURE SetVarchar2(
self IN OUT NOCOPY AnyData,
c IN VARCHAR2,
last_elem IN boolean DEFAULT FALSE);
MEMBER PROCEDURE SetRaw(
self IN OUT NOCOPY AnyData,
r IN RAW,
last_elem IN boolean DEFAULT FALSE);
MEMBER PROCEDURE SetBlob(
self IN OUT NOCOPY AnyData,
b IN BLOB,
last_elem IN boolean DEFAULT FALSE);
MEMBER PROCEDURE SetClob(
self IN OUT NOCOPY AnyData,
c IN CLOB,
last_elem IN boolean DEFAULT FALSE);
MEMBER PROCEDURE SetObject(
self IN OUT NOCOPY AnyData,
obj IN "<ADT_1>",
last_elem IN boolean DEFAULT FALSE);
MEMBER PROCEDURE SetCollection(
self IN OUT NOCOPY AnyData,
col IN "<COLLECTION_1>",
last_elem IN boolean DEFAULT FALSE);
MEMBER PROCEDURE SetTimestamp(
self IN OUT NOCOPY AnyData,
ts IN TIMESTAMP_UNCONSTRAINED,
last_elem IN boolean DEFAULT FALSE);
MEMBER PROCEDURE SetTimestampTZ(
self IN OUT NOCOPY AnyData,
ts IN TIMESTAMP_TZ_UNCONSTRAINED,
last_elem IN boolean DEFAULT FALSE);
MEMBER PROCEDURE SetTimestampLTZ(
self IN OUT NOCOPY AnyData,
ts IN TIMESTAMP_LTZ_UNCONSTRAINED,
last_elem IN boolean DEFAULT FALSE);
MEMBER PROCEDURE SetIntervalYM(
self IN OUT NOCOPY AnyData,
inv IN YMINTERVAL_UNCONSTRAINED,
last_elem IN boolean DEFAULT FALSE);
MEMBER PROCEDURE SetIntervalDS(
self IN OUT NOCOPY AnyData,
inv IN DSINTERVAL_UNCONSTRAINED,
last_elem IN boolean DEFAULT FALSE);
MEMBER PROCEDURE SetNchar(
self IN OUT NOCOPY AnyData,
nc IN NCHAR,
last_elem IN boolean DEFAULT FALSE);
MEMBER PROCEDURE SetNVarchar2(
self IN OUT NOCOPY AnyData,
nc IN NVarchar2,
last_elem IN boolean DEFAULT FALSE);
MEMBER PROCEDURE SetBFloat(
self IN OUT NOCOPY AnyData,
fl IN BINARY_FLOAT,
last_elem IN boolean DEFAULT FALSE);
MEMBER PROCEDURE SetBDouble(
self IN OUT NOCOPY AnyData,
dbl IN BINARY_DOUBLE,
last_elem IN boolean DEFAULT FALSE);
Parameters
| Parameter | Description |
|---|---|
| self | An ANYDATA. |
| num | The number and associated information to be set. |
| last_elem | Relevant only if ANYDATA represents a collection. This parameter indicates whether the current value is the last element of the collection. |
Exceptions
DBMS_TYPES.INVALID_PARAMETERS: Invalid parameters. For example, it is inappropriate to add a number at a specific point in time during the creation process.DBMS_TYPES.INCORRECT_USAGE: Incorrect usage.DBMS_TYPES.TYPE_MISMATCH: The expected type is different from the passed in type.
Considerations
A BEGINCREATE call means that the construction has started in piece-wise mode. Subsequent calls to SET* will set the successive attribute values. If ANYDATA is an independent collection, then the SET * calls will set the successive collection elements.