{"id":7008,"date":"2016-04-26T22:50:42","date_gmt":"2016-04-26T20:50:42","guid":{"rendered":"https:\/\/www.salvis.com\/blog\/?p=7008"},"modified":"2023-11-07T22:42:41","modified_gmt":"2023-11-07T21:42:41","slug":"plsql-cop-meets-oddgen","status":"publish","type":"post","link":"https:\/\/www.salvis.com\/blog\/2016\/04\/26\/plsql-cop-meets-oddgen\/","title":{"rendered":"PL\/SQL Cop Meets oddgen"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Until August 2015 it never occurred to me that one could\u00a0use\u00a0non-PL\/SQL code within conditional compilation blocks. Back then we discussed various template engine options as the foundation for <a href=\"https:\/\/www.oddgen.org\/\">oddgen<\/a>\u00a0&#8211; the\u00a0<a href=\"https:\/\/community.oracle.com\/docs\/DOC-920316\">Oracle community&#8217;s<\/a> dictionary-driven code generator.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">oddgen supports nowadays the&nbsp;in-database template engines <a href=\"https:\/\/github.com\/ftldb\/ftldb\/blob\/main\/README.md\">FTLDB<\/a> and <a href=\"https:\/\/github.com\/osalvador\/tePLSQL\/blob\/main\/README.md\">tePLSQL<\/a>.&nbsp;Both tools may access templates stored&nbsp;in PL\/SQL packages using a selection directive. Here&#8217;s the package body of a generator using FTLDB:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);--cbp-line-highlight-color:rgba(234, 191, 191, 0.2);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2b2b2b;color:#c7c7c7\">FTLDB Hello World example<\/span><span role=\"button\" tabindex=\"0\" data-code=\"CREATE OR REPLACE PACKAGE BODY ftldb_hello_world IS\n\n$IF FALSE $THEN\n--%begin generate_ftl\n<#assign object_type = template_args[0]\/&gt;\n<#assign object_name = template_args[1]\/&gt;\nBEGIN\n   sys.dbms_output.put_line('Hello ${object_type} ${object_name}!');\nEND;\n${&quot;\/&quot;}\n--%end generate_ftl\n$END\n\n   FUNCTION generate(in_object_type IN VARCHAR2,\n                     in_object_name IN VARCHAR2) RETURN CLOB IS\n      l_result CLOB;\n      l_args varchar2_nt;\n   BEGIN\n      l_args := NEW varchar2_nt(in_object_type, in_object_name);\n      l_result := ftldb_api.process_to_clob(in_templ_name =&gt; $PLSQL_UNIT || '%generate_ftl',\n                                            in_templ_args =&gt; l_args);\n      RETURN l_result;\n   END generate;\nEND ftldb_hello_world;\n\/\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #569CD6\">CREATE OR REPLACE<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">PACKAGE BODY<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #4EC9B0\">ftldb_hello_world<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">IS<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line cbp-line-highlight\"><span style=\"color: #D4D4D4\">$<\/span><span style=\"color: #C586C0\">IF<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">FALSE<\/span><span style=\"color: #D4D4D4\"> $<\/span><span style=\"color: #569CD6\">THEN<\/span><\/span>\n<span class=\"line cbp-line-highlight\"><span style=\"color: #6A9955\">--%begin generate_ftl<\/span><\/span>\n<span class=\"line cbp-line-highlight\"><span style=\"color: #D4D4D4\">&lt;#assign object_type = template_args[<\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">]\/&gt;<\/span><\/span>\n<span class=\"line cbp-line-highlight\"><span style=\"color: #D4D4D4\">&lt;#assign object_name = template_args[<\/span><span style=\"color: #B5CEA8\">1<\/span><span style=\"color: #D4D4D4\">]\/&gt;<\/span><\/span>\n<span class=\"line cbp-line-highlight\"><span style=\"color: #569CD6\">BEGIN<\/span><\/span>\n<span class=\"line cbp-line-highlight\"><span style=\"color: #D4D4D4\">   sys.<\/span><span style=\"color: #DCDCAA\">dbms_output.<\/span><span style=\"color: #4EC9B0\">put_line<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #CE9178\">&#39;Hello ${object_type} ${object_name}!&#39;<\/span><span style=\"color: #D4D4D4\">);<\/span><\/span>\n<span class=\"line cbp-line-highlight\"><span style=\"color: #569CD6\">END<\/span><span style=\"color: #D4D4D4\">;<\/span><\/span>\n<span class=\"line cbp-line-highlight\"><span style=\"color: #D4D4D4\">${<\/span><span style=\"color: #CE9178\">&quot;\/&quot;<\/span><span style=\"color: #D4D4D4\">}<\/span><\/span>\n<span class=\"line cbp-line-highlight\"><span style=\"color: #6A9955\">--%end generate_ftl<\/span><\/span>\n<span class=\"line cbp-line-highlight\"><span style=\"color: #D4D4D4\">$<\/span><span style=\"color: #569CD6\">END<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">   <\/span><span style=\"color: #569CD6\">FUNCTION<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #DCDCAA\">generate<\/span><span style=\"color: #D4D4D4\">(in_object_type <\/span><span style=\"color: #569CD6\">IN<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">VARCHAR2<\/span><span style=\"color: #D4D4D4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">                     in_object_name <\/span><span style=\"color: #569CD6\">IN<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">VARCHAR2<\/span><span style=\"color: #D4D4D4\">) <\/span><span style=\"color: #C586C0\">RETURN<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">CLOB<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">IS<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">      <\/span><span style=\"color: #9CDCFE\">l_result<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">CLOB<\/span><span style=\"color: #D4D4D4\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">      <\/span><span style=\"color: #9CDCFE\">l_args<\/span><span style=\"color: #D4D4D4\"> varchar2_nt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">   <\/span><span style=\"color: #569CD6\">BEGIN<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">      <\/span><span style=\"color: #9CDCFE\">l_args<\/span><span style=\"color: #D4D4D4\"> := NEW varchar2_nt(in_object_type, in_object_name);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">      <\/span><span style=\"color: #9CDCFE\">l_result<\/span><span style=\"color: #D4D4D4\"> := ftldb_api.process_to_clob(in_templ_name =&gt; $PLSQL_UNIT || <\/span><span style=\"color: #CE9178\">&#39;%generate_ftl&#39;<\/span><span style=\"color: #D4D4D4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">                                            in_templ_args =&gt; <\/span><span style=\"color: #9CDCFE\">l_args<\/span><span style=\"color: #D4D4D4\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">      <\/span><span style=\"color: #C586C0\">RETURN<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">l_result<\/span><span style=\"color: #D4D4D4\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">   <\/span><span style=\"color: #569CD6\">END<\/span><span style=\"color: #D4D4D4\"> generate;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #569CD6\">END<\/span><span style=\"color: #D4D4D4\"> ftldb_hello_world;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">\/<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">The template is stored\u00a0within lines\u00a04 to 11. It&#8217;s easy to see that the target code is PL\/SQL, but the template itself contains various parts which do not comply with the PL\/SQL language. The $IF on line 3 ensures that the template is compiled only when the condition is met. Never, in this case. You may be surprised, but yes, this trick works.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, if I check this code with PL\/SQL Cop for SQL Developer 1.0.12 I get the following result:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2016\/04\/plsqlcop1.12.png\"><img wpfc-lazyload-disable=\"true\" loading=\"lazy\" decoding=\"async\" width=\"369\" height=\"181\" src=\"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2016\/04\/plsqlcop1.12.png\" alt=\"plsqlcop1.12\" class=\"wp-image-7022\" srcset=\"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2016\/04\/plsqlcop1.12.png 369w, https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2016\/04\/plsqlcop1.12-300x147.png 300w\" sizes=\"auto, (max-width:767px) 369px, 369px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Bad. This version of PL\/SQL Cop cannot parse this code successfully, since it expects valid PL\/SQL code within the conditional compilation blocks. While it\u00a0has some advantages to include conditional PL\/SQL code in code analysis, it is simply worthless if the code cannot be parsed at all.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Therefore I released today new versions of all PL\/SQL parser-based products supporting non-PL\/SQL code within conditional compilation blocks. And the result in PL\/SQL Cop for SQL Developer 1.0.13 is:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2016\/04\/plsqlcop1.13.png\"><img wpfc-lazyload-disable=\"true\" loading=\"lazy\" decoding=\"async\" width=\"738\" height=\"293\" src=\"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2016\/04\/plsqlcop1.13.png\" alt=\"plsqlcop1.13\" class=\"wp-image-7023\" srcset=\"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2016\/04\/plsqlcop1.13.png 738w, https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2016\/04\/plsqlcop1.13-300x119.png 300w\" sizes=\"auto, (max-width:767px) 480px, 738px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Good. You see, this version parses such code without problems. There are still some <a href=\"https:\/\/www.salvis.com\/blog\/faq\/what-are-the-limitations\/\">limitations<\/a>&nbsp;regarding the support of conditional compilation in DECLARE sections, but I&#8217;m glad&nbsp;that the parser is becoming more and more complete.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So it is time to update <a href=\"https:\/\/www.salvis.com\/blog\/tvdca-trivadis-plsql-sql-codeanalyzer\/\">PL\/SQL Analyzer<\/a>, <a href=\"https:\/\/www.salvis.com\/blog\/plsql-cop\/\">PL\/SQL Cop<\/a> and <a href=\"https:\/\/www.salvis.com\/blog\/plsql-cop-for-sql-developer\/\">PL\/SQL Cop for SQL Developer<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thanks <a href=\"https:\/\/www.oddgen.org\/\">oddgen<\/a> for driving this improvement.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Until August 2015 it never occurred to me that one could\u00a0use\u00a0non-PL\/SQL code within conditional compilation blocks. Back then we discussed various template engine options as the foundation for oddgen\u00a0&#8211; the\u00a0Oracle community&#8217;s dictionary-driven code generator. oddgen supports nowadays the&nbsp;in-database template engines FTLDB and tePLSQL.&nbsp;Both tools may access templates stored&nbsp;in PL\/SQL packages using a<span class=\"excerpt-hellip\"> [\u2026]<\/span><\/p>\n","protected":false},"author":1,"featured_media":9553,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[94,13,92,87],"class_list":["post-7008","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oracle","tag-oddgen","tag-plsql","tag-plsql-cop","tag-sql-developer"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>PL\/SQL Cop Meets oddgen - Philipp Salvisberg&#039;s Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.salvis.com\/blog\/2016\/04\/26\/plsql-cop-meets-oddgen\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PL\/SQL Cop Meets oddgen - Philipp Salvisberg&#039;s Blog\" \/>\n<meta property=\"og:description\" content=\"Until August 2015 it never occurred to me that one could\u00a0use\u00a0non-PL\/SQL code within conditional compilation blocks. Back then we discussed various template engine options as the foundation for oddgen\u00a0&#8211; the\u00a0Oracle community&#8217;s dictionary-driven code generator. oddgen supports nowadays the&nbsp;in-database template engines FTLDB and tePLSQL.&nbsp;Both tools may access templates stored&nbsp;in PL\/SQL packages using a [\u2026]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.salvis.com\/blog\/2016\/04\/26\/plsql-cop-meets-oddgen\/\" \/>\n<meta property=\"og:site_name\" content=\"Philipp Salvisberg&#039;s Blog\" \/>\n<meta property=\"article:published_time\" content=\"2016-04-26T20:50:42+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-07T21:42:41+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2016\/04\/oddgen_feature.png\" \/>\n\t<meta property=\"og:image:width\" content=\"681\" \/>\n\t<meta property=\"og:image:height\" content=\"512\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Philipp Salvisberg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@phsalvisberg\" \/>\n<meta name=\"twitter:site\" content=\"@phsalvisberg\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Philipp Salvisberg\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/2016\\\/04\\\/26\\\/plsql-cop-meets-oddgen\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/2016\\\/04\\\/26\\\/plsql-cop-meets-oddgen\\\/\"},\"author\":{\"name\":\"Philipp Salvisberg\",\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/#\\\/schema\\\/person\\\/34352245c48678b1a5a05d4bc1339515\"},\"headline\":\"PL\\\/SQL Cop Meets oddgen\",\"datePublished\":\"2016-04-26T20:50:42+00:00\",\"dateModified\":\"2023-11-07T21:42:41+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/2016\\\/04\\\/26\\\/plsql-cop-meets-oddgen\\\/\"},\"wordCount\":312,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/#\\\/schema\\\/person\\\/34352245c48678b1a5a05d4bc1339515\"},\"image\":{\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/2016\\\/04\\\/26\\\/plsql-cop-meets-oddgen\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/04\\\/oddgen_feature.png\",\"keywords\":[\"oddgen\",\"PL\\\/SQL\",\"PL\\\/SQL Cop\",\"SQL Developer\"],\"articleSection\":[\"Oracle\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.salvis.com\\\/blog\\\/2016\\\/04\\\/26\\\/plsql-cop-meets-oddgen\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/2016\\\/04\\\/26\\\/plsql-cop-meets-oddgen\\\/\",\"url\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/2016\\\/04\\\/26\\\/plsql-cop-meets-oddgen\\\/\",\"name\":\"PL\\\/SQL Cop Meets oddgen - Philipp Salvisberg&#039;s Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/2016\\\/04\\\/26\\\/plsql-cop-meets-oddgen\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/2016\\\/04\\\/26\\\/plsql-cop-meets-oddgen\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/04\\\/oddgen_feature.png\",\"datePublished\":\"2016-04-26T20:50:42+00:00\",\"dateModified\":\"2023-11-07T21:42:41+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/2016\\\/04\\\/26\\\/plsql-cop-meets-oddgen\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.salvis.com\\\/blog\\\/2016\\\/04\\\/26\\\/plsql-cop-meets-oddgen\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/2016\\\/04\\\/26\\\/plsql-cop-meets-oddgen\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/04\\\/oddgen_feature.png\",\"contentUrl\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/04\\\/oddgen_feature.png\",\"width\":681,\"height\":512},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/2016\\\/04\\\/26\\\/plsql-cop-meets-oddgen\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PL\\\/SQL Cop Meets oddgen\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/\",\"name\":\"Philipp Salvisberg&#039;s Blog\",\"description\":\"Database-centric development\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/#\\\/schema\\\/person\\\/34352245c48678b1a5a05d4bc1339515\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/#\\\/schema\\\/person\\\/34352245c48678b1a5a05d4bc1339515\",\"name\":\"Philipp Salvisberg\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/wp-content\\\/uploads\\\/2010\\\/11\\\/phs_trivadis4.jpg\",\"url\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/wp-content\\\/uploads\\\/2010\\\/11\\\/phs_trivadis4.jpg\",\"contentUrl\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/wp-content\\\/uploads\\\/2010\\\/11\\\/phs_trivadis4.jpg\",\"width\":400,\"height\":400,\"caption\":\"Philipp Salvisberg\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/wp-content\\\/uploads\\\/2010\\\/11\\\/phs_trivadis4.jpg\"},\"sameAs\":[\"http:\\\/\\\/www.salvis.com\\\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PL\/SQL Cop Meets oddgen - Philipp Salvisberg&#039;s Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.salvis.com\/blog\/2016\/04\/26\/plsql-cop-meets-oddgen\/","og_locale":"en_US","og_type":"article","og_title":"PL\/SQL Cop Meets oddgen - Philipp Salvisberg&#039;s Blog","og_description":"Until August 2015 it never occurred to me that one could\u00a0use\u00a0non-PL\/SQL code within conditional compilation blocks. Back then we discussed various template engine options as the foundation for oddgen\u00a0&#8211; the\u00a0Oracle community&#8217;s dictionary-driven code generator. oddgen supports nowadays the&nbsp;in-database template engines FTLDB and tePLSQL.&nbsp;Both tools may access templates stored&nbsp;in PL\/SQL packages using a [\u2026]","og_url":"https:\/\/www.salvis.com\/blog\/2016\/04\/26\/plsql-cop-meets-oddgen\/","og_site_name":"Philipp Salvisberg&#039;s Blog","article_published_time":"2016-04-26T20:50:42+00:00","article_modified_time":"2023-11-07T21:42:41+00:00","og_image":[{"width":681,"height":512,"url":"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2016\/04\/oddgen_feature.png","type":"image\/png"}],"author":"Philipp Salvisberg","twitter_card":"summary_large_image","twitter_creator":"@phsalvisberg","twitter_site":"@phsalvisberg","twitter_misc":{"Written by":"Philipp Salvisberg","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.salvis.com\/blog\/2016\/04\/26\/plsql-cop-meets-oddgen\/#article","isPartOf":{"@id":"https:\/\/www.salvis.com\/blog\/2016\/04\/26\/plsql-cop-meets-oddgen\/"},"author":{"name":"Philipp Salvisberg","@id":"https:\/\/www.salvis.com\/blog\/#\/schema\/person\/34352245c48678b1a5a05d4bc1339515"},"headline":"PL\/SQL Cop Meets oddgen","datePublished":"2016-04-26T20:50:42+00:00","dateModified":"2023-11-07T21:42:41+00:00","mainEntityOfPage":{"@id":"https:\/\/www.salvis.com\/blog\/2016\/04\/26\/plsql-cop-meets-oddgen\/"},"wordCount":312,"commentCount":0,"publisher":{"@id":"https:\/\/www.salvis.com\/blog\/#\/schema\/person\/34352245c48678b1a5a05d4bc1339515"},"image":{"@id":"https:\/\/www.salvis.com\/blog\/2016\/04\/26\/plsql-cop-meets-oddgen\/#primaryimage"},"thumbnailUrl":"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2016\/04\/oddgen_feature.png","keywords":["oddgen","PL\/SQL","PL\/SQL Cop","SQL Developer"],"articleSection":["Oracle"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.salvis.com\/blog\/2016\/04\/26\/plsql-cop-meets-oddgen\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.salvis.com\/blog\/2016\/04\/26\/plsql-cop-meets-oddgen\/","url":"https:\/\/www.salvis.com\/blog\/2016\/04\/26\/plsql-cop-meets-oddgen\/","name":"PL\/SQL Cop Meets oddgen - Philipp Salvisberg&#039;s Blog","isPartOf":{"@id":"https:\/\/www.salvis.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.salvis.com\/blog\/2016\/04\/26\/plsql-cop-meets-oddgen\/#primaryimage"},"image":{"@id":"https:\/\/www.salvis.com\/blog\/2016\/04\/26\/plsql-cop-meets-oddgen\/#primaryimage"},"thumbnailUrl":"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2016\/04\/oddgen_feature.png","datePublished":"2016-04-26T20:50:42+00:00","dateModified":"2023-11-07T21:42:41+00:00","breadcrumb":{"@id":"https:\/\/www.salvis.com\/blog\/2016\/04\/26\/plsql-cop-meets-oddgen\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.salvis.com\/blog\/2016\/04\/26\/plsql-cop-meets-oddgen\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.salvis.com\/blog\/2016\/04\/26\/plsql-cop-meets-oddgen\/#primaryimage","url":"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2016\/04\/oddgen_feature.png","contentUrl":"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2016\/04\/oddgen_feature.png","width":681,"height":512},{"@type":"BreadcrumbList","@id":"https:\/\/www.salvis.com\/blog\/2016\/04\/26\/plsql-cop-meets-oddgen\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.salvis.com\/blog\/"},{"@type":"ListItem","position":2,"name":"PL\/SQL Cop Meets oddgen"}]},{"@type":"WebSite","@id":"https:\/\/www.salvis.com\/blog\/#website","url":"https:\/\/www.salvis.com\/blog\/","name":"Philipp Salvisberg&#039;s Blog","description":"Database-centric development","publisher":{"@id":"https:\/\/www.salvis.com\/blog\/#\/schema\/person\/34352245c48678b1a5a05d4bc1339515"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.salvis.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.salvis.com\/blog\/#\/schema\/person\/34352245c48678b1a5a05d4bc1339515","name":"Philipp Salvisberg","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2010\/11\/phs_trivadis4.jpg","url":"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2010\/11\/phs_trivadis4.jpg","contentUrl":"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2010\/11\/phs_trivadis4.jpg","width":400,"height":400,"caption":"Philipp Salvisberg"},"logo":{"@id":"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2010\/11\/phs_trivadis4.jpg"},"sameAs":["http:\/\/www.salvis.com\/"]}]}},"_links":{"self":[{"href":"https:\/\/www.salvis.com\/blog\/wp-json\/wp\/v2\/posts\/7008","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.salvis.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.salvis.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.salvis.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.salvis.com\/blog\/wp-json\/wp\/v2\/comments?post=7008"}],"version-history":[{"count":18,"href":"https:\/\/www.salvis.com\/blog\/wp-json\/wp\/v2\/posts\/7008\/revisions"}],"predecessor-version":[{"id":12594,"href":"https:\/\/www.salvis.com\/blog\/wp-json\/wp\/v2\/posts\/7008\/revisions\/12594"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.salvis.com\/blog\/wp-json\/wp\/v2\/media\/9553"}],"wp:attachment":[{"href":"https:\/\/www.salvis.com\/blog\/wp-json\/wp\/v2\/media?parent=7008"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.salvis.com\/blog\/wp-json\/wp\/v2\/categories?post=7008"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.salvis.com\/blog\/wp-json\/wp\/v2\/tags?post=7008"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}