<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="https://ogobrecht.com/feed_style.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <tabi:metadata xmlns:tabi="https://github.com/welpo/tabi">
        <tabi:base_url>https:&#x2F;&#x2F;ogobrecht.com</tabi:base_url>
        <tabi:separator>
            •
        </tabi:separator>
        <tabi:about_feeds>This is a web feed, also known as an Atom feed. Subscribe by copying the URL from the address bar into your newsreader. Visit About Feeds to learn more and get started. It&#x27;s free.</tabi:about_feeds>
        <tabi:visit_the_site>Visit website</tabi:visit_the_site>
        <tabi:recent_posts>Recent posts</tabi:recent_posts>
        <tabi:last_updated_on>Updated on $DATE</tabi:last_updated_on>
        <tabi:default_theme></tabi:default_theme>
        <tabi:post_listing_date>date</tabi:post_listing_date>
        <tabi:current_section>Generator</tabi:current_section>
    </tabi:metadata><title>Ottmar’s Notes - Generator</title>
        <subtitle>Mainly about Oracle APEX and PL&#x2F;SQL</subtitle>
    <link href="https://ogobrecht.com/tags/generator/atom.xml" rel="self" type="application/atom+xml"/>
    <link href="https://ogobrecht.com/tags/generator/" rel="alternate" type="text/html"/>
    <generator uri="https://www.getzola.org/">Zola</generator><updated>2021-01-31T00:00:00+00:00</updated><id>https://ogobrecht.com/tags/generator/atom.xml</id><entry xml:lang="en">
        <title>Create fast insert scripts</title>
        <published>2021-01-31T00:00:00+00:00</published>
        <updated>2021-01-31T00:00:00+00:00</updated>
        <author>
            <name>Ottmar Gobrecht</name>
        </author>
        <link rel="alternate" href="https://ogobrecht.com/blog/create-fast-insert-scripts/" type="text/html"/>
        <id>https://ogobrecht.com/blog/create-fast-insert-scripts/</id>
        
            <content type="html">&lt;p&gt;A few weeks ago I released a new version of my &lt;a class=&quot;external&quot; rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ogobrecht&#x2F;plex&quot;&gt;PLEX project&lt;&#x2F;a&gt;. I improved the ability to export table data as insert scripts. Previously, PLEX was only able to export CSV data. The reason was that I originally developed PLEX to speed up the implementation of version control in Oracle DB projects, and the ability to export CSV data was intended to track changes in master data tables.&lt;&#x2F;p&gt;
&lt;p&gt;It turned out that a colleague of mine wanted PLEX to export insert scripts for all data in all tables for the initial deployment of a new application. I implemented an initial version, but was not happy with the runtime of the insert scripts. I now hear some people arguing that there are better tools than insert scripts for importing larger amounts of data - but sometimes this is the only accepted way because only SQL*Plus is available to run the deployment scripts….&lt;&#x2F;p&gt;
&lt;p&gt;Then I stumbled across an older post by &lt;a class=&quot;external&quot; rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;connor-mcdonald.com&#x2F;2019&#x2F;05&#x2F;17&#x2F;hacking-together-faster-inserts&#x2F;&quot;&gt;Connor McDonald on creating fast insert scripts&lt;&#x2F;a&gt;. I have integrated his performance hacks into PLEX.&lt;&#x2F;p&gt;
&lt;p&gt;You can use them as follows (see last parameter):&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;sql&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;declare&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;  l_zip_file blob;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;begin&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;  l_zip_file :&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; plex.to_zip(plex.backapp(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;    p_app_id                   &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;=&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt; 100&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,  &lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-comment z-comment&quot;&gt;-- parameter only available when APEX is installed&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;    p_include_ords_modules     &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;=&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; true, &lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-comment z-comment&quot;&gt;-- parameter only available when ORDS is installed&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;    p_include_object_ddl       &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;=&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; true,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;    p_include_data             &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;=&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; true,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;    p_data_as_of_minutes_ago   &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;=&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,     &lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-comment z-comment&quot;&gt;-- Read consistent data with the resulting timestamp (SCN). Defaults to 0.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;    p_data_max_rows            &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;=&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt; 10000&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;, &lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-comment z-comment&quot;&gt;-- Maximum number of rows per table. Defaults to 1000.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;    p_data_table_name_like     &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;=&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt; &amp;#39;CAT\_%,USERS,ROLES,RIGHTS&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;    p_data_table_name_not_like &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;=&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt; &amp;#39;%\_HIST,LOGGER%&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;    p_data_format              &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;=&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt; &amp;#39;insert:10&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;));&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment z-comment&quot;&gt;  -- Do something with the zip file.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment z-comment&quot;&gt;  -- Your code here...&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;end&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The &lt;code&gt;p_data_format&lt;&#x2F;code&gt; parameter is new and can contain a comma-separated list of formats - currently the CSV and INSERT formats are supported. An example: &lt;code&gt;csv,insert&lt;&#x2F;code&gt; exports for each table a CSV file and a SQL file with insert statements. For insert you can also specify the number of rows per &lt;code&gt;insert all&lt;&#x2F;code&gt; statement (default value is 20) - example: &lt;code&gt;csv,insert:10&lt;&#x2F;code&gt; or &lt;code&gt;insert:5&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;As you can see from the &lt;code&gt;p_data_table_name_not_like =&amp;gt; &#x27;%\_HIST,LOGGER%&#x27;&lt;&#x2F;code&gt; parameter, PLEX also accepts lists with like filters. In our example &lt;code&gt;%\_HIST,LOGGER%&lt;&#x2F;code&gt; is translated to:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;sql&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;where&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; ...&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;  and&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; (    table_name &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;not like&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt; &amp;#39;%\_HIST&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; escape &lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;\&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;       and&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; table_name &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;not like&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt; &amp;#39;LOGGER%&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; escape &lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;\&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;       and&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; ...&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;      )&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;For the parameter &lt;code&gt;p_data_table_name_like =&amp;gt; &#x27;CAT\_%,USERS,ROLES,RIGHTS&#x27;&lt;&#x2F;code&gt; the tables are filtered as follows:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;sql&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;where&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; ...&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;  and&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; (   table_name &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;like&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt; &amp;#39;CAT\_%&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; escape &lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;\&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;       or&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; table_name &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;like&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt; &amp;#39;USERS&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;  escape &lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;\&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;       or&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; ...&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;      )&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;There is a good reason why the default &lt;code&gt;p_data_max_rows&lt;&#x2F;code&gt; parameter is set to &lt;code&gt;1000&lt;&#x2F;code&gt; - if you don’t specify table name filters, all tables will be exported…&lt;&#x2F;p&gt;
&lt;p&gt;The resulting insert scripts look like this:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;sql&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment z-comment&quot;&gt;-- Script generated by PLEX version 2.4.2 - more infos here: https:&#x2F;&#x2F;github.com&#x2F;ogobrecht&#x2F;plex&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment z-comment&quot;&gt;-- Performance Hacks by Connor McDonald: https:&#x2F;&#x2F;connor-mcdonald.com&#x2F;2019&#x2F;05&#x2F;17&#x2F;hacking-together-faster-inserts&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment z-comment&quot;&gt;-- For strange line end replacements a big thank to SQL*Plus: https:&#x2F;&#x2F;support.oracle.com&#x2F;epmos&#x2F;faces&#x2F;DocumentDisplay?id=2377701.1 (SQL Failed With ORA-1756 In Sqlplus But Works In SQL Developer)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;prompt &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;-&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; insert&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt; 847&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; rows into&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; USERS (exported &lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt;2021&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;-&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt;01&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;-&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt;31 14&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt;24&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt;30&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt;703234000&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt; +&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt;00&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt;00&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;set&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; define &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;off&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; feedback &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;off&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; sqlblanklines &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;on&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;alter session set&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; cursor_sharing          &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; force&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;alter session set&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; nls_numeric_characters  &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt; &amp;#39;.,&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;alter session set&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; nls_date_format         &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt; &amp;#39;yyyy-mm-dd hh24:mi:ss&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;alter session set&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; nls_timestamp_format    &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt; &amp;#39;yyyy-mm-dd hh24:mi:ssxff&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;alter session set&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; nls_timestamp_tz_format &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt; &amp;#39;yyyy-mm-dd hh24:mi:ssxff tzr&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;begin&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;insert&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; all&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;into&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; USERS(U_ID,U_FIRST_NAME,U_LAST_NAME,U_EMAIL) &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;values&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; (&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt;1&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;Ylcmsajbil&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;Fojkjryntnixzfh&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;qvspjgvwmtbi@ghovilkddx.mly&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;into&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; USERS(U_ID,U_FIRST_NAME,U_LAST_NAME,U_EMAIL) &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;values&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; (&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt;2&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;Axify&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;Cofjlkwzxytdih&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;ajgttnqlds@minokpyfo.gu&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;into&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; USERS(U_ID,U_FIRST_NAME,U_LAST_NAME,U_EMAIL) &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;values&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; (&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt;3&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;Ckyqqvuqrkuktb&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;Igacqwp&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;qpygabuhbrs@nsjxpgjlle.ze&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;into&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; USERS(U_ID,U_FIRST_NAME,U_LAST_NAME,U_EMAIL) &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;values&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; (&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt;4&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;Noythhl&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;Gausfu&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;ngmgsbr@duyxqzn.hmyo&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;into&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; USERS(U_ID,U_FIRST_NAME,U_LAST_NAME,U_EMAIL) &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;values&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; (&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt;5&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;Kpewbrecnfzsi&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;Nwbsnjh&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;xwlhcfaxko@uhqsibdojjp.hsm&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;into&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; USERS(U_ID,U_FIRST_NAME,U_LAST_NAME,U_EMAIL) &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;values&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; (&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt;6&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;Qlzyizkl&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;Gwnaojlvyud&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;kzndqj@nsosenf.fm&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;into&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; USERS(U_ID,U_FIRST_NAME,U_LAST_NAME,U_EMAIL) &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;values&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; (&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt;7&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;Xpepttcemrd&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;Ktaqqdnqyfvc&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;uhbnzezvz@buiptt.lkrm&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;into&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; USERS(U_ID,U_FIRST_NAME,U_LAST_NAME,U_EMAIL) &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;values&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; (&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt;8&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;Ybyinr&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;Vngairocujhy&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;igvfzoegbh@hsepkqiwbst.evs&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;into&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; USERS(U_ID,U_FIRST_NAME,U_LAST_NAME,U_EMAIL) &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;values&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; (&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt;9&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;Ctjixltj&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;Yvsiei&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;ozpspssyw@vooiyfuf.xeh&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;into&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; USERS(U_ID,U_FIRST_NAME,U_LAST_NAME,U_EMAIL) &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;values&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; (&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt;10&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;Lttzwsavnozxu&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;Kcyjalvzrl&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;yvwowaqrpku@dyapdumb.fvi&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;select&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt; *&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; from&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; dual;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment z-comment&quot;&gt;&#x2F;* S N I P *&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;insert&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; all&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;into&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; USERS(U_ID,U_FIRST_NAME,U_LAST_NAME,U_EMAIL) &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;values&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; (&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt;841&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;Gpkabykoveq&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;Gljhlrijqop&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;imnhrheyr@ypccyiu.ah&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;into&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; USERS(U_ID,U_FIRST_NAME,U_LAST_NAME,U_EMAIL) &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;values&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; (&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt;842&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;Mwrfazphbvmekpw&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;Kxirzfth&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;fxoatt@frlbwbn.tf&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;into&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; USERS(U_ID,U_FIRST_NAME,U_LAST_NAME,U_EMAIL) &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;values&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; (&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt;843&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;Hzxomvkliaxl&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;Mstdrrmgfmsy&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;gpeidglzwfa@hwyumsansy.fet&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;into&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; USERS(U_ID,U_FIRST_NAME,U_LAST_NAME,U_EMAIL) &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;values&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; (&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt;844&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;Vwvwezfsd&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;Xtfouojiymtlu&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;zgsdtowsvt@ywfngnijgts.ozd&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;into&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; USERS(U_ID,U_FIRST_NAME,U_LAST_NAME,U_EMAIL) &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;values&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; (&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt;845&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;Eljntjfkxx&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;Sifgii&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;gksggat@ubfmmdopqy.ly&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;into&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; USERS(U_ID,U_FIRST_NAME,U_LAST_NAME,U_EMAIL) &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;values&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; (&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt;846&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;Ewvyjeudjb&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;Anihlpdgeg&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;gietuk@ezciwejuedy.nuf&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;into&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; USERS(U_ID,U_FIRST_NAME,U_LAST_NAME,U_EMAIL) &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;values&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; (&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt;847&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;Wscdamsgssmouf&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;Omtaofvlrjs&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;jrwyzftmbmo@gjylnuez.esq&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;select&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt; *&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; from&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; dual;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;end&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;commit&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;alter session set&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; cursor_sharing &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; exact;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;set&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; define &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;on&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;PLEX saves the NLS settings of the current session and makes sure that the insert scripts run with the same settings - this means that you should not get any number or date conversion errors. The performance hacks from Connor are &lt;code&gt;alter session set cursor_sharing = force;&lt;&#x2F;code&gt; and &lt;code&gt;insert all&lt;&#x2F;code&gt; - thanks for pointing that out Connor :-)&lt;&#x2F;p&gt;
&lt;p&gt;PLEX has many parameters to configure the export - the focus of PLEX is to quickly introduce version control to existing projects (see also &lt;a href=&quot;&#x2F;blog&#x2F;plex-plsql-export-utilities&#x2F;&quot;&gt;this article about PLEX in general&lt;&#x2F;a&gt;). If you want to use PLEX only for exporting table data, then you should create a wrapper function for it that suits your personal needs - here is an example:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;sql&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;create or replace function&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-function&quot;&gt; to_insert&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;  p_table_name &lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;varchar2&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;  p_max_rows   &lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type z-storage z-modifier&quot;&gt;integer default&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt; 1000&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;  p_batch_size &lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type z-storage z-modifier&quot;&gt;integer default&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt; 20&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;  return&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; clob&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;is&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;  l_file_collection plex.tab_export_files;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;begin&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;  l_file_collection :&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; plex.backapp(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;    p_include_data         &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;=&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; true,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;    p_data_max_rows        &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;=&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; p_max_rows,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;    p_data_table_name_like &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;=&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; p_table_name,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;    p_data_format          &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;=&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt; &amp;#39;insert:&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt; ||&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; to_char(p_batch_size),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment z-comment&quot;&gt;    --overwrite defaults to save work for plex:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;    p_include_templates    &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;=&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; false,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;    p_include_runtime_log  &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;=&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; false,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;    p_include_error_log    &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;=&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; false);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;  return&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; l_file_collection(&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt;1&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;).contents;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;end&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now you can always do a quick export like this: &lt;code&gt;select to_insert(&#x27;USERS&#x27;, 10000) from dual;&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Happy exporting and scripting :-)&lt;&#x2F;p&gt;
&lt;p&gt;Ottmar&lt;&#x2F;p&gt;
</content>
        <summary type="html">PL&#x2F;SQL Export Utilities are now able to export table data as insert scripts</summary>
        </entry><entry xml:lang="en">
        <title>New Version of Oracle Table API Generator Available</title>
        <published>2020-12-26T00:00:00+00:00</published>
        <updated>2020-12-26T00:00:00+00:00</updated>
        <author>
            <name>Ottmar Gobrecht</name>
        </author>
        <link rel="alternate" href="https://ogobrecht.com/blog/new-version-of-oracle-table-api-generator-available/" type="text/html"/>
        <id>https://ogobrecht.com/blog/new-version-of-oracle-table-api-generator-available/</id>
        
            <content type="html">&lt;p&gt;Short before Christmas André and I released version 0.6.0 of our &lt;a class=&quot;external&quot; rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;OraMUC&#x2F;table-api-generator&quot;&gt;table API generator&lt;&#x2F;a&gt;. The last release was exactly two years ago - time flies. This blog post highlights some of the changes - the &lt;a class=&quot;external&quot; rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;OraMUC&#x2F;table-api-generator&#x2F;blob&#x2F;master&#x2F;docs&#x2F;changelog.md#060-2020-12-20&quot;&gt;complete changelog is available on GitHub&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;bulk-processing&quot;&gt;Bulk Processing&lt;&#x2F;h2&gt;
&lt;p&gt;When you split your app over multiple schemas for higher data security you might need at some point the possibility to bulk process your data. Imagine the following, common schema setup (also see this nice &lt;a class=&quot;external&quot; rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=OF7qR5lAmiw&quot;&gt;video by Connor McDonald&lt;&#x2F;a&gt;, 20 minutes):&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Data Schema: Holds your tables and provides table APIs for the other schemas, which have only select rights on the tables (or views) and execute rights on the table APIs&lt;&#x2F;li&gt;
&lt;li&gt;API Schema: Holds your business logic and provides business APIs to the app parsing schema&lt;&#x2F;li&gt;
&lt;li&gt;UI Schema: Has no own objects, only connect rights and is used as the parsing schema to run the application&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;This setup follows the principle of the least privilege. When you need to bulk process your data in the business logic (API schema), then you have a problem without bulk processing facilities in your table APIs. You need to implement business logic in the data schema or you grant update and&#x2F;or delete rights to the API schema. The first solution is against the separation of concerns and the second one lowers your data security and maybe prevents you from not having triggers (more about this later in the audit columns section).&lt;&#x2F;p&gt;
&lt;p&gt;That is why we have now also bulk processing in the core of our generated table APIs. Here is how you can use it in your business logic:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;sql&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment z-comment&quot;&gt;&#x2F;* EXAMPLE INSERT&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;To keep the memory usage low we break our inserts into&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;a bulk size of 1000 rows. You should adapt the bulk size&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment z-punctuation z-definition z-comment&quot;&gt;to your use case. *&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;declare&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;  l_rows_tab     data_schema.your_table_api.t_rows_tab;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;  l_number_bulks &lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;integer&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; :&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt; 100&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;  l_bulk_size    &lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;integer&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; :&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt; 1000&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;begin&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;  l_rows_tab :&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; data_schema.your_table_api.t_rows_tab&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt;()&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;  l_rows_tab.extend(l_bulk_size);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;  &amp;lt;&amp;lt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;number_bulks&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;&amp;gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;  for&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; z &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;in&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; .. l_number_bulks &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;loop&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;    &amp;lt;&amp;lt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;bulk_size&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;&amp;gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;    for&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; i &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;in&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; .. l_bulk_size &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;loop&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;      l_rows_tab(i).column_1 :&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; your_logic_here;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;      l_rows_tab(i).column_2 :&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; your_logic_here;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;    end loop&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; bulk_size;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;    data_schema.your_table_api.create_rows(l_rows_tab);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;    commit&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;  end loop&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; number_bulks;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;end&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;sql&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment z-comment&quot;&gt;&#x2F;* EXAMPLE UPDATE *&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;declare&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;  l_rows_tab   data_schema.your_table_api.t_rows_tab;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;  l_ref_cursor data_schema.your_table_api.t_strong_ref_cursor;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;begin&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment z-comment&quot;&gt;  -- optionally set bulk limit, default is 1000&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment z-comment&quot;&gt;  -- data_schema.your_table_api.set_bulk_limit(500);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;  open&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; l_ref_cursor &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;for&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;    select&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt; *&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt; from&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; app_users &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;where&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; your_conditions_here;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;  &amp;lt;&amp;lt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;outer_bulk&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;&amp;gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;  loop&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;    l_rows_tab :&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; data_schema.your_table_api.read_rows(l_ref_cursor);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;    &amp;lt;&amp;lt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;inner_data&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;&amp;gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;    for&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; i &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;in&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; .. l_rows_tab.count&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;    loop&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment z-comment&quot;&gt;      --do your business logic here&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;      l_rows_tab(i).column_1 :&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; your_logic_here;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;    end loop&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; inner_data;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;    data_schema.your_table_api.update_rows(l_rows_tab);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;    commit&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;    exit &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;when&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; data_schema.your_table_api.bulk_is_complete;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;  end loop&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; outer_bulk;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;  close&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; l_ref_cursor;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;end&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The bulk deletion works the same way as the bulk update - the difference is that you do not modify your data before calling the &lt;code&gt;delete_rows&lt;&#x2F;code&gt; method.&lt;&#x2F;p&gt;
&lt;p&gt;For more examples see the docs:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class=&quot;external&quot; rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;OraMUC&#x2F;table-api-generator&#x2F;blob&#x2F;master&#x2F;docs&#x2F;bulk-processing.md&quot;&gt;Basic usage&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a class=&quot;external&quot; rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;OraMUC&#x2F;table-api-generator&#x2F;blob&#x2F;master&#x2F;docs&#x2F;bulk-processing-performance.md&quot;&gt;Performance tests&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;support-for-audit-columns&quot;&gt;Support for Audit Columns&lt;&#x2F;h2&gt;
&lt;p&gt;Keeping the bulk processing in mind for performance reasons it is a bad idea to have triggers only to manage audit columns in a table. If you have your tables in an own schema and the business logic and the app cannot directly write to the tables then it is easy to prevent triggers. Therefore the table APIs need to support that and hides the audit columns for insert or update operations. This is what our generator now supports.&lt;&#x2F;p&gt;
&lt;p&gt;You can map your specific audit column names to the four often used names &lt;code&gt;created&lt;&#x2F;code&gt;, &lt;code&gt;created_by&lt;&#x2F;code&gt;, &lt;code&gt;updated&lt;&#x2F;code&gt; and &lt;code&gt;updated_by&lt;&#x2F;code&gt; by providing a mapping string to the new parameter &lt;code&gt;p_audit_column_mappings&lt;&#x2F;code&gt; - an example:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;sql&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment z-comment&quot;&gt;-- TABLE DEFINITION --&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;create table&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-function&quot;&gt; app_users&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; (&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;  au_id          &lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type z-keyword&quot;&gt;integer            generated always as identity&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;  au_first_name  &lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;varchar2&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt;15&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; char&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;)                         ,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;  au_last_name   &lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;varchar2&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt;15&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; char&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;)                         ,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;  au_email       &lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;varchar2&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt;30&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; char&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;)               &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;not null&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;  ,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;  au_active_yn   &lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;varchar2&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt;1&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; char&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;)   &lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-modifier&quot;&gt;default&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt; &amp;#39;Y&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;  not null&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;  ,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment z-comment&quot;&gt;  -- This is only for demo purposes. In reality we expect&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment z-comment&quot;&gt;  -- more unified names and types for audit columns.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;  au_created_on  &lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type z-keyword&quot;&gt;date                            not null&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;  ,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;  au_created_by  &lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;char&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt;15&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; char&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;)                   &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;not null&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;  ,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;  au_updated_at  &lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type z-keyword&quot;&gt;timestamp                       not null&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;  ,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;  au_updated_by  &lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt;varchar2&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt;15&lt;&#x2F;span&gt;&lt;span class=&quot;z-storage z-type&quot;&gt; char&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;)               &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;not null&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;  ,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment&quot;&gt;  --&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-modifier&quot;&gt;  primary key&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; (au_id),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;  unique&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; (au_email),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-storage z-modifier&quot;&gt;  check&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; (au_active_yn &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword&quot;&gt;in&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; (&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;Y&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;, &lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt;&amp;#39;N&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;))&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;begin&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;  om_tapigen.compile_api(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;    p_table_name            &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;=&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt; &amp;#39;APP_USERS&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;    p_audit_column_mappings &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;=&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt; &amp;#39;created=#PREFIX#_CREATED_ON, created_by=#PREFIX#_CREATED_BY, updated=#PREFIX#_UPDATED_AT, updated_by=#PREFIX#_UPDATED_BY&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;  );&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;end&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The &lt;code&gt;#PREFIX#&lt;&#x2F;code&gt; in our example is optional (determined automatically by the generator) and replaced with the found column_prefix &lt;code&gt;au&lt;&#x2F;code&gt;. Doing it this way you can provide always the same audit column mapping to all of your tables. I know some people hate column prefixes - but if you design your data models this way the generator can save you the work to align the mapping for each table.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;support-for-a-row-version-column&quot;&gt;Support for a Row Version Column&lt;&#x2F;h2&gt;
&lt;p&gt;The same reasons with triggers for the audit columns are valid for the support of a row version column. This can also be handled by our generator:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;sql&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;begin&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;  om_tapigen.compile_api(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;    p_table_name                 &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;=&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt; &amp;#39;YOUR_TABLE&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;    p_row_version_column_mapping &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;=&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt; &amp;#39;#PREFIX#_VERSION_ID=tag_global_version_sequence.nextval&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;  );&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;end&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;You can also see here the before mentioned &lt;code&gt;#PREFIX#&lt;&#x2F;code&gt; substitution. The difference is that you define here only your column and for the column the SQL expression which should be used for the row version column - in this case, a sequence.&lt;&#x2F;p&gt;
&lt;p&gt;What we cannot do here is to add always 1 to the previous value like it is possible in a trigger - the table API has no idea what the previous value was. So, we are a little bit limited to a SQL expression but the point is, you can let the generated API manage the row version column without having a trigger.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;tenant-support&quot;&gt;Tenant Support&lt;&#x2F;h2&gt;
&lt;p&gt;This is the third new column mapping definition. For all people who have not an enterprise version with the VPD (virtual private database) functionality you can define a tenant expression for one of your columns:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;sql&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;begin&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;  om_tapigen.compile_api(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;    p_table_name            &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;=&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt; &amp;#39;YOUR_TABLE&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;    p_tenant_column_mapping &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;=&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt; &amp;#39;#PREFIX#_TENANT_ID=to_number(sys_context(&amp;#39;&amp;#39;my_sec_ctx&amp;#39;&amp;#39;,&amp;#39;&amp;#39;my_tenant_id&amp;#39;&amp;#39;))&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;  );&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword&quot;&gt;end&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;For more information see the &lt;a class=&quot;external&quot; rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;OraMUC&#x2F;table-api-generator&#x2F;blob&#x2F;master&#x2F;docs&#x2F;parameters.md#p_tenant_column_mapping-since-v060&quot;&gt;parameter docs for p_tenant_column_mapping&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;more&quot;&gt;More&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;A new optional 1:1 view can be generated (new parameter &lt;code&gt;p_enable_one_to_one_view&lt;&#x2F;code&gt;)&lt;&#x2F;li&gt;
&lt;li&gt;All generated object names can now be customized (new parameters &lt;code&gt;p_dml_view_name&lt;&#x2F;code&gt;, &lt;code&gt;p_dml_view_trigger_name&lt;&#x2F;code&gt; and &lt;code&gt;p_one_to_one_view_name&lt;&#x2F;code&gt;)&lt;&#x2F;li&gt;
&lt;li&gt;Double quoting of table and column names in the generated code can now be configured (new parameter &lt;code&gt;p_double_quote_names&lt;&#x2F;code&gt;, default true)&lt;&#x2F;li&gt;
&lt;li&gt;A new helper function &lt;code&gt;get_default_row&lt;&#x2F;code&gt; will be generated, when parameter &lt;code&gt;p_enable_column_defaults&lt;&#x2F;code&gt; is set to true (to support the row based create_row function)&lt;&#x2F;li&gt;
&lt;li&gt;We have now unit tests driven by utPLSQL (it will be a permanent task to improve the tests with every new feature or bugfix)&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;breaking-changes&quot;&gt;Breaking Changes&lt;&#x2F;h2&gt;
&lt;p&gt;Where there is light, there is also shadow.&lt;&#x2F;p&gt;
&lt;p&gt;All the new features like bulk processing and audit column support make it hard, if not impossible, to generate a generic change log during the row processing. Also the check, if we have a modification and omit an update if not necessary is hard to implement and not good for the performance with the evolved generator. So we skipped the mentioned functionality.&lt;&#x2F;p&gt;
&lt;p&gt;As far as we know not many people use the generic changelog. If you do, you have to stick with the previous generator version or you have to find an alternative way to do it in the future. A good way seems to be the use of the Flashback Data Archive as it is performant and available in all database editions for free - and you can load existing data into the archive (see Tims article below):&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Blog post by Connor McDonald: &lt;a class=&quot;external&quot; rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;blogs.oracle.com&#x2F;oraclemagazine&#x2F;a-fresh-look-at-auditing-row-changes&quot;&gt;Triggers can provide auditing information, but there’s a future in flashback&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Blog post by Tim Hall: &lt;a class=&quot;external&quot; rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;oracle-base.com&#x2F;articles&#x2F;12c&#x2F;flashback-data-archive-fda-enhancements-12cr1&quot;&gt;Flashback Data Archive (FDA) Enhancements in Oracle Database 12c Release 1 (12.1)&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Video by Connor McDonald: &lt;a class=&quot;external&quot; rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=qIs2UPIodQg&quot;&gt;Flashback Data Archive&lt;&#x2F;a&gt; (14 minutes)&lt;&#x2F;li&gt;
&lt;li&gt;Video APEX Connect 2020 by Connor McDonald: &lt;a class=&quot;external&quot; rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=gqX91080r7A&quot;&gt;Flashback – so much more&lt;&#x2F;a&gt; (47 minutes)&lt;&#x2F;li&gt;
&lt;li&gt;Video AskTOM Office Hours by Chris Saxon: &lt;a class=&quot;external&quot; rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=q81_UDnEpIs&quot;&gt;The Incredible Flashback Data Archive&lt;&#x2F;a&gt; (53 minutes)&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;And the last Breaking change is, that you need at least Oracle DB 12.1 or higher. That should (hopefully) no problem for the most projects.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;&#x2F;h2&gt;
&lt;p&gt;A big THANK YOU to all contributors - the current version of the generator would not be possible without your feedback and help.&lt;&#x2F;p&gt;
&lt;p&gt;Be sure to test the new generator before migrating to it. We use it already in some projects and it should be pretty stable. Nevertheless, with so many changed things we cannot give you a guarantee for every edge case - by using it you accept the MIT license. Please check out the &lt;a class=&quot;external&quot; rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;OraMUC&#x2F;table-api-generator&quot;&gt;project page at GitHub&lt;&#x2F;a&gt; and &lt;a class=&quot;external&quot; rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;OraMUC&#x2F;table-api-generator&#x2F;issues&#x2F;new&#x2F;choose&quot;&gt;open an issue&lt;&#x2F;a&gt; if you encounter a problem.&lt;&#x2F;p&gt;
&lt;p&gt;A happy new year and happy coding :-)&lt;&#x2F;p&gt;
&lt;p&gt;Ottmar&lt;&#x2F;p&gt;
</content>
        <summary type="html">Bulk processing, support for audit and row version columns and more</summary>
        </entry><entry xml:lang="en">
        <title>PLOC - Convert PL&#x2F;SQL Code into Markdown Docs</title>
        <published>2019-01-10T00:00:00+00:00</published>
        <updated>2019-01-10T00:00:00+00:00</updated>
        <author>
            <name>Ottmar Gobrecht</name>
        </author>
        <link rel="alternate" href="https://ogobrecht.com/blog/ploc-plsql-code-to-doc-converter/" type="text/html"/>
        <id>https://ogobrecht.com/blog/ploc-plsql-code-to-doc-converter/</id>
        
            <content type="html">&lt;p&gt;&lt;img src=&quot;&#x2F;img&#x2F;ploc.png&quot; alt=&quot;Screenshot with a source&#x2F;Markdown&#x2F;HTML comparison&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Some months ago I had to write a README file with Markdown syntax for a PL&#x2F;SQL open source project. I changed function and procedure parameters of the package often during the implementation. Therefore, maintaining the documentation was no fun in the beginning. Maybe you know this from your own (payed) projects ;-)&lt;&#x2F;p&gt;
&lt;p&gt;Normally in the business world I see minimalistic comments in the code and a dedicated documentation independent of the code. As you can imagine, the latter is sometimes - let’s say “out of date”, if it exists at all …&lt;&#x2F;p&gt;
&lt;p&gt;I don’t want to discuss the reasons for this here - you all know several ones. And I also do not have a general solution for code documentation. But I have some ideas what is important for me:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;The base of a good PL&#x2F;SQL code documentation is a good code structure
&lt;ul&gt;
&lt;li&gt;No single functions and procedures - packages with meaningful names are the way to go&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;As I have the source code under version control in local files on my computer I need a command line tool for the doc generation - there is no need for a database connection
&lt;ul&gt;
&lt;li&gt;The CLI should be able to process multiple files (packages)&lt;&#x2F;li&gt;
&lt;li&gt;For my small open source project I have only one package and I want to define a document name different then the package name, so I need a CLI parameter for that&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;Comments should be written directly after the package&#x2F;function&#x2F;procedure signature (in the package spec, optionally it should also work for triggers and types)
&lt;ul&gt;
&lt;li&gt;I want to use Markdown for the comments - this allows me to write also bigger text parts and code examples&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;I don’t want to describe all parameters in a JavaDoc manner
&lt;ul&gt;
&lt;li&gt;PL&#x2F;SQL is strong typed, everything I need to know is visible in the signature of a function or procedure&lt;&#x2F;li&gt;
&lt;li&gt;Replicating the parameters for documentation is error prone and does not follow the DRY principles&lt;&#x2F;li&gt;
&lt;li&gt;With meaningful parameter names you need often no or only short comments - these can be placed directly after the parameters as single line comments&lt;&#x2F;li&gt;
&lt;li&gt;Long descriptions can be written in the Markdown main comment&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;The package&#x2F;function&#x2F;procedure signature should be automatically included in the output as a code block for reference&lt;&#x2F;li&gt;
&lt;li&gt;Output should also be Markdown - this can be easily read by humans and further processed by machines
&lt;ul&gt;
&lt;li&gt;Only documented functions&#x2F;procedures should be included in the output to keep the focus on the important stuff&lt;&#x2F;li&gt;
&lt;li&gt;I want to have an automatic table of contents in each generated document&lt;&#x2F;li&gt;
&lt;li&gt;With the help of &lt;a class=&quot;external&quot; rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;pandoc.org&#x2F;&quot;&gt;Pandoc&lt;&#x2F;a&gt; many formats like Word, RTF, PDF or HTML can be generated (for GitHub I only need Markdown)&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;There are already several open source projects available for PL&#x2F;SQL code documentation generation:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class=&quot;external&quot; rel=&quot;external&quot; href=&quot;http:&#x2F;&#x2F;pldoc.sourceforge.net&#x2F;&quot;&gt;PLDoc&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a class=&quot;external&quot; rel=&quot;external&quot; href=&quot;http:&#x2F;&#x2F;oradoclet.sourceforge.net&#x2F;&quot;&gt;OraDoclet&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a class=&quot;external&quot; rel=&quot;external&quot; href=&quot;http:&#x2F;&#x2F;schemaspy.sourceforge.net&#x2F;&quot;&gt;SchemaSpy&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a class=&quot;external&quot; rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.naturaldocs.org&#x2F;&quot;&gt;Natural Docs&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a class=&quot;external&quot; rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;OraOpenSource&#x2F;plsql-md-doc&quot;&gt;PL&#x2F;SQL to Markdown Documenter&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Only the last one is able to generate Markdown docs, but the input has to be in JavaDoc. All the others can produce HTML output and often some other formats like RTF, Word or PDF. Natural Docs has a Markdown like simple text syntax, but also no Markdown output. Some of the tools can automatically document a whole schema - that is not the focus of PLOC. Most comparable is the intention of PL&#x2F;SQL to Markdown  Documenter.&lt;&#x2F;p&gt;
&lt;p&gt;So I had to do it by myself. I called it PLOC (PLDoc was already used, so I skipped the D…) and it is implemented in JavaScript as a npm package and currently used by me for the following two projects: &lt;a class=&quot;external&quot; rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ogobrecht&#x2F;plex&quot;&gt;PL&#x2F;SQL Export Utilities&lt;&#x2F;a&gt; and &lt;a class=&quot;external&quot; rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;OraMUC&#x2F;table-api-generator&quot;&gt;Oracle Table API Generator&lt;&#x2F;a&gt;. It is very lightweight - the main code without the CLI has currently less characters as the Markdown source of this blog post. Maybe it is also useful for you. If not, have a look at the other mentioned projects.&lt;&#x2F;p&gt;
&lt;p&gt;More infos about &lt;a class=&quot;external&quot; rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ogobrecht&#x2F;ploc&quot;&gt;PLOC&lt;&#x2F;a&gt; itself can be found on the &lt;a class=&quot;external&quot; rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;ogobrecht&#x2F;ploc&quot;&gt;project page&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Happy coding and documenting :-)&lt;&#x2F;p&gt;
&lt;p&gt;Ottmar&lt;&#x2F;p&gt;
</content>
        <summary type="html">Another way to document PL&#x2F;SQL business logic</summary>
        </entry><entry xml:lang="en">
        <title>Table API Generator v0.5.0 Available</title>
        <published>2018-12-26T00:00:00+00:00</published>
        <updated>2018-12-26T00:00:00+00:00</updated>
        <author>
            <name>Ottmar Gobrecht</name>
        </author>
        <link rel="alternate" href="https://ogobrecht.com/blog/table-api-generator-v0-5-0-available/" type="text/html"/>
        <id>https://ogobrecht.com/blog/table-api-generator-v0-5-0-available/</id>
        
            <content type="html">&lt;p&gt;Short before Christmas André and I released version 0.5.0 of our &lt;a class=&quot;external&quot; rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;OraMUC&#x2F;table-api-generator&quot;&gt;PL&#x2F;SQL table API generator&lt;&#x2F;a&gt;. It took a long time to come to this point. One of the reasons behind was the fact that we had to rework some internals to support feature wishes from the community. Here the most important features of the new version:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Support for multicolumn primary keys&lt;&#x2F;li&gt;
&lt;li&gt;Support for 12c long identifier names&lt;&#x2F;li&gt;
&lt;li&gt;More control over the API features and name (10 new parameters)&lt;&#x2F;li&gt;
&lt;li&gt;Insert methods:
&lt;ul&gt;
&lt;li&gt;Can have the dictionary column defaults&lt;&#x2F;li&gt;
&lt;li&gt;Can return the whole row instead of the primary key&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;You can exclude columns (e.g. audit columns) for inserts and updates&lt;&#x2F;li&gt;
&lt;li&gt;Improved template engine:
&lt;ul&gt;
&lt;li&gt;Generated code better readable because of formatted parameter lists&lt;&#x2F;li&gt;
&lt;li&gt;Tables with many columns no longer breaking character limits&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;Special methods for testing and dummy data generation&lt;&#x2F;li&gt;
&lt;li&gt;Also see the &lt;a class=&quot;external&quot; rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;OraMUC&#x2F;table-api-generator&#x2F;blob&#x2F;master&#x2F;docs&#x2F;changelog.md#050-2018-12-23&quot;&gt;full changelog on the project site&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Happy new year and happy coding :-)&lt;&#x2F;p&gt;
&lt;p&gt;Ottmar&lt;&#x2F;p&gt;
</content>
        <summary type="html">Long changelog and took a long time </summary>
        </entry><entry xml:lang="en">
        <title>HydeBar</title>
        <published>2017-11-29T00:00:00+00:00</published>
        <updated>2017-11-29T00:00:00+00:00</updated>
        <author>
            <name>Ottmar Gobrecht</name>
        </author>
        <link rel="alternate" href="https://ogobrecht.com/blog/hydebar/" type="text/html"/>
        <id>https://ogobrecht.com/blog/hydebar/</id>
        
            <content type="html">&lt;p&gt;Earlier this year I wrote at the end of &lt;a href=&quot;&#x2F;blog&#x2F;dokuwiki-plugin-revealjs&quot;&gt;this post&lt;&#x2F;a&gt;:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;PS: In the meantime I switched complete to Markdown and &lt;a class=&quot;external&quot; rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;jekyllrb.com&quot;&gt;Jekyll&lt;&#x2F;a&gt;, a static site generator - but this is another story for another post …&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;As always - it took a bit longer then expected. In the meantime I was fiddling around with Jekyll and modifying the default theme Minima to my needs. Then I stumbled over the &lt;a class=&quot;external&quot; rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;nijikokun&#x2F;minami&quot;&gt;JSDoc theme Minami&lt;&#x2F;a&gt; and the &lt;a class=&quot;external&quot; rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;shopify.github.io&#x2F;liquid&#x2F;&quot;&gt;Liquid docs site&lt;&#x2F;a&gt; - both with nice sidebars. I wanted to have such a nice sidebar for my dev blog and began to look deeper how it was implemented. To my surprise the sidebar from the JSDoc theme Minami was complete CSS driven - cool.&lt;&#x2F;p&gt;
&lt;p&gt;It took me a while to full understand how it was working. With this knowledge and the design inspirations I was able to improve the Jekyll default theme to a sidebar template. As a bonus I integrated the HTML based slideshow library Reveal.js - you can write now your blog posts and slides with markdown.&lt;&#x2F;p&gt;
&lt;p&gt;The nice thing about blogging with markdown is, that you don’t need to switch your tools - you use the usual ones from the daily programming job. It goes even better when you use GitHub: You commit your changes and GitHub takes care about generating your blog content from your sources. And the result is a fast and secure static site.&lt;&#x2F;p&gt;
&lt;p&gt;I had a accepted talk at the &lt;a class=&quot;external&quot; rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;2017.doag.org&#x2F;en&#x2F;home&#x2F;&quot;&gt;DOAG Conference + Exhibition 2017&lt;&#x2F;a&gt; in the stream “Strategy &amp;amp; Business Practices” about blogging for developers with Jekyll. Unfortunately short before I had an accident and broke my right upper arm :-(&lt;&#x2F;p&gt;
&lt;p&gt;My colleague Markus Dötsch was taking over the presentation and I concentrated on delivering the free time project “Jekyll sidebar template”. This was the working title before I renamed it to “HydeBar” - a play with “Dr. Jekyll and Mr. Hyde” and the fact, that it is a sidebar template.&lt;&#x2F;p&gt;
&lt;p&gt;Yesterday I released version 1.0.0. You can start blogging for free in five minutes with this &lt;a class=&quot;external&quot; rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;ogobrecht.github.io&#x2F;hydebar&#x2F;features#quickstart-online-in-5-minutes&quot;&gt;quick start guide&lt;&#x2F;a&gt;. The &lt;a class=&quot;external&quot; rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;ogobrecht.github.io&#x2F;hydebar&quot;&gt;online demo&lt;&#x2F;a&gt; is serving as template, documentation and showcase. The mentioned slides from the &lt;a class=&quot;external&quot; rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;2017.doag.org&#x2F;en&#x2F;home&#x2F;&quot;&gt;DOAG Conference&lt;&#x2F;a&gt; are included in this demo (in German, sorry…).&lt;&#x2F;p&gt;
&lt;p&gt;Happy blogging :-)&lt;&#x2F;p&gt;
&lt;p&gt;Ottmar&lt;&#x2F;p&gt;
</content>
        <summary type="html">A Jekyll Sidebar Template</summary>
        </entry><entry xml:lang="en">
        <title>Table API Generator</title>
        <published>2016-06-10T00:00:00+00:00</published>
        <updated>2016-06-10T00:00:00+00:00</updated>
        <author>
            <name>Ottmar Gobrecht</name>
        </author>
        <link rel="alternate" href="https://ogobrecht.com/blog/table-api-generator/" type="text/html"/>
        <id>https://ogobrecht.com/blog/table-api-generator/</id>
        
            <content type="html">&lt;p&gt;Last year I needed for a project a simple table API, which is able to generate a generic change log - something like “show me for table xyz which column was changed when and what was the old value and what is the new one”. Only changed values should be stored and all tables should log into the same generic logging table. Sounds like we need a generator for this.&lt;&#x2F;p&gt;
&lt;p&gt;Unfortunately there was no time in the project to create such a generator from the ground. Luckily André, a colleague of me, had started to implement such an API generator in his free time and I had only to implement the generic change log functionality - also in my free time. Our API generator open source project was born :-)&lt;&#x2F;p&gt;
&lt;p&gt;Later on I needed a function to get the id from an record by the unique columns - next feature for the API generator: generate a (overloaded) function for each unique constraint on a table. Now it is a simple function call to get the id:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;sql&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;your_var :&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt; your_table_name_api.get_pk_by_unique_cols(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;    p_column_name_1 &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;=&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-string&quot;&gt; &amp;#39;xyz&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;    p_column_name_2 &lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator&quot;&gt;=&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt; 123&lt;&#x2F;span&gt;&lt;span class=&quot;z-source&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-source&quot;&gt;    ...);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The API is also handling the case, when no data is found and everything without the need to look in the dictionary for the unique columns of that table or to write boilerplate code and possibly forget one column.&lt;&#x2F;p&gt;
&lt;p&gt;The next thing for APEX was “For tabular forms you can’t use APIs”. We came up with the idea to generate a view for each table with an instead of trigger for inserts, updates and deletions. The trigger is simply calling the API. Now you can use APEX own “automatic row processing” and the generic logging together.&lt;&#x2F;p&gt;
&lt;p&gt;In my holiday this spring I stumbled over a tweet from Phillip Salvisberg about his &lt;a class=&quot;external&quot; rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.oddgen.org&quot;&gt;oddgen project&lt;&#x2F;a&gt;, a SQL Developer extension to invoke dictionary-driven code generators. I was thrilled, we can have a SQL Developer integration by writing a small PL&#x2F;SQL wrapper for oddgen. I finished the integration in my holiday, I could not wait.&lt;&#x2F;p&gt;
&lt;p&gt;Over the time we found out, that the generation of the thin API wrappers for our tables saves us time and makes our code more stable and readable because of the saved boilerplate code.
Business logic packages becomes invalid after table changes and API regeneration. This is good, because you can see, which API calls are now invalid. If you have simple insert or update statements you might oversee some places, where the statement is still valid for example with an added table column, but in fact does the wrong insert or update.&lt;&#x2F;p&gt;
&lt;p&gt;And the last thing, what is now possible: Security - separate the data from the user interface. Simply grant execute rights on the API and business logic packages to the UI schema and disable the deletion of rows in your API packages when you don’t need it. No user will be able to drop or truncate your tables, because there are no tables in the UI schema.&lt;&#x2F;p&gt;
&lt;p&gt;The generated API packages are really thin - nothing special at all. Nevertheless they are powerful time savers.&lt;&#x2F;p&gt;
&lt;p&gt;You can find the sources and more informations on &lt;a class=&quot;external&quot; rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;OraMUC&#x2F;table-api-generator&quot;&gt;GitHub&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Happy coding :-)&lt;&#x2F;p&gt;
&lt;p&gt;Ottmar&lt;&#x2F;p&gt;
</content>
        <summary type="html">An Oracle PL&#x2F;SQL package with SQL Developer integration</summary>
        </entry>
</feed>
