章
章慧
Unregistered / Unconfirmed
GUEST, unregistred user!
PROCEDURE BIOBJECT_QUERY(vi_Query IN BIO_QUERY,
vo_Result OUT BIO_QUERY,
vperationStatus OUT NUMBER,
vperationStatusDesc OUT VARCHAR2) IS
BEGIN
vo_Result := BIO_QUERY(vi_Query.BQ_TYPE, vi_Query.BQ_VALUE, BI_OBJECTS());
IF vi_Query.BQ_TYPE = 0 THEN
SELECT * BULK COLLECT INTO vo_Result.BQ_RESULT FROM BIO_INFO WHERE BO_NAME = vi_Query.BQ_VALUE; -- << 就是编译时候报错在这一行,报ORA-00947
END IF;
vperationStatus := 0;
EXCEPTION
WHEN OTHERS THEN
vperationStatus := -151000;
vperationStatusDesc := 'BIOBJECT_QUERY Error: ' || SQLERRM;
END BIOBJECT_QUERY;
///// 类型声明如下
-- ************************************************
-- * COMMON TYPE DECLARATION FOR BIODESIGNER 2005 *
-- * AUTHOR: Hibiki, Kirikawa 20:25 21th May,2005 *
-- ************************************************
CREATE TYPE BIOF_EXTENDINFO AS OBJECT
(
BE_NAME VARCHAR2(25),
BE_VALUE VARCHAR2(25),
BE_DESCRIPTION VARCHAR2(20)
);
CREATE OR REPLACE TYPE BIOF_EXTENDINFOS AS TABLE OF BIOF_EXTENDINFO;
CREATE OR REPLACE TYPE BIO_FIELD AS OBJECT
(
BF_NAME VARCHAR2(80),
BF_TYPE VARCHAR2(80),
BF_RADIX CHAR(1),
BF_NULLABLE CHAR(1),
BF_DIRECTION VARCHAR2(6),
BF_DESCRIPTION VARCHAR2(512),
BF_EXTENDINFOS BIOF_EXTENDINFOS
);
CREATE OR REPLACE TYPE BIO_FIELDS AS TABLE OF BIO_FIELD;
CREATE OR REPLACE TYPE BI_OBJECT AS OBJECT
(
BO_NAME VARCHAR2(80),
BO_FIELDS BIO_FIELDS,
BO_DESCRIPTION VARCHAR(512),
BO_MIDDLEWARE_DISPACTHER VARCHAR(80),
BO_MIDDLEWARE_SUBDISPATCHER VARCHAR(80),
BO_MODULE VARCHAR(80),
BO_OWNER VARCHAR(80),
BO_CREATEDATE VARCHAR(40),
BO_MODIFYDATE VARCHAR(40),
BO_SP_NAME VARCHAR(160),
BO_SP_TYPE VARCHAR(80)
);
CREATE OR REPLACE TYPE BI_OBJECTS AS TABLE OF BI_OBJECT;
CREATE OR REPLACE TYPE BIO_QUERY AS OBJECT
(
BQ_TYPE NUMBER(8),
BQ_VALUE VARCHAR2(80),
BQ_RESULT BI_OBJECTS
)
-- ************************************************
-- * COMMON TABLE DECLARATION OF BIODESIGNER 2005 *
-- * AUTHOR: Hibiki, Kirikawa 20:25 21th May,2005 *
-- ************************************************
CREATE TABLE BIO_INFO OF BI_OBJECT
NESTED TABLE BO_FIELDS STORE AS NESTED_BO_FIELDS
(
NESTED TABLE BF_EXTENDINFOS STORE AS NESTED_BF_EXTENDINFOS
);
vo_Result OUT BIO_QUERY,
vperationStatus OUT NUMBER,
vperationStatusDesc OUT VARCHAR2) IS
BEGIN
vo_Result := BIO_QUERY(vi_Query.BQ_TYPE, vi_Query.BQ_VALUE, BI_OBJECTS());
IF vi_Query.BQ_TYPE = 0 THEN
SELECT * BULK COLLECT INTO vo_Result.BQ_RESULT FROM BIO_INFO WHERE BO_NAME = vi_Query.BQ_VALUE; -- << 就是编译时候报错在这一行,报ORA-00947
END IF;
vperationStatus := 0;
EXCEPTION
WHEN OTHERS THEN
vperationStatus := -151000;
vperationStatusDesc := 'BIOBJECT_QUERY Error: ' || SQLERRM;
END BIOBJECT_QUERY;
///// 类型声明如下
-- ************************************************
-- * COMMON TYPE DECLARATION FOR BIODESIGNER 2005 *
-- * AUTHOR: Hibiki, Kirikawa 20:25 21th May,2005 *
-- ************************************************
CREATE TYPE BIOF_EXTENDINFO AS OBJECT
(
BE_NAME VARCHAR2(25),
BE_VALUE VARCHAR2(25),
BE_DESCRIPTION VARCHAR2(20)
);
CREATE OR REPLACE TYPE BIOF_EXTENDINFOS AS TABLE OF BIOF_EXTENDINFO;
CREATE OR REPLACE TYPE BIO_FIELD AS OBJECT
(
BF_NAME VARCHAR2(80),
BF_TYPE VARCHAR2(80),
BF_RADIX CHAR(1),
BF_NULLABLE CHAR(1),
BF_DIRECTION VARCHAR2(6),
BF_DESCRIPTION VARCHAR2(512),
BF_EXTENDINFOS BIOF_EXTENDINFOS
);
CREATE OR REPLACE TYPE BIO_FIELDS AS TABLE OF BIO_FIELD;
CREATE OR REPLACE TYPE BI_OBJECT AS OBJECT
(
BO_NAME VARCHAR2(80),
BO_FIELDS BIO_FIELDS,
BO_DESCRIPTION VARCHAR(512),
BO_MIDDLEWARE_DISPACTHER VARCHAR(80),
BO_MIDDLEWARE_SUBDISPATCHER VARCHAR(80),
BO_MODULE VARCHAR(80),
BO_OWNER VARCHAR(80),
BO_CREATEDATE VARCHAR(40),
BO_MODIFYDATE VARCHAR(40),
BO_SP_NAME VARCHAR(160),
BO_SP_TYPE VARCHAR(80)
);
CREATE OR REPLACE TYPE BI_OBJECTS AS TABLE OF BI_OBJECT;
CREATE OR REPLACE TYPE BIO_QUERY AS OBJECT
(
BQ_TYPE NUMBER(8),
BQ_VALUE VARCHAR2(80),
BQ_RESULT BI_OBJECTS
)
-- ************************************************
-- * COMMON TABLE DECLARATION OF BIODESIGNER 2005 *
-- * AUTHOR: Hibiki, Kirikawa 20:25 21th May,2005 *
-- ************************************************
CREATE TABLE BIO_INFO OF BI_OBJECT
NESTED TABLE BO_FIELDS STORE AS NESTED_BO_FIELDS
(
NESTED TABLE BF_EXTENDINFOS STORE AS NESTED_BF_EXTENDINFOS
);