⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 plgte.spb

📁 Oracle PL/SQL procedure generator (second generator type)
💻 SPB
📖 第 1 页 / 共 5 页
字号:
      PLGdoir.set_array (driver, c_ind, doc=>'Array of all indexes');
      PLGdoir.set_array_tag (driver, c_ind, 'owner', doc=>'Owner of index');
      PLGdoir.set_array_tag (driver, c_ind, 'table_name', doc=>'Table on which the index is defined');
      PLGdoir.set_array_tag (driver, c_ind, 'table_OWNER', doc=>'Owner of table on which the index is defined');
      PLGdoir.set_array_tag (driver, c_ind, 'index_name', doc=>'Name of index');
      PLGdoir.set_array_tag (driver, c_ind, 'table_type', doc=>'Type of table');
      PLGdoir.set_array_tag (driver, c_ind, 'uniqueness', doc=>'Uniqueness status of the index: "UNIQUE" or "NONUNIQUE"');
      PLGdoir.set_array_tag (driver, c_ind, 'column_count', doc=>'Number of columns in index');
 	 
      PLGdoir.set_array (driver, c_indcol, doc=>'Array of all index columns');
      PLGdoir.set_array_tag (driver, c_indcol, 'column_name', doc=>'Name of column in index');
      PLGdoir.set_array_tag (driver, c_indcol, 'column_position', doc=>'Position of column in index');
      PLGdoir.set_array_tag (driver, c_indcol, 'column_length', doc=>'Indexed length of the column');

      PLGdoir.set_array (driver, c_uind, doc=>'Array of unique indexes');
      PLGdoir.set_array_tag (driver, c_uind, 'owner', doc=>'Owner of index');
      PLGdoir.set_array_tag (driver, c_uind, 'table_name', doc=>'Table on which the index is defined');
      PLGdoir.set_array_tag (driver, c_uind, 'table_OWNER', doc=>'Owner of table on which the index is defined');
      PLGdoir.set_array_tag (driver, c_uind, 'index_name', doc=>'Name of index');
      PLGdoir.set_array_tag (driver, c_uind, 'table_type', doc=>'Type of table');
      PLGdoir.set_array_tag (driver, c_uind, 'uniqueness', doc=>'Uniqueness status of the index: "UNIQUE" or "NONUNIQUE"');
      PLGdoir.set_array_tag (driver, c_uind, 'column_count', doc=>'Number of columns in index');

      PLGdoir.set_array (driver, c_uindcol, doc=>'Array of unique index columns');
      PLGdoir.set_array_tag (driver, c_uindcol, 'column_name', doc=>'Name of column in index');
      PLGdoir.set_array_tag (driver, c_uindcol, 'column_position', doc=>'Position of column in index');
      PLGdoir.set_array_tag (driver, c_uindcol, 'column_length', doc=>'Indexed length of the column');
      
      PLGdoir.set_array (driver, c_fky, doc=>'Array of foreign keys');
      PLGdoir.set_array_tag (driver, c_fky, 'constraint_name', doc=>'Name of the foreign key');
      PLGdoir.set_array_tag (driver, c_fky, 'fkyname', doc=>'Name of the foreign key');
      PLGdoir.set_array_tag (driver, c_fky, 'constraint_type', doc=>'The value "R"');
      PLGdoir.set_array_tag (driver, c_fky, 'table_name', doc=>'The table on which this foreign key is defined.');
      PLGdoir.set_array_tag (driver, c_fky, 'pky_owner', doc=>'Owner of the table for which this foreign key is the primary key');
      PLGdoir.set_array_tag (driver, c_fky, 'pky_table_name', doc=>'The name of the table for which this foreign key is the primary key');
      PLGdoir.set_array_tag (driver, c_fky, 'pkytabname', doc=>'The name of the table for which this foreign key is the primary key');
      PLGdoir.set_array_tag (driver, c_fky, 'pky_column_name', doc=>'If a single column constraint, the name of the column in the table for which this foreign key is the primary key');
      PLGdoir.set_array_tag (driver, c_fky, 'fkypkycolname', doc=>'If a single column constraint, the name of the column in the table for which this foreign key is the primary key');
      PLGdoir.set_array_tag (driver, c_fky, 'pky_constraint_name', doc=>'Name of the constraint for which this foreign key is the primary key');
      PLGdoir.set_array_tag (driver, c_fky, 'column_count', doc=>'Number of columns in the foreign key');
      PLGdoir.set_array_tag (driver, c_fky, 'comment', doc=>'Column comment; can also be used to store information used during generation');

      PLGdoir.set_array (driver, c_fkycol, doc=>'Array of foreign key columns');
      PLGdoir.set_array_tag (driver, c_fkycol, 'column_name', doc=>'Name of column in foreign key');
      PLGdoir.set_array_tag (driver, c_fkycol, 'position', doc=>'Position of column in foreign key');
      PLGdoir.set_array_tag (driver, c_fkycol, 'pky_column_name', doc=>'Name of column in constraint for which this foreign key is the primary key');

      PLGdoir.set_array (driver, c_desccol, doc=>'Array of descriptor columns');

      PLGdoir.set_array (driver, c_updcol, 
         doc=>'Array of columns with own update procedure');

      PLGdoir.set_array (driver, c_fkydesc, 
         doc=>'Array of foreign key descriptor indexes');

      PLGdoir.set_array (driver, c_fkydesccol, 
         doc=>'Array of foreign key descriptor index columns');

      PLGdoir.set_array (driver, c_cons, doc=>'Array of check constraints');
      PLGdoir.set_array_tag (driver, c_cons, 'constraint_name',doc=>'Name associated with constraint definition');
      PLGdoir.set_array_tag (driver, c_cons, 'converted_constraint_name',doc=>'The constraint name pre pended with "NOT_NULL_" if this is a NOT NULL constraint');
      PLGdoir.set_array_tag (driver, c_cons, 'constraint_type',doc=>'Type of constraint (P for Primary Key, R for Foreign Key, C for check constraint)');
      PLGdoir.set_array_tag (driver, c_cons, 'table_name',doc=>'Name associated with table with constraint definition');
      PLGdoir.set_array_tag (driver, c_cons, 'search_condition',doc=>'Text of search condition for table check');
      PLGdoir.set_array_tag (driver, c_cons, 'converted_ search_condition',doc=>'Text of search condition for table check in which column names are substituted with generated argument names');
      PLGdoir.set_array_tag (driver, c_cons, 'r_owner',doc=>'Owner of table used in referential constraint');
      PLGdoir.set_array_tag (driver, c_cons, 'r_constraint_name',doc=>'Name of unique constraint definition for referenced table');
      PLGdoir.set_array_tag (driver, c_cons, 'delete_rule',doc=>'The delete rule for a referential constrain');
      PLGdoir.set_array_tag (driver, c_cons, 'status',doc=>'Enforcement status of constraint ENABLED or DISABLED');
      PLGdoir.set_array_tag (driver, c_cons, 'not_null',doc=>'TRUE if this is a NOT NULL check constraint');
      PLGdoir.set_array_tag (driver, c_cons, 'column_count',doc=>'Number of columns referenced in the constraint search condition');
      PLGdoir.set_array_tag (driver, c_cons, 'cumulative_column_count',doc=>'INTERNAL USE ONLY');

      PLGdoir.set_array (driver, c_conscol, doc=>'Array of check constraint columns');
      PLGdoir.set_array_tag (driver, c_conscol, 'column_name',doc=>'The name of the column in the constraint');
      PLGdoir.set_array_tag (driver, c_conscol, 'converted_column_name',
         doc=>'The name of the column in the constraint substituted with its generated argument name. For example, last_name -> last_name_in');

      PLGdoir.set_array (driver, c_uconscol, 
         doc=>'Array of distinct check constraint columns');

      PLGdoir.set_array (driver, c_nonpkycol, doc=>'Array of non-primary key columns');

      PLGdoir.set_array (driver, c_curs, doc=>'Array of cursors');
      PLGdoir.set_array_tag (driver, c_curs, 'drv',doc=>'The name of the driver for which this cursor is defined.');
      PLGdoir.set_array_tag (driver, c_curs, 'curname',doc=>'The name of the cursor');
      PLGdoir.set_array_tag (driver, c_curs, 'collist',doc=>'The column (and expression) list used in the SELECT statement of the cursor');

      PLGdoir.set_array (driver, c_dbobject, doc=>'Array of database objects');
      PLGdoir.set_array_tag (driver, c_dbobject, 'owner',doc=>'The owner of the object');
      PLGdoir.set_array_tag (driver, c_dbobject, 'objectname',doc=>'The name of the object');
      PLGdoir.set_array_tag (driver, c_dbobject, 'objecttype',doc=>'The type of the object');

      PLGdoir.set_array (driver, c_invalid_idents, doc=>'Array of invalid identifiers');
      PLGdoir.set_array_tag (driver, c_invalid_idents, 'driver',doc=>'Driver for which invalid identifier was found');
      PLGdoir.set_array_tag (driver, c_invalid_idents, 'owner',doc=>'Schema from which the generation occurred');
      PLGdoir.set_array_tag (driver, c_invalid_idents, 'name',doc=>'Name of object from which generation occurred');
      PLGdoir.set_array_tag (driver, c_invalid_idents, 'type',doc=>'Type of object from which generation occurred');
      PLGdoir.set_array_tag (driver, c_invalid_idents, 'alias',doc=>'Alias from which identifier was constructed');
      PLGdoir.set_array_tag (driver, c_invalid_idents, 'alias_description',doc=>'Description of alias');
      PLGdoir.set_array_tag (driver, c_invalid_idents, 'ident',doc=>'Identifier that was invalid');
      PLGdoir.set_array_tag (driver, c_invalid_idents, 'new_ident',doc=>'Corrected form of identifier');

      /* Special rows in arrays */

      PLGdoir.setdynvarchar2 (driver, 'INDNAME',
         'PLGgen.uind([\uind.currrow]).index_name',
         doc=>'Name of unique index');

      PLGdoir.setdynvarchar2 (driver, 'FKYNAME',
         'PLGgen.fky([\fky.currrow]).constraint_name',
         doc=>'Name of check constraint');

      PLGdoir.setdynvarchar2 (driver, 'CURNAME',
         'PLGgen.curs([\curs.currrow]).curname',
         doc=>'Name of cursor');

      PLGdoir.setdynvarchar2 (driver, 'COLLIST',
         'PLGgen.curs([\curs.currrow]).collist',
         doc=>'List of columns');

      PLGdoir.setdynvarchar2 (driver, 'CONVERTED_SEARCH_CONDITION',
         'PLGgen.cons([\currrow]).converted_search_condition',
         doc=>'Converted search condition of check constraint');

      PLGdoir.setdynvarchar2 (driver, 'SEARCH_CONDITION',
         'PLGgen.cons([\currrow]).search_condition',
         doc=>'Search condition of check constraint');

      PLGdoir.setdynvarchar2 (driver, 'CONSTRAINT_NAME',
         'PLGgen.cons([\cons.currrow]).converted_constraint_name',
         doc=>'Converted name of check constraint');

      PLGdoir.setdynboolean (driver, 'NOT_NULL',
         'PLGgen.cons([\cons.currrow]).not_null',
         doc=>'INTERNAL USE ONLY');

      PLGdoir.setdynvarchar2 (driver, 'DESCCOLNAME',
         'PLGgen.fkydesccol(PLGofst.shifted ([\fky.currrow], PLGinds.c_max, ' ||
         '[\currrow], 1)).column_name',
         doc=>'Name of descriptor column');

      PLGdoir.setdynvarchar2 (driver, 'DESCTABNAME',
         'PLGgen.fkydesc([\fkydesc.currrow]).table_name',
         doc=>'Name of descriptor table');

      /* Same logic deployed in PLGgen... */

      PLGdoir.setdynvarchar2 (driver, 'FKYDESCINDEX',
         'SUBSTR (PLGgen.fky([\fky.currrow]).comment, 1,' ||
         ' INSTR (PLGgen.fky([\fky.currrow]).comment, ''.'')-1)',
         doc=>'Name of foreign key descriptor index');

      PLGdoir.setdynvarchar2 (driver, 'FKYDESCFUNC',
         'PLGstr.betwn (PLGgen.fky([\fky.currrow]).comment, ''.'', ''.'', inclusive => FALSE)',
         doc=>'Name of foreign key descriptor function');

      PLGdoir.setdynvarchar2 (driver, 'FKYDESCFUNCTYPE',
         'PLGstr.betwn (PLGgen.fky([\fky.currrow]).comment, ''.'', ''.'', ' ||
         ' gotoend => TRUE, inclusive => FALSE)',
         doc=>'Type of foreign key descriptor function');

      PLGdoir.setdynboolean (driver, 'TABWITHDESC',
         'PLGgen.fky([\fky.currrow]).comment IS NOT NULL',
         doc=>'TRUE if table has a descriptor index');

      PLGdoir.setdynvarchar2 (driver, 'PKYTABNAME',
         'PLGgen.fky([\fky.currrow]).pky_table_name',
         doc=>'Name of primary key table of foreign key');

      PLGdoir.setdynvarchar2 (driver, 'FKYPKYCOLNAME',
         'PLGgen.fkycol([\currrow]).pky_column_name',
         doc=>'Name of primary key column of foreign key');

      PLGdoir.setdynvarchar2 (driver, 'PKYTABPKGNAME',
         'PLGgen.fky([\fky.currrow]).pky_table_name',
         doc=>'Name of TE package for table of foreign key');
   END;

   PROCEDURE setlookups
   IS
   BEGIN
      /* IS NULL error checking - Can override for your table or schema. */
      PLGdoir.setlookup (
         driver,
         PLGdoir.c_global,
         PLGdoir.c_raise,
         PLGdoir.c_global,
         'ISNULL',
         -20000,
         'Value of [colname] cannot be NULL',
         PLGdoir.c_global
         );

      /* WHEN OTHERS handling - if present overrides handlemech.

         COMMENTED OUT

      PLGdoir.setlookup (
         driver,
         PLGdoir.c_global,
         PLGdoir.c_handle,
         PLGdoir.c_global,
         'OTHERS',
         NULL,
         NULL
         );
      */
   END;

   PROCEDURE setaliases
   /* The pre-set aliases */
   IS
   BEGIN
      /* File extensions */
      PLGdoir.set_global_alias (driver, 'pkgbodyext', 'pkb',
      'Package body file extension');
      PLGdoir.set_global_alias (driver, 'pkgspecext', 'pks', 'Package specification file extension');
      PLGdoir.set_global_alias (driver, 'pkgdocext', 'html', 'Package documentation file extension');
      PLGdoir.set_global_alias (driver, 'testspecext', 'tps', 'Test package body file extension');
      PLGdoir.set_global_alias (driver, 'testbodyext', 'tpb', 'Test package specification file extension');
      PLGdoir.set_global_alias (driver, 'stubext', 'stb', 'Stub file extension');
      PLGdoir.set_global_alias (driver, 'saext', 'sa', 'Stand-alone programs file extension');
      PLGdoir.set_global_alias (driver, 'stubprocext', 'sp', 'Procedure stub file extension');
      PLGdoir.set_global_alias (driver, 'stubfunccext', 'sf', 'Function stub file extension');
      PLGdoir.set_global_alias (driver, 'sqlext', 'sql', 'SQL script file extension');
      PLGdoir.set_global_alias (driver, 'htmlext', 'html', 'HTML document file extension');

      /* Target Names */
      PLGdoir.set_global_alias (driver, 'pkgbody', '{'||PLGdoir.plgalias||'package}.{'||PLGdoir.plgalias||'pkgbodyext}',
         'Package body file file');
      PLGdoir.set_global_alias (driver, 'pkgspec', '{'||PLGdoir.plgalias||'package}.{'||PLGdoir.plgalias||'pkgspecext}',
         'Package specification file');
      PLGdoir.set_global_alias (driver, 'pkgdoc', '{'||PLGdoir.plgalias||'package}.{'||PLGdoir.plgalias||'pkgdocext}',
         'Package documentation file');
      PLGdoir.set_global_alias (driver, 'testbody', '{'||PLGdoir.plgalias||'package}.{'||PLGdoir.plgalias||'testbodyext}',
         'Test package body file');
      PLGdoir.set_global_alias (driver, 'testspec', '{'||PLGdoir.plgalias||'package}.{'||PLGdoir.plgalias||'testspecext}',
         'Test package specification file');
      PLGdoir.set_global_alias (driver, 'saprogs', '{'||PLGdoir.plgalias||'package}.{'||PLGdoir.plgalias||'saext}',

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -