4.15 GET_INFO Function

Use this function to retrieve install information from a source file.

Syntax

FUNCTION GET_INFO (
    p_source    IN apex_t_export_files )
    RETURN t_file_info;

Parameters

Table 4-2 GET_INFO Parameters

Parameter Description
p_source

The source code, a table of (name, contents) with a single record for normal APEX applications or multiple records for applications that were split when exporting.

Note that passing multiple applications is not supported.

Returns

This function returns information about the application that can be used to configure installation.

Raises

This function may raise the folllowing: WWV_FLOW_IMP_PARSER.RUN_STMT_ERROR: The source contains invalid statements.

Example

The following example fetches an application from a remote URL and prints its install information.

DECLARE
    l_source apex_t_export_files;
    l_info   apex_application_install.t_file_info;
BEGIN
    l_source := apex_t_export_files (
                    apex_t_export_file (
                        name     => 'f100.sql',
                        contents => apex_web_service.make_rest_request (
                                        p_url         => 'https://www.example.com/apps/f100.sql',
                                        p_http_method => 'GET' )));
    l_info   := apex_application_install.get_info (
                    p_source      => l_source );
    sys.dbms_output.put_line (apex_string.format (
         p_message => q'!Type ................. %0
                      !Workspace ............ %1
                      !Version .............. %2
                      !App ID ............... %3
                      !App Name ............. %4
                      !Alias ................ %5
                      !Owner ................ %6
                      !Build Status ......... %7
                      !Has Install Script ... %8
                      !App ID Usage ......... %9
                      !App Alias Usage ...... %10!',
       p0        => l_info.file_type,
       p1        => l_info.workspace_id,
       p2        => l_info.version,
       p3        => l_info.app_id,
       p4        => l_info.app_name,
       p5        => l_info.app_alias,
       p6        => l_info.app_owner,
       p7        => l_info.build_status,
       p8        => apex_debug.tochar(l_info.has_install_script),
       p9        => l_info.app_id_usage,
       p10       => l_info.app_alias_usage,
       p_prefix  => '!' ));
END;