You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CREATE OR REPLACE TYPE <nom_classe>AS OBJECT(
<atribut_1><tipus_de_dades>,
<atribut_2><tipus_de_dades>,
<atribut_N><tipus_de_dades>,
CONSTRUCTOR FUNCTION <nom_classe> (<paràmetre_1><tipus_de_dades>, <paràmetre_N><tipus_de_dades>) RETURN SELF AS RESULT,
[MEMBER | STATIC] [FUNCTION | PROCEDURE] <nom_mètode>[(<paràmetre_1><tipus_de_dades>, <paràmetre_N><tipus_de_dades>)] [RETURN <tipus_de_dades>])
[MAP | ORDER] MEMBER FUCTION <nom_mètode> RETURN <tipus_de_dades>
);
Formalització de la creació del TYPE BODY:
CREATE OR REPLACETYPEBODY<nom_classe>AS
CONSTRUCTOR FUNCTION <nom_classe> (<paràmetre_1><tipus_de_dades>, <paràmetre_N><tipus_de_dades>) RETURN SELF AS RESULT IS
BEGIN<inicialització d'atributs de l'objecte>
RETURN ;
END;
[MEMBER | STATIC] [FUNCTION | PROCEDURE] <nom_mètode> [RETURN <tipus_de_dades>] IS
BEGIN<programació>
[RETURN <valor>;]
END;
[MAP | ORDER] MEMBER FUNCTION <nom_mètode> RETURN <tipus_de_dades> IS
BEGIN<programació>
RETURN <valor>;
END;
END;
Formalització d’un bloc PL/SQL:
DECLARE
<nom_objecte_1><tipus_classe>;
<nom_objecte_2><tipus_classe>;
BEGIN<nom_objecte_1> := NEW <tipus_classe>[(<valor_1>, <valor_N>)];
<nom_objecte_2> := NEW <tipus_classe>[(<valor_1>, <valor_N>)];
END;