`

数据库查询

F# 
阅读更多
CREATE OR REPLACE TYPE  T_LINK                                                                                                                             AS

OBJECT (
    STR VARCHAR2(30000),
   STATIC FUNCTION ODCIAGGREGATEINITIALIZE(SCTX IN OUT T_LINK) RETURN NUMBER,
    MEMBER FUNCTION ODCIAGGREGATEITERATE(SELF IN OUT T_LINK, VALUE IN VARCHAR2) RETURN NUMBER,
    MEMBER FUNCTION ODCIAGGREGATETERMINATE(SELF IN T_LINK, RETURNVALUE OUT VARCHAR2, FLAGS IN NUMBER) RETURN NUMBER,
    MEMBER FUNCTION ODCIAGGREGATEMERGE(SELF IN OUT T_LINK, CTX2 IN T_LINK) RETURN NUMBER
  )



CREATE OR REPLACE TYPE BODY   T_LINK IS
  STATIC FUNCTION ODCIAGGREGATEINITIALIZE(SCTX IN OUT T_LINK) RETURN NUMBER IS
   BEGIN
   SCTX := T_LINK(NULL);
  RETURN ODCICONST.SUCCESS;
   END;

    MEMBER FUNCTION ODCIAGGREGATEITERATE(SELF IN OUT T_LINK, VALUE IN VARCHAR2) RETURN NUMBER IS
  BEGIN
   SELF.STR := SELF.STR ||VALUE||'  ';
  RETURN ODCICONST.SUCCESS;
  END;

  MEMBER FUNCTION ODCIAGGREGATETERMINATE(SELF IN T_LINK, RETURNVALUE OUT VARCHAR2, FLAGS IN NUMBER) RETURN NUMBER IS
  BEGIN
  RETURNVALUE := SELF.STR;
  RETURN ODCICONST.SUCCESS;
   END;

  MEMBER FUNCTION ODCIAGGREGATEMERGE(SELF IN OUT T_LINK, CTX2 IN T_LINK) RETURN NUMBER IS
   BEGIN
   NULL;
   RETURN ODCICONST.SUCCESS;
  END;
   END;



CREATE OR REPLACE FUNCTION F_LINK (P_STR VARCHAR2) RETURN VARCHAR2
  AGGREGATE USING T_LINK;
  • 大小: 8.3 KB
  • 大小: 4.3 KB
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics