This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hashlib | |
import re | |
def getOraclePackageSHA1(fileName): | |
content = open(fileName).read() | |
pattern = "(PACKAGE.*;)\s*/" | |
compiled = re.compile(pattern, re.IGNORECASE | re.DOTALL | re.MULTILINE) | |
match = compiled.search(content) | |
if match: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE | |
FUNCTION getOraclePackageSHA1(theType IN VARCHAR2, theName IN VARCHAR2) RETURN RAW | |
IS | |
TYPE aSourceType IS TABLE OF user_source.line%TYPE; | |
aSource aSourceType; | |
aLob CLOB; | |
aHash RAW(256); | |
i PLS_INTEGER; | |
BEGIN |