Set_Value¶
Set a record attribute value. This is an overloaded procedure where the value can be of type VARCHAR2, DATE, NUMBER or BOOLEAN.
PROCEDURE Set_Value (
record_ IN OUT type_record_,
name_ IN type_name_,
value_ IN VARCHAR2,
type_ IN type_typ_ DEFAULT dt_Text,
dirty_ IN BOOLEAN DEFAULT TRUE,
caseSensitive_ IN BOOLEAN DEFAULT FALSE )
PROCEDURE Set_Value (
record_ IN OUT type_record_,
name_ IN type_name_,
value_ IN DATE,
type_ IN type_typ_ DEFAULT dt_Timestamp,
dirty_ IN BOOLEAN DEFAULT TRUE,
caseSensitive_ IN BOOLEAN DEFAULT FALSE )
PROCEDURE Set_Value (
record_ IN OUT type_record_,
name_ IN type_name_,
value_ IN NUMBER,
type_ IN type_typ_ DEFAULT dt_Float,
dirty_ IN BOOLEAN DEFAULT TRUE,
caseSensitive_ IN BOOLEAN DEFAULT FALSE )
PROCEDURE Set_Value (
record_ IN OUT type_record_,
name_ IN type_name_,
value_ IN BOOLEAN,
type_ IN type_typ_ DEFAULT dt_Boolean,
dirty_ IN BOOLEAN DEFAULT TRUE,
caseSensitive_ IN BOOLEAN DEFAULT FALSE )
PROCEDURE Set_Value (
record_ IN OUT NOCOPY type_record_,
name_ IN type_name_,
value_ IN CLOB,
type_ IN type_typ_ DEFAULT dt_Clob,
dirty_ IN BOOLEAN DEFAULT TRUE,
caseSensitive_ IN BOOLEAN DEFAULT FALSE )
PROCEDURE Set_Clob_Value (
record_ IN OUT NOCOPY type_record_,
name_ IN type_name_,
clob_value_ IN type_clob_value_,
type_ IN type_typ_ DEFAULT dt_Clob,
dirty_ IN BOOLEAN DEFAULT TRUE,
caseSensitive_ IN BOOLEAN DEFAULT FALSE )
PROCEDURE Set_Value (
record_ IN OUT NOCOPY type_record_,
name_ IN type_name_,
value_ IN BLOB,
type_ IN type_typ_ DEFAULT dt_Blob,
dirty_ IN BOOLEAN DEFAULT TRUE,
caseSensitive_ IN BOOLEAN DEFAULT FALSE )
PROCEDURE Set_Blob_Value (
record_ IN OUT NOCOPY type_record_,
name_ IN type_name_,
blob_value_ IN type_blob_value_,
type_ IN type_typ_ DEFAULT dt_Blob,
dirty_ IN BOOLEAN DEFAULT TRUE,
caseSensitive_ IN BOOLEAN DEFAULT FALSE )
Parameters¶
record_
Foundation1 record. See:New_Record
name_
Record attribute name.
type_
any Foundation1 data type. See:Available Types.
If value data type is VARCHAR2 any Foundation1 data type is allowed.
If value data type is DATE allowed types are dt_Date, dt_Time or dt_TimeStamp.
If value data type is NUMBER allowed types are dt_Integer, dt_Integer_Key, dt_Integer_Reference, dt_Decimal, dt_Money or dt_Float.
If value data type is BOOLEAN allowed type is dt_Boolean
If value data type to Set_Value is BLOB the value is Base64 converted to CLOB
dirty_
If True sets the record attribute dirty flag to True ('Modified').
caseSensitive_
If true the original case of the attribute name is preserved. Else UPPER case.
Example¶
DECLARE
AM Plsqlap_Record_API.type_record_;
AL Plsqlap_Record_API.type_record_;
BEGIN
-- Create records
AM := Plsqlap_Record_API.New_Record('APPLICATION_MESSAGE');
AL := Plsqlap_Record_API.New_Record('ADDRESS_LABEL');
-- Set (Create) the value of the record text key attribute.
Plsqlap_Record_API.Set_Value(AM,'APPLICATION_MESSAGE_ID','100',Plsqlap_Record_API.dt_Text_Key);
-- Set (Create) the value of record attributes.
Plsqlap_Record_API.Set_Value(AM,'SENDER','Ti22',Plsqlap_Record_API.dt_Alpha);
Plsqlap_Record_API.Set_Value(AM,'MESSAGE_TYPE','Mail,Plsqlap_Record_API.dt_Alpha);
Plsqlap_Record_API.Set_Value(AM,'SUBJECT','This is a demonstration');
-- Set (Create) a record attribute without a value. A plain NULL cannot be used.
-- The PLSQL engine would not know which of the overloaded procedures to use.
Plsqlap_Record_API.Set_Value (AM,'LOCALE',TO_CHAR(NULL),dt_Alpha);
-- Set (Create) the value of record date attributes.
Plsqlap_Record_API.Set_Value(AL,'SENT',SYSDATE);
Plsqlap_Record_API.Set_Value(AL,'EXPIRED','2099-12-31',Plsqlap_Record_API.dt_Date);
...
END;