Changeset 3164


Ignore:
Timestamp:
08/05/08 15:42:02 (5 years ago)
Author:
awwalter
Message:

synched with trunk update of truetime and wave pkgs

Location:
DB/branches/leap-second-dev-branch/storedprocedures
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • DB/branches/leap-second-dev-branch/storedprocedures/truetime_pkg.sql

    r3161 r3164  
    189189--  ***********************************************************************/     
    190190    FUNCTION utc2posix (utcDateStr VARCHAR2) RETURN VARCHAR2 DETERMINISTIC; 
     191 
     192 
     193--  /*********************************************************************** 
     194--  * Reinitialize the package after a LEAP_SECONDS table change.  
     195--  ***********************************************************************/     
     196    PROCEDURE init; 
    191197 
    192198        PRAGMA RESTRICT_REFERENCES (string2nominal,  WNDS); 
     
    211217        PRAGMA RESTRICT_REFERENCES (leaps2add,       WNDS); 
    212218        PRAGMA RESTRICT_REFERENCES (leaps2subtract,  WNDS); 
     219        PRAGMA RESTRICT_REFERENCES (init,            WNDS); 
    213220 
    214221END TRUETIME; 
     
    780787-- Read data from Leap_Seconds table when package is 1st loaded into memory. 
    781788-- Doing this, rather than SELECT on the table in functions speeds up code ~3x. 
    782  
    783 BEGIN 
    784789-- 
    785   SELECT s_nominal BULK COLLECT INTO nominalSecStart from LEAP_SECONDS;  -- could do this instead of declaring cursor AWW 
    786   SELECT e_nominal BULK COLLECT INTO nominalSecEnd from LEAP_SECONDS;  -- ditto above AWW 
    787   SELECT s_true BULK COLLECT INTO trueSecStart from LEAP_SECONDS;    --  ditto above AWW 
    788   SELECT e_true BULK COLLECT INTO trueSecEnd from LEAP_SECONDS;    --  ditto above AWW 
    789   SELECT ls_count BULK COLLECT INTO leapSecs from LEAP_SECONDS;    --  ditto above AWW 
    790   SELECT base INTO v_pkg_base FROM EpochTimeBase WHERE offdate > SYS_EXTRACT_UTC(SYSTIMESTAMP); 
     790  PROCEDURE init AS 
     791  BEGIN 
     792    SELECT s_nominal BULK COLLECT INTO nominalSecStart from LEAP_SECONDS;  -- could do this instead of declaring cursor AWW 
     793    SELECT e_nominal BULK COLLECT INTO nominalSecEnd from LEAP_SECONDS;  -- ditto above AWW 
     794    SELECT s_true BULK COLLECT INTO trueSecStart from LEAP_SECONDS;    --  ditto above AWW 
     795    SELECT e_true BULK COLLECT INTO trueSecEnd from LEAP_SECONDS;    --  ditto above AWW 
     796    SELECT ls_count BULK COLLECT INTO leapSecs from LEAP_SECONDS;    --  ditto above AWW 
     797    SELECT base INTO v_pkg_base FROM EpochTimeBase WHERE offdate > SYS_EXTRACT_UTC(SYSTIMESTAMP); 
     798    -- 
     799    --print_table_times; 
     800    -- 
     801  END init; 
    791802-- 
    792 --  Replaced below with above SQL -aww 
    793 --OPEN c1; 
    794 --FETCH c1 BULK COLLECT INTO nominalSecStart; 
    795 --CLOSE c1; 
    796  
    797 --OPEN c2; 
    798 --FETCH c2 BULK COLLECT INTO trueSecStart; 
    799 --CLOSE c2; 
    800  
     803  PROCEDURE print_table_times AS 
     804  BEGIN 
     805    -- 
     806    DBMS_OUTPUT.PUT_LINE('nomStart   nomEnd     trueStart  trueEnd      leapSecs'); 
     807    -- 
     808    FOR IDX IN 1..nominalSecStart.COUNT LOOP 
     809        DBMS_OUTPUT.PUT_LINE(nominalSecStart(idx) ||' '|| nominalSecEnd(idx) ||' '|| trueSecStart(idx) ||' '|| trueSecEnd(idx) ||' '|| leapSecs(idx)); 
     810    END LOOP; 
     811    -- 
     812  END print_table_times; 
     813-- 
     814BEGIN 
     815   -- 
     816   init; 
     817   -- 
    801818END TRUETIME; -- end of package 
    802819 
  • DB/branches/leap-second-dev-branch/storedprocedures/wave_pkg.sql

    r3161 r3164  
    6262-- --------------------------------------------------------------------------------- 
    6363-- --------------------------------------------------------------------------------- 
     64-- The database stored java is the UTC version  
     65  FUNCTION isJavaUTC() RETURN NUMBER; 
     66-- 
     67-- --------------------------------------------------------------------------------- 
     68-- --------------------------------------------------------------------------------- 
    6469END wave; 
    6570 
     
    7176  --  package variable refers to requested binary data  
    7277  -- v_blob BLOB; 
     78-- --------------------------------------------------------------------------------- 
     79-- --------------------------------------------------------------------------------- 
     80  FUNCTION isJavaUTC() RETURN NUMBER 
     81  AS LANGUAGE JAVA NAME 'org.trinet.waveserver.dc.WaveformBLOB.isVersionUTC() return int'; 
    7382-- --------------------------------------------------------------------------------- 
    7483-- --------------------------------------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.