<commit_before>CREATE OR REPLACE PACKAGE pck_enerko_reports2_test AS
    FUNCTION f_no_args RETURN NUMBER;
	
    PROCEDURE p_no_args;
	
    FUNCTION f_some_args(p_number IN NUMBER, p_date IN DATE, p_datetime IN TIMESTAMP, p_string IN  VARCHAR2) RETURN NUMBER;
	
    PROCEDURE p_some_args (p_number IN NUMBER, p_date IN DATE, p_datetime IN TIMESTAMP, p_string IN  VARCHAR2);
	
    FUNCTION f_fb_report_source_test(num_rows NUMBER, p_test_date IN DATE, p_test_string IN VARCHAR2) RETURN table_of_er_cell_definitions pipelined;
	
    FUNCTION f_noarg_report RETURN table_of_er_cell_definitions pipelined;
    
    FUNCTION f_all_features RETURN table_of_er_cell_definitions pipelined;
END;
/

sho err

CREATE OR REPLACE PACKAGE BODY pck_enerko_reports2_test AS
    FUNCTION f_no_args RETURN NUMBER IS
    BEGIN
        return -1;
    END f_no_args;
	
    PROCEDURE p_no_args IS
    BEGIN
        null;
    END;
	
    FUNCTION f_some_args(p_number IN NUMBER, p_date IN DATE, p_datetime IN TIMESTAMP, p_string IN  VARCHAR2) RETURN NUMBER IS
    BEGIN
        return -1;
    END f_some_args;
	
    PROCEDURE p_some_args(p_number IN NUMBER, p_date IN DATE, p_datetime IN TIMESTAMP, p_string IN  VARCHAR2) IS
    BEGIN
        null;
    END p_some_args;
	
    FUNCTION f_noarg_report RETURN table_of_er_cell_definitions pipelined IS
    BEGIN
        pipe row(
            t_er_cell_definition(
                'f_fb_report_source_test',
                0,
                0,
                'string',
                'I had no arguments.'
            )
        );
    END;
    
    FUNCTION f_fb_report_source_test(num_rows NUMBER, p_test_date IN DATE, p_test_string IN VARCHAR2) RETURN table_of_er_cell_definitions pipelined IS
    BEGIN
        FOR i IN 0 .. (num_rows - 1) LOOP
            pipe row(
                t_er_cell_definition(
                    'f_fb_report_source_test',
                    0,
                    i,
                    'string',
                    'Row number ' || i || ' ' || p_test_string
                )
            );
        END LOOP;
        RETURN; 
    END f_fb_report_source_test;
	
    FUNCTION f_all_features RETURN table_of_er_cell_definitions pipelined IS
        r INTEGER;
    BEGIN
        r:=0;		
        -- Datentypen
        pipe row(t_er_cell_definition(
            'datatypes', 0, r, 'string', 'Bezeichnung'
        ));
        pipe row(t_er_cell_definition(
            'datatypes', 1, r, 'string', 'Wert'
        ));
		
        r:=r+1;
        pipe row(t_er_cell_definition(
            'datatypes', 0, r, 'string', 'string'
        ));
        pipe row(t_er_cell_definition(
            'datatypes', 1, r, 'string', 'beliebiger string wert'
        ));
		
        r:=r+1;
        pipe row(t_er_cell_definition(
            'datatypes', 0, r, 'string', 'number'
        ));
        pipe row(t_er_cell_definition(
            'datatypes', 1, r, 'number', '42.23'
        ));
        pipe row(t_er_cell_definition(
            'datatypes', 2, r, 'string', 'Mit Formatierung'
        ));
        pipe row(t_er_cell_definition(
            'datatypes', 3, r, 'number', '42.23@@#0.000'
        ));
				
        r:=r+1;
        pipe row(t_er_cell_definition(
            'datatypes', 0, r, 'string', 'date'
        ));
        pipe row(t_er_cell_definition(
            'datatypes', 1, r, 'date', '06.05.2013'
        ));
		
        r:=r+1;
        pipe row(t_er_cell_definition(
            'datatypes', 0, r, 'string', 'date'
        ));
        pipe row(t_er_cell_definition(
            'datatypes', 1, r, 'datetime', '06.05.2013 03:41'
        ));
		
        r:=r+1;
        pipe row(t_er_cell_definition(
            'datatypes', 0, r, 'string', 'formula'
        ));
        pipe row(t_er_cell_definition(
            'datatypes', 1, r, 'formula', 'SUM(1,2,3,4,5,6,7,8,9,10)'
        ));<commit_msg>Custom function example<commit_after>CREATE OR REPLACE PACKAGE pck_enerko_reports2_test AS
    FUNCTION f_no_args RETURN NUMBER;
	
    PROCEDURE p_no_args;
	
    FUNCTION f_some_args(p_number IN NUMBER, p_date IN DATE, p_datetime IN TIMESTAMP, p_string IN  VARCHAR2) RETURN NUMBER;
	
    PROCEDURE p_some_args (p_number IN NUMBER, p_date IN DATE, p_datetime IN TIMESTAMP, p_string IN  VARCHAR2);
	
    FUNCTION f_fb_report_source_test(num_rows NUMBER, p_test_date IN DATE, p_test_string IN VARCHAR2) RETURN table_of_er_cell_definitions pipelined;
	
    FUNCTION f_noarg_report RETURN table_of_er_cell_definitions pipelined;
    
    FUNCTION f_all_features RETURN table_of_er_cell_definitions pipelined;
END;
/

sho err

CREATE OR REPLACE PACKAGE BODY pck_enerko_reports2_test AS
    FUNCTION f_no_args RETURN NUMBER IS
    BEGIN
        return -1;
    END f_no_args;
	
    PROCEDURE p_no_args IS
    BEGIN
        null;
    END;
	
    FUNCTION f_some_args(p_number IN NUMBER, p_date IN DATE, p_datetime IN TIMESTAMP, p_string IN  VARCHAR2) RETURN NUMBER IS
    BEGIN
        return -1;
    END f_some_args;
	
    PROCEDURE p_some_args(p_number IN NUMBER, p_date IN DATE, p_datetime IN TIMESTAMP, p_string IN  VARCHAR2) IS
    BEGIN
        null;
    END p_some_args;
	
    FUNCTION f_noarg_report RETURN table_of_er_cell_definitions pipelined IS
    BEGIN
        pipe row(
            t_er_cell_definition(
                'f_fb_report_source_test',
                0,
                0,
                'string',
                'I had no arguments.'
            )
        );
    END;
    
    FUNCTION f_fb_report_source_test(num_rows NUMBER, p_test_date IN DATE, p_test_string IN VARCHAR2) RETURN table_of_er_cell_definitions pipelined IS
    BEGIN
        FOR i IN 0 .. (num_rows - 1) LOOP
            pipe row(
                t_er_cell_definition(
                    'f_fb_report_source_test',
                    0,
                    i,
                    'string',
                    'Row number ' || i || ' ' || p_test_string
                )
            );
        END LOOP;
        RETURN; 
    END f_fb_report_source_test;
	
    FUNCTION f_all_features RETURN table_of_er_cell_definitions pipelined IS
        r INTEGER;
    BEGIN
        r:=0;		
        -- Datentypen
        pipe row(t_er_cell_definition(
            'datatypes', 0, r, 'string', 'Bezeichnung'
        ));
        pipe row(t_er_cell_definition(
            'datatypes', 1, r, 'string', 'Wert'
        ));
		
        r:=r+1;
        pipe row(t_er_cell_definition(
            'datatypes', 0, r, 'string', 'string'
        ));
        pipe row(t_er_cell_definition(
            'datatypes', 1, r, 'string', 'beliebiger string wert'
        ));
		
        r:=r+1;
        pipe row(t_er_cell_definition(
            'datatypes', 0, r, 'string', 'number'
        ));
        pipe row(t_er_cell_definition(
            'datatypes', 1, r, 'number', '42.23'
        ));
        pipe row(t_er_cell_definition(
            'datatypes', 2, r, 'string', 'Mit Formatierung'
        ));
        pipe row(t_er_cell_definition(
            'datatypes', 3, r, 'number', '42.23@@#0.000'
        ));
				
        r:=r+1;
        pipe row(t_er_cell_definition(
            'datatypes', 0, r, 'string', 'date'
        ));
        pipe row(t_er_cell_definition(
            'datatypes', 1, r, 'date', '06.05.2013'
        ));
		
        r:=r+1;
        pipe row(t_er_cell_definition(
            'datatypes', 0, r, 'string', 'date'
        ));
        pipe row(t_er_cell_definition(
            'datatypes', 1, r, 'datetime', '06.05.2013 03:41'
        ));
		
        r:=r+1;
        pipe row(t_er_cell_definition(
            'datatypes', 0, r, 'string', 'formula'
        ));
        pipe row(t_er_cell_definition(
            'datatypes', 1, r, 'formula', 'SUM(1,2,3,4,5,6,7,8,9,10)'
        ));
        
        r:=r+1;
        pipe row(t_er_cell_definition(
            'datatypes', 0, r, 'string', 'custom function formula'
        ));
        pipe row(t_er_cell_definition(
            'datatypes', 1, r, 'formula', 'NormInv(0.6, 100, 10)'
        ));
        pipe row(t_er_cell_definition(
            'datatypes', 2, r, 'formula', 'Enerko_NormInv(0.6, 100, 10)'
        ));
{'fraction_non_alphanumeric': 0.09513820335636723, 'fraction_numerical': 0.021470878578479763, 'mean_word_length': 1.9677773709264006, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2354659', 'n_tokens_mistral': 3012, 'n_tokens_neox': 2764, 'n_words': 634}