Oracle Built−in Packages- P80

Oracle Built−in Packages- P80: Ah, for the good old days of Version of PL /SQL! Life was so simple then. No stored procedures or functions and certainly no packages. You had your set of built−in functions, like SUBSTR and TO_DATE. You had the IF statement and various kinds of loops. With these tools at hand, you built your batch−processing scripts for execution in SQL*Plus, and you coded your triggers in SQL*Forms , and you went home at night content with a good day's work done. | Appendix A What s on the Companion Disk Another usability issue with SET_SESSION_LONGOPS is that any values not set in the procedure call will be set to zero. Thus if you want to increment different counter columns at different times in an application for the same row in V SESSION_LONGOPS you must keep track of all counter values and pass them all in each time the procedure is called. Adding to the cumbersome nature of the long parameter list are the extremely long names of the package and procedure themselves. You really have to want or as is more likely need to call SET_SESSION_LONGOPS in order to use it These usability issues seemed to provide an opportunity to improve ease-of-use through encapsulation. I decided to build a package called longops to offer some relief. Here is the package specification for longops Filename on companion disk CREATE OR REPLACE PACKAGE longops IS Enhances by allowing individual columns to be updated without passing all parameter values. Author John Beresniewicz Savant Corp Created 09 08 97 Compilation Requirements SELECT on SESSION_LONGOPS Execution Requirements returns a new V SESSION_LONGOPS row index FUNCTION new_row RETURN BINARY_INTEGER returns the last row index used FUNCTION current_row RETURN BINARY_INTEGER makes a new row the current row PROCEDURE set_current_row row_idx_IN IN BINARY_INTEGER Covers PROCEDURE set_row hint_IN IN BINARY_INTEGER context_IN IN NUMBER DEFAULT 0 stepid_IN IN NUMBER DEFAULT 0 stepsofar_IN IN NUMBER DEFAULT 0 steptotal_IN IN NUMBER DEFAULT 0 sofar_IN IN NUMBER DEFAULT 0 totalwork_IN IN NUMBER DEFAULT 0 appdata1_IN IN NUMBER DEFAULT 0 appdata2_IN IN NUMBER DEFAULT 0 appdata3_IN IN NUMBER DEFAULT 0 Updates a single row in V SESSION_LONGOPS preserving values in columns corresponding to parameters passed as NULL. PROCEDURE update_row hint_IN IN BINARY_INTEGER DEFAULT current_row context_IN IN NUMBER .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
1    442    4    20-06-2024
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.