DAO (Data access object)
With OraTool you can generate PL/SQL to make simple operation on Type:
- DAO_Type_Log: to trace type content (dbms_output). Useful for debug.
How to use DAO for Type
We have type TSample:
-- Create Type create or replace TYPE TSAMPLE AS OBJECT (Id Integer, Description varchar2(100) ); /
After generation of package DAO we can simply trace TSample content.
set serveroutput on Declare sample TSample := TSample(null, null); Begin sample.id := 10; sample.Description := 'Test'; -- Trace Dao_type_log.TSample(sample); End; /
L'output ottenuto sarĂ
ID: 10 DESCRIPTION: Test