package_generate_spec (private)

 package_generate_spec object_type

Defined in packages/acs-subsite/tcl/package-procs.tcl

Generates pl/sql to create a package specification. Does not execute the pl/sql - simply returns it.

Parameters:
object_type (required)
The object for which to create a package spec
Author:
Michael Bryzek <mbryzek@arsdigita.com>
Created:
10/2000

Partial Call Graph (max 5 caller/called nodes):
%3 package_create package_create (private) package_generate_spec package_generate_spec package_create->package_generate_spec acs_object_type::get acs_object_type::get (public) package_generate_spec->acs_object_type::get db_map db_map (public) package_generate_spec->db_map

Testcases:
No testcase defined.
Source code:
    # First pull out some basic information about this object type
    acs_object_type::get -object_type $object_type -array acs_type
    set table_name   $acs_type(table_name)
    set id_column    $acs_type(id_column)
    set package_name [string tolower $acs_type(package_name)]
    set supertype    $acs_type(supertype)

    return [db_map spec]
Generic XQL file:
packages/acs-subsite/tcl/package-procs.xql

PostgreSQL XQL file:
<fullquery name="package_generate_spec.spec">
    <querytext>

select 1;

      </querytext>
</fullquery>
packages/acs-subsite/tcl/package-procs-postgresql.xql

Oracle XQL file:
<fullquery name="package_generate_spec.spec">
    <querytext>

create or replace package $package_name as
[package_insert_default_comment]
  function new (
         [plsql_utility::generate_attribute_parameters [package_create_attribute_list \
		 -supertype $supertype \
		 -object_name "NEW" \
		 -table $table_name \
		 -column $id_column \
		 $object_type]]
 ) return ${table_name}.${id_column}%TYPE;

  procedure del (
    $id_column      in ${table_name}.${id_column}%TYPE
  );
END ${package_name};
    
      </querytext>
</fullquery>
packages/acs-subsite/tcl/package-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: