Menu

Usage of @param tag

Help
GregoryJ
2013-08-26
2013-11-16
  • GregoryJ

    GregoryJ - 2013-08-26

    Hi.

    I'm using PLDoc successfully when using the return tag and initial description. However, using the @param tag for a standalone database function does not result in the expected output.
    ie:

    create or replace
    FUNCTION
     RESP_GET_RSUP_START(
      p_person_id IN NUMBER)
    /**<br/>
     * Get Research Supervision Start Date.
     * <br/>
     * This function will return the Date.
     *
     * @param p_person_id The person ID
     * @return The start date of the research supervision.
    */
    RETURN DATE IS
    
    BEGIN -- main routine.
        NULL;
    END resp_get_rsup_start;
    /
    

    Using the above, everything comes out as I expect except the
    * @param p_person_id The person ID

    is basically ignored, ie: it doesn't result in the Parameters: section.
    I've noticed the example .sql files for the PLDoc software are all using database packages. I'd like to use the tags for standalone procedures and functions (ie: not in packages). Am I using the tag incorrectly?
    Any ideas what I'm doing wrong?

     

    Last edit: GregoryJ 2013-08-27
  • Stuart Turton

    Stuart Turton - 2013-11-16

    The parser requires the comments before any parameters are processed.

    It is also desirable to have the comments remain with the source in the database (my usual use case): for standalone procedures and functions this means:-

    • before the CREATE [OR REPLACE]
    • before the FUNCTION or PROCEDURE
    • before the function procedure name


    create or replace
    FUNCTION
    /**<br/>
     * Get Research Supervision Start Date.
     * <br/>
     * This function will return the Date.
     *
     * @param p_person_id The person ID
     * @return The start date of the research supervision.
     */
     RESP_GET_RSUP_START
    (
      p_person_id IN NUMBER)
    RETURN DATE IS
    
    BEGIN -- main routine.
        NULL;
    END resp_get_rsup_start;
    /
    
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.