summaryrefslogtreecommitdiffstats
path: root/docs/sqlglot/dialects/teradata.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/sqlglot/dialects/teradata.html')
-rw-r--r--docs/sqlglot/dialects/teradata.html250
1 files changed, 128 insertions, 122 deletions
diff --git a/docs/sqlglot/dialects/teradata.html b/docs/sqlglot/dialects/teradata.html
index 91b5d18..d3c3041 100644
--- a/docs/sqlglot/dialects/teradata.html
+++ b/docs/sqlglot/dialects/teradata.html
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
- <meta name="generator" content="pdoc 13.0.0"/>
+ <meta name="generator" content="pdoc 13.0.1"/>
<title>sqlglot.dialects.teradata API documentation</title>
<style>/*! * Bootstrap Reboot v5.0.0 (https://getbootstrap.com/) * Copyright 2011-2021 The Bootstrap Authors * Copyright 2011-2021 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) */*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}hr{margin:1rem 0;color:inherit;background-color:currentColor;border:0;opacity:.25}hr:not([size]){height:1px}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){h1{font-size:2.5rem}}h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){h2{font-size:2rem}}h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){h3{font-size:1.75rem}}h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){h4{font-size:1.5rem}}h5{font-size:1.25rem}h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[data-bs-original-title],abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-left:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:.875em}mark{padding:.2em;background-color:#fcf8e3}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#0d6efd;text-decoration:underline}a:hover{color:#0a58ca}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em;direction:ltr;unicode-bidi:bidi-override}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:#d63384;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:.875em;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:1em;font-weight:700}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:#6c757d;text-align:left}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}select:disabled{opacity:1}[list]::-webkit-calendar-picker-indicator{display:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:left;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + .3vw);line-height:inherit}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:left}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:textfield}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::file-selector-button{font:inherit}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important}</style>
@@ -28,8 +28,8 @@
- <h2>API Documentation</h2>
- <ul class="memberlist">
+ <h2>API Documentation</h2>
+ <ul class="memberlist">
<li>
<a class="class" href="#Teradata">Teradata</a>
<ul class="memberlist">
@@ -95,7 +95,7 @@
<div class="pdoc-code codehilite"><pre><span></span><span id="L-1"><a href="#L-1"><span class="linenos"> 1</span></a><span class="kn">from</span> <span class="nn">__future__</span> <span class="kn">import</span> <span class="n">annotations</span>
</span><span id="L-2"><a href="#L-2"><span class="linenos"> 2</span></a>
</span><span id="L-3"><a href="#L-3"><span class="linenos"> 3</span></a><span class="kn">from</span> <span class="nn">sqlglot</span> <span class="kn">import</span> <span class="n">exp</span><span class="p">,</span> <span class="n">generator</span><span class="p">,</span> <span class="n">parser</span><span class="p">,</span> <span class="n">tokens</span>
-</span><span id="L-4"><a href="#L-4"><span class="linenos"> 4</span></a><span class="kn">from</span> <span class="nn">sqlglot.dialects.dialect</span> <span class="kn">import</span> <span class="n">Dialect</span><span class="p">,</span> <span class="n">min_or_least</span>
+</span><span id="L-4"><a href="#L-4"><span class="linenos"> 4</span></a><span class="kn">from</span> <span class="nn">sqlglot.dialects.dialect</span> <span class="kn">import</span> <span class="n">Dialect</span><span class="p">,</span> <span class="n">max_or_greatest</span><span class="p">,</span> <span class="n">min_or_least</span>
</span><span id="L-5"><a href="#L-5"><span class="linenos"> 5</span></a><span class="kn">from</span> <span class="nn">sqlglot.tokens</span> <span class="kn">import</span> <span class="n">TokenType</span>
</span><span id="L-6"><a href="#L-6"><span class="linenos"> 6</span></a>
</span><span id="L-7"><a href="#L-7"><span class="linenos"> 7</span></a>
@@ -222,38 +222,39 @@
</span><span id="L-128"><a href="#L-128"><span class="linenos">128</span></a>
</span><span id="L-129"><a href="#L-129"><span class="linenos">129</span></a> <span class="n">TRANSFORMS</span> <span class="o">=</span> <span class="p">{</span>
</span><span id="L-130"><a href="#L-130"><span class="linenos">130</span></a> <span class="o">**</span><span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="o">.</span><span class="n">TRANSFORMS</span><span class="p">,</span>
-</span><span id="L-131"><a href="#L-131"><span class="linenos">131</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Min</span><span class="p">:</span> <span class="n">min_or_least</span><span class="p">,</span>
-</span><span id="L-132"><a href="#L-132"><span class="linenos">132</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ToChar</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">function_fallback_sql</span><span class="p">(</span><span class="n">e</span><span class="p">),</span>
-</span><span id="L-133"><a href="#L-133"><span class="linenos">133</span></a> <span class="p">}</span>
-</span><span id="L-134"><a href="#L-134"><span class="linenos">134</span></a>
-</span><span id="L-135"><a href="#L-135"><span class="linenos">135</span></a> <span class="k">def</span> <span class="nf">partitionedbyproperty_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">PartitionedByProperty</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="L-136"><a href="#L-136"><span class="linenos">136</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;PARTITION BY </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">&quot;</span>
-</span><span id="L-137"><a href="#L-137"><span class="linenos">137</span></a>
-</span><span id="L-138"><a href="#L-138"><span class="linenos">138</span></a> <span class="c1"># FROM before SET in Teradata UPDATE syntax</span>
-</span><span id="L-139"><a href="#L-139"><span class="linenos">139</span></a> <span class="c1"># https://docs.teradata.com/r/Enterprise_IntelliFlex_VMware/Teradata-VantageTM-SQL-Data-Manipulation-Language-17.20/Statement-Syntax/UPDATE/UPDATE-Syntax-Basic-Form-FROM-Clause</span>
-</span><span id="L-140"><a href="#L-140"><span class="linenos">140</span></a> <span class="k">def</span> <span class="nf">update_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Update</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="L-141"><a href="#L-141"><span class="linenos">141</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
-</span><span id="L-142"><a href="#L-142"><span class="linenos">142</span></a> <span class="n">from_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;from&quot;</span><span class="p">)</span>
-</span><span id="L-143"><a href="#L-143"><span class="linenos">143</span></a> <span class="n">set_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
-</span><span id="L-144"><a href="#L-144"><span class="linenos">144</span></a> <span class="n">where_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;where&quot;</span><span class="p">)</span>
-</span><span id="L-145"><a href="#L-145"><span class="linenos">145</span></a> <span class="n">sql</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;UPDATE </span><span class="si">{</span><span class="n">this</span><span class="si">}{</span><span class="n">from_sql</span><span class="si">}</span><span class="s2"> SET </span><span class="si">{</span><span class="n">set_sql</span><span class="si">}{</span><span class="n">where_sql</span><span class="si">}</span><span class="s2">&quot;</span>
-</span><span id="L-146"><a href="#L-146"><span class="linenos">146</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">prepend_ctes</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">sql</span><span class="p">)</span>
-</span><span id="L-147"><a href="#L-147"><span class="linenos">147</span></a>
-</span><span id="L-148"><a href="#L-148"><span class="linenos">148</span></a> <span class="k">def</span> <span class="nf">mod_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Mod</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="L-149"><a href="#L-149"><span class="linenos">149</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">binary</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;MOD&quot;</span><span class="p">)</span>
-</span><span id="L-150"><a href="#L-150"><span class="linenos">150</span></a>
-</span><span id="L-151"><a href="#L-151"><span class="linenos">151</span></a> <span class="k">def</span> <span class="nf">datatype_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="L-152"><a href="#L-152"><span class="linenos">152</span></a> <span class="n">type_sql</span> <span class="o">=</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">datatype_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
-</span><span id="L-153"><a href="#L-153"><span class="linenos">153</span></a> <span class="n">prefix_sql</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;prefix&quot;</span><span class="p">)</span>
-</span><span id="L-154"><a href="#L-154"><span class="linenos">154</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;SYSUDTLIB.</span><span class="si">{</span><span class="n">type_sql</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="n">prefix_sql</span> <span class="k">else</span> <span class="n">type_sql</span>
-</span><span id="L-155"><a href="#L-155"><span class="linenos">155</span></a>
-</span><span id="L-156"><a href="#L-156"><span class="linenos">156</span></a> <span class="k">def</span> <span class="nf">rangen_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RangeN</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="L-157"><a href="#L-157"><span class="linenos">157</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
-</span><span id="L-158"><a href="#L-158"><span class="linenos">158</span></a> <span class="n">expressions_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
-</span><span id="L-159"><a href="#L-159"><span class="linenos">159</span></a> <span class="n">each_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;each&quot;</span><span class="p">)</span>
-</span><span id="L-160"><a href="#L-160"><span class="linenos">160</span></a> <span class="n">each_sql</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot; EACH </span><span class="si">{</span><span class="n">each_sql</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="n">each_sql</span> <span class="k">else</span> <span class="s2">&quot;&quot;</span>
-</span><span id="L-161"><a href="#L-161"><span class="linenos">161</span></a>
-</span><span id="L-162"><a href="#L-162"><span class="linenos">162</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;RANGE_N(</span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="s2"> BETWEEN </span><span class="si">{</span><span class="n">expressions_sql</span><span class="si">}{</span><span class="n">each_sql</span><span class="si">}</span><span class="s2">)&quot;</span>
+</span><span id="L-131"><a href="#L-131"><span class="linenos">131</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Max</span><span class="p">:</span> <span class="n">max_or_greatest</span><span class="p">,</span>
+</span><span id="L-132"><a href="#L-132"><span class="linenos">132</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Min</span><span class="p">:</span> <span class="n">min_or_least</span><span class="p">,</span>
+</span><span id="L-133"><a href="#L-133"><span class="linenos">133</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ToChar</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">function_fallback_sql</span><span class="p">(</span><span class="n">e</span><span class="p">),</span>
+</span><span id="L-134"><a href="#L-134"><span class="linenos">134</span></a> <span class="p">}</span>
+</span><span id="L-135"><a href="#L-135"><span class="linenos">135</span></a>
+</span><span id="L-136"><a href="#L-136"><span class="linenos">136</span></a> <span class="k">def</span> <span class="nf">partitionedbyproperty_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">PartitionedByProperty</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="L-137"><a href="#L-137"><span class="linenos">137</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;PARTITION BY </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">&quot;</span>
+</span><span id="L-138"><a href="#L-138"><span class="linenos">138</span></a>
+</span><span id="L-139"><a href="#L-139"><span class="linenos">139</span></a> <span class="c1"># FROM before SET in Teradata UPDATE syntax</span>
+</span><span id="L-140"><a href="#L-140"><span class="linenos">140</span></a> <span class="c1"># https://docs.teradata.com/r/Enterprise_IntelliFlex_VMware/Teradata-VantageTM-SQL-Data-Manipulation-Language-17.20/Statement-Syntax/UPDATE/UPDATE-Syntax-Basic-Form-FROM-Clause</span>
+</span><span id="L-141"><a href="#L-141"><span class="linenos">141</span></a> <span class="k">def</span> <span class="nf">update_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Update</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="L-142"><a href="#L-142"><span class="linenos">142</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
+</span><span id="L-143"><a href="#L-143"><span class="linenos">143</span></a> <span class="n">from_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;from&quot;</span><span class="p">)</span>
+</span><span id="L-144"><a href="#L-144"><span class="linenos">144</span></a> <span class="n">set_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
+</span><span id="L-145"><a href="#L-145"><span class="linenos">145</span></a> <span class="n">where_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;where&quot;</span><span class="p">)</span>
+</span><span id="L-146"><a href="#L-146"><span class="linenos">146</span></a> <span class="n">sql</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;UPDATE </span><span class="si">{</span><span class="n">this</span><span class="si">}{</span><span class="n">from_sql</span><span class="si">}</span><span class="s2"> SET </span><span class="si">{</span><span class="n">set_sql</span><span class="si">}{</span><span class="n">where_sql</span><span class="si">}</span><span class="s2">&quot;</span>
+</span><span id="L-147"><a href="#L-147"><span class="linenos">147</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">prepend_ctes</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">sql</span><span class="p">)</span>
+</span><span id="L-148"><a href="#L-148"><span class="linenos">148</span></a>
+</span><span id="L-149"><a href="#L-149"><span class="linenos">149</span></a> <span class="k">def</span> <span class="nf">mod_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Mod</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="L-150"><a href="#L-150"><span class="linenos">150</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">binary</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;MOD&quot;</span><span class="p">)</span>
+</span><span id="L-151"><a href="#L-151"><span class="linenos">151</span></a>
+</span><span id="L-152"><a href="#L-152"><span class="linenos">152</span></a> <span class="k">def</span> <span class="nf">datatype_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="L-153"><a href="#L-153"><span class="linenos">153</span></a> <span class="n">type_sql</span> <span class="o">=</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">datatype_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
+</span><span id="L-154"><a href="#L-154"><span class="linenos">154</span></a> <span class="n">prefix_sql</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;prefix&quot;</span><span class="p">)</span>
+</span><span id="L-155"><a href="#L-155"><span class="linenos">155</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;SYSUDTLIB.</span><span class="si">{</span><span class="n">type_sql</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="n">prefix_sql</span> <span class="k">else</span> <span class="n">type_sql</span>
+</span><span id="L-156"><a href="#L-156"><span class="linenos">156</span></a>
+</span><span id="L-157"><a href="#L-157"><span class="linenos">157</span></a> <span class="k">def</span> <span class="nf">rangen_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RangeN</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="L-158"><a href="#L-158"><span class="linenos">158</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
+</span><span id="L-159"><a href="#L-159"><span class="linenos">159</span></a> <span class="n">expressions_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
+</span><span id="L-160"><a href="#L-160"><span class="linenos">160</span></a> <span class="n">each_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;each&quot;</span><span class="p">)</span>
+</span><span id="L-161"><a href="#L-161"><span class="linenos">161</span></a> <span class="n">each_sql</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot; EACH </span><span class="si">{</span><span class="n">each_sql</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="n">each_sql</span> <span class="k">else</span> <span class="s2">&quot;&quot;</span>
+</span><span id="L-162"><a href="#L-162"><span class="linenos">162</span></a>
+</span><span id="L-163"><a href="#L-163"><span class="linenos">163</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;RANGE_N(</span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="s2"> BETWEEN </span><span class="si">{</span><span class="n">expressions_sql</span><span class="si">}{</span><span class="n">each_sql</span><span class="si">}</span><span class="s2">)&quot;</span>
</span></pre></div>
@@ -392,38 +393,39 @@
</span><span id="Teradata-129"><a href="#Teradata-129"><span class="linenos">129</span></a>
</span><span id="Teradata-130"><a href="#Teradata-130"><span class="linenos">130</span></a> <span class="n">TRANSFORMS</span> <span class="o">=</span> <span class="p">{</span>
</span><span id="Teradata-131"><a href="#Teradata-131"><span class="linenos">131</span></a> <span class="o">**</span><span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="o">.</span><span class="n">TRANSFORMS</span><span class="p">,</span>
-</span><span id="Teradata-132"><a href="#Teradata-132"><span class="linenos">132</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Min</span><span class="p">:</span> <span class="n">min_or_least</span><span class="p">,</span>
-</span><span id="Teradata-133"><a href="#Teradata-133"><span class="linenos">133</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ToChar</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">function_fallback_sql</span><span class="p">(</span><span class="n">e</span><span class="p">),</span>
-</span><span id="Teradata-134"><a href="#Teradata-134"><span class="linenos">134</span></a> <span class="p">}</span>
-</span><span id="Teradata-135"><a href="#Teradata-135"><span class="linenos">135</span></a>
-</span><span id="Teradata-136"><a href="#Teradata-136"><span class="linenos">136</span></a> <span class="k">def</span> <span class="nf">partitionedbyproperty_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">PartitionedByProperty</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Teradata-137"><a href="#Teradata-137"><span class="linenos">137</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;PARTITION BY </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">&quot;</span>
-</span><span id="Teradata-138"><a href="#Teradata-138"><span class="linenos">138</span></a>
-</span><span id="Teradata-139"><a href="#Teradata-139"><span class="linenos">139</span></a> <span class="c1"># FROM before SET in Teradata UPDATE syntax</span>
-</span><span id="Teradata-140"><a href="#Teradata-140"><span class="linenos">140</span></a> <span class="c1"># https://docs.teradata.com/r/Enterprise_IntelliFlex_VMware/Teradata-VantageTM-SQL-Data-Manipulation-Language-17.20/Statement-Syntax/UPDATE/UPDATE-Syntax-Basic-Form-FROM-Clause</span>
-</span><span id="Teradata-141"><a href="#Teradata-141"><span class="linenos">141</span></a> <span class="k">def</span> <span class="nf">update_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Update</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Teradata-142"><a href="#Teradata-142"><span class="linenos">142</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
-</span><span id="Teradata-143"><a href="#Teradata-143"><span class="linenos">143</span></a> <span class="n">from_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;from&quot;</span><span class="p">)</span>
-</span><span id="Teradata-144"><a href="#Teradata-144"><span class="linenos">144</span></a> <span class="n">set_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
-</span><span id="Teradata-145"><a href="#Teradata-145"><span class="linenos">145</span></a> <span class="n">where_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;where&quot;</span><span class="p">)</span>
-</span><span id="Teradata-146"><a href="#Teradata-146"><span class="linenos">146</span></a> <span class="n">sql</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;UPDATE </span><span class="si">{</span><span class="n">this</span><span class="si">}{</span><span class="n">from_sql</span><span class="si">}</span><span class="s2"> SET </span><span class="si">{</span><span class="n">set_sql</span><span class="si">}{</span><span class="n">where_sql</span><span class="si">}</span><span class="s2">&quot;</span>
-</span><span id="Teradata-147"><a href="#Teradata-147"><span class="linenos">147</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">prepend_ctes</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">sql</span><span class="p">)</span>
-</span><span id="Teradata-148"><a href="#Teradata-148"><span class="linenos">148</span></a>
-</span><span id="Teradata-149"><a href="#Teradata-149"><span class="linenos">149</span></a> <span class="k">def</span> <span class="nf">mod_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Mod</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Teradata-150"><a href="#Teradata-150"><span class="linenos">150</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">binary</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;MOD&quot;</span><span class="p">)</span>
-</span><span id="Teradata-151"><a href="#Teradata-151"><span class="linenos">151</span></a>
-</span><span id="Teradata-152"><a href="#Teradata-152"><span class="linenos">152</span></a> <span class="k">def</span> <span class="nf">datatype_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Teradata-153"><a href="#Teradata-153"><span class="linenos">153</span></a> <span class="n">type_sql</span> <span class="o">=</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">datatype_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
-</span><span id="Teradata-154"><a href="#Teradata-154"><span class="linenos">154</span></a> <span class="n">prefix_sql</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;prefix&quot;</span><span class="p">)</span>
-</span><span id="Teradata-155"><a href="#Teradata-155"><span class="linenos">155</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;SYSUDTLIB.</span><span class="si">{</span><span class="n">type_sql</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="n">prefix_sql</span> <span class="k">else</span> <span class="n">type_sql</span>
-</span><span id="Teradata-156"><a href="#Teradata-156"><span class="linenos">156</span></a>
-</span><span id="Teradata-157"><a href="#Teradata-157"><span class="linenos">157</span></a> <span class="k">def</span> <span class="nf">rangen_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RangeN</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Teradata-158"><a href="#Teradata-158"><span class="linenos">158</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
-</span><span id="Teradata-159"><a href="#Teradata-159"><span class="linenos">159</span></a> <span class="n">expressions_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
-</span><span id="Teradata-160"><a href="#Teradata-160"><span class="linenos">160</span></a> <span class="n">each_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;each&quot;</span><span class="p">)</span>
-</span><span id="Teradata-161"><a href="#Teradata-161"><span class="linenos">161</span></a> <span class="n">each_sql</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot; EACH </span><span class="si">{</span><span class="n">each_sql</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="n">each_sql</span> <span class="k">else</span> <span class="s2">&quot;&quot;</span>
-</span><span id="Teradata-162"><a href="#Teradata-162"><span class="linenos">162</span></a>
-</span><span id="Teradata-163"><a href="#Teradata-163"><span class="linenos">163</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;RANGE_N(</span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="s2"> BETWEEN </span><span class="si">{</span><span class="n">expressions_sql</span><span class="si">}{</span><span class="n">each_sql</span><span class="si">}</span><span class="s2">)&quot;</span>
+</span><span id="Teradata-132"><a href="#Teradata-132"><span class="linenos">132</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Max</span><span class="p">:</span> <span class="n">max_or_greatest</span><span class="p">,</span>
+</span><span id="Teradata-133"><a href="#Teradata-133"><span class="linenos">133</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Min</span><span class="p">:</span> <span class="n">min_or_least</span><span class="p">,</span>
+</span><span id="Teradata-134"><a href="#Teradata-134"><span class="linenos">134</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ToChar</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">function_fallback_sql</span><span class="p">(</span><span class="n">e</span><span class="p">),</span>
+</span><span id="Teradata-135"><a href="#Teradata-135"><span class="linenos">135</span></a> <span class="p">}</span>
+</span><span id="Teradata-136"><a href="#Teradata-136"><span class="linenos">136</span></a>
+</span><span id="Teradata-137"><a href="#Teradata-137"><span class="linenos">137</span></a> <span class="k">def</span> <span class="nf">partitionedbyproperty_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">PartitionedByProperty</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Teradata-138"><a href="#Teradata-138"><span class="linenos">138</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;PARTITION BY </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">&quot;</span>
+</span><span id="Teradata-139"><a href="#Teradata-139"><span class="linenos">139</span></a>
+</span><span id="Teradata-140"><a href="#Teradata-140"><span class="linenos">140</span></a> <span class="c1"># FROM before SET in Teradata UPDATE syntax</span>
+</span><span id="Teradata-141"><a href="#Teradata-141"><span class="linenos">141</span></a> <span class="c1"># https://docs.teradata.com/r/Enterprise_IntelliFlex_VMware/Teradata-VantageTM-SQL-Data-Manipulation-Language-17.20/Statement-Syntax/UPDATE/UPDATE-Syntax-Basic-Form-FROM-Clause</span>
+</span><span id="Teradata-142"><a href="#Teradata-142"><span class="linenos">142</span></a> <span class="k">def</span> <span class="nf">update_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Update</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Teradata-143"><a href="#Teradata-143"><span class="linenos">143</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
+</span><span id="Teradata-144"><a href="#Teradata-144"><span class="linenos">144</span></a> <span class="n">from_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;from&quot;</span><span class="p">)</span>
+</span><span id="Teradata-145"><a href="#Teradata-145"><span class="linenos">145</span></a> <span class="n">set_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
+</span><span id="Teradata-146"><a href="#Teradata-146"><span class="linenos">146</span></a> <span class="n">where_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;where&quot;</span><span class="p">)</span>
+</span><span id="Teradata-147"><a href="#Teradata-147"><span class="linenos">147</span></a> <span class="n">sql</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;UPDATE </span><span class="si">{</span><span class="n">this</span><span class="si">}{</span><span class="n">from_sql</span><span class="si">}</span><span class="s2"> SET </span><span class="si">{</span><span class="n">set_sql</span><span class="si">}{</span><span class="n">where_sql</span><span class="si">}</span><span class="s2">&quot;</span>
+</span><span id="Teradata-148"><a href="#Teradata-148"><span class="linenos">148</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">prepend_ctes</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">sql</span><span class="p">)</span>
+</span><span id="Teradata-149"><a href="#Teradata-149"><span class="linenos">149</span></a>
+</span><span id="Teradata-150"><a href="#Teradata-150"><span class="linenos">150</span></a> <span class="k">def</span> <span class="nf">mod_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Mod</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Teradata-151"><a href="#Teradata-151"><span class="linenos">151</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">binary</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;MOD&quot;</span><span class="p">)</span>
+</span><span id="Teradata-152"><a href="#Teradata-152"><span class="linenos">152</span></a>
+</span><span id="Teradata-153"><a href="#Teradata-153"><span class="linenos">153</span></a> <span class="k">def</span> <span class="nf">datatype_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Teradata-154"><a href="#Teradata-154"><span class="linenos">154</span></a> <span class="n">type_sql</span> <span class="o">=</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">datatype_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
+</span><span id="Teradata-155"><a href="#Teradata-155"><span class="linenos">155</span></a> <span class="n">prefix_sql</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;prefix&quot;</span><span class="p">)</span>
+</span><span id="Teradata-156"><a href="#Teradata-156"><span class="linenos">156</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;SYSUDTLIB.</span><span class="si">{</span><span class="n">type_sql</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="n">prefix_sql</span> <span class="k">else</span> <span class="n">type_sql</span>
+</span><span id="Teradata-157"><a href="#Teradata-157"><span class="linenos">157</span></a>
+</span><span id="Teradata-158"><a href="#Teradata-158"><span class="linenos">158</span></a> <span class="k">def</span> <span class="nf">rangen_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RangeN</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Teradata-159"><a href="#Teradata-159"><span class="linenos">159</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
+</span><span id="Teradata-160"><a href="#Teradata-160"><span class="linenos">160</span></a> <span class="n">expressions_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
+</span><span id="Teradata-161"><a href="#Teradata-161"><span class="linenos">161</span></a> <span class="n">each_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;each&quot;</span><span class="p">)</span>
+</span><span id="Teradata-162"><a href="#Teradata-162"><span class="linenos">162</span></a> <span class="n">each_sql</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot; EACH </span><span class="si">{</span><span class="n">each_sql</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="n">each_sql</span> <span class="k">else</span> <span class="s2">&quot;&quot;</span>
+</span><span id="Teradata-163"><a href="#Teradata-163"><span class="linenos">163</span></a>
+</span><span id="Teradata-164"><a href="#Teradata-164"><span class="linenos">164</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;RANGE_N(</span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="s2"> BETWEEN </span><span class="si">{</span><span class="n">expressions_sql</span><span class="si">}{</span><span class="n">each_sql</span><span class="si">}</span><span class="s2">)&quot;</span>
</span></pre></div>
@@ -661,38 +663,39 @@ Default: "nulls_are_small"</li>
</span><span id="Teradata.Generator-129"><a href="#Teradata.Generator-129"><span class="linenos">129</span></a>
</span><span id="Teradata.Generator-130"><a href="#Teradata.Generator-130"><span class="linenos">130</span></a> <span class="n">TRANSFORMS</span> <span class="o">=</span> <span class="p">{</span>
</span><span id="Teradata.Generator-131"><a href="#Teradata.Generator-131"><span class="linenos">131</span></a> <span class="o">**</span><span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="o">.</span><span class="n">TRANSFORMS</span><span class="p">,</span>
-</span><span id="Teradata.Generator-132"><a href="#Teradata.Generator-132"><span class="linenos">132</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Min</span><span class="p">:</span> <span class="n">min_or_least</span><span class="p">,</span>
-</span><span id="Teradata.Generator-133"><a href="#Teradata.Generator-133"><span class="linenos">133</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ToChar</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">function_fallback_sql</span><span class="p">(</span><span class="n">e</span><span class="p">),</span>
-</span><span id="Teradata.Generator-134"><a href="#Teradata.Generator-134"><span class="linenos">134</span></a> <span class="p">}</span>
-</span><span id="Teradata.Generator-135"><a href="#Teradata.Generator-135"><span class="linenos">135</span></a>
-</span><span id="Teradata.Generator-136"><a href="#Teradata.Generator-136"><span class="linenos">136</span></a> <span class="k">def</span> <span class="nf">partitionedbyproperty_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">PartitionedByProperty</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Teradata.Generator-137"><a href="#Teradata.Generator-137"><span class="linenos">137</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;PARTITION BY </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">&quot;</span>
-</span><span id="Teradata.Generator-138"><a href="#Teradata.Generator-138"><span class="linenos">138</span></a>
-</span><span id="Teradata.Generator-139"><a href="#Teradata.Generator-139"><span class="linenos">139</span></a> <span class="c1"># FROM before SET in Teradata UPDATE syntax</span>
-</span><span id="Teradata.Generator-140"><a href="#Teradata.Generator-140"><span class="linenos">140</span></a> <span class="c1"># https://docs.teradata.com/r/Enterprise_IntelliFlex_VMware/Teradata-VantageTM-SQL-Data-Manipulation-Language-17.20/Statement-Syntax/UPDATE/UPDATE-Syntax-Basic-Form-FROM-Clause</span>
-</span><span id="Teradata.Generator-141"><a href="#Teradata.Generator-141"><span class="linenos">141</span></a> <span class="k">def</span> <span class="nf">update_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Update</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Teradata.Generator-142"><a href="#Teradata.Generator-142"><span class="linenos">142</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
-</span><span id="Teradata.Generator-143"><a href="#Teradata.Generator-143"><span class="linenos">143</span></a> <span class="n">from_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;from&quot;</span><span class="p">)</span>
-</span><span id="Teradata.Generator-144"><a href="#Teradata.Generator-144"><span class="linenos">144</span></a> <span class="n">set_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
-</span><span id="Teradata.Generator-145"><a href="#Teradata.Generator-145"><span class="linenos">145</span></a> <span class="n">where_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;where&quot;</span><span class="p">)</span>
-</span><span id="Teradata.Generator-146"><a href="#Teradata.Generator-146"><span class="linenos">146</span></a> <span class="n">sql</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;UPDATE </span><span class="si">{</span><span class="n">this</span><span class="si">}{</span><span class="n">from_sql</span><span class="si">}</span><span class="s2"> SET </span><span class="si">{</span><span class="n">set_sql</span><span class="si">}{</span><span class="n">where_sql</span><span class="si">}</span><span class="s2">&quot;</span>
-</span><span id="Teradata.Generator-147"><a href="#Teradata.Generator-147"><span class="linenos">147</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">prepend_ctes</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">sql</span><span class="p">)</span>
-</span><span id="Teradata.Generator-148"><a href="#Teradata.Generator-148"><span class="linenos">148</span></a>
-</span><span id="Teradata.Generator-149"><a href="#Teradata.Generator-149"><span class="linenos">149</span></a> <span class="k">def</span> <span class="nf">mod_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Mod</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Teradata.Generator-150"><a href="#Teradata.Generator-150"><span class="linenos">150</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">binary</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;MOD&quot;</span><span class="p">)</span>
-</span><span id="Teradata.Generator-151"><a href="#Teradata.Generator-151"><span class="linenos">151</span></a>
-</span><span id="Teradata.Generator-152"><a href="#Teradata.Generator-152"><span class="linenos">152</span></a> <span class="k">def</span> <span class="nf">datatype_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Teradata.Generator-153"><a href="#Teradata.Generator-153"><span class="linenos">153</span></a> <span class="n">type_sql</span> <span class="o">=</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">datatype_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
-</span><span id="Teradata.Generator-154"><a href="#Teradata.Generator-154"><span class="linenos">154</span></a> <span class="n">prefix_sql</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;prefix&quot;</span><span class="p">)</span>
-</span><span id="Teradata.Generator-155"><a href="#Teradata.Generator-155"><span class="linenos">155</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;SYSUDTLIB.</span><span class="si">{</span><span class="n">type_sql</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="n">prefix_sql</span> <span class="k">else</span> <span class="n">type_sql</span>
-</span><span id="Teradata.Generator-156"><a href="#Teradata.Generator-156"><span class="linenos">156</span></a>
-</span><span id="Teradata.Generator-157"><a href="#Teradata.Generator-157"><span class="linenos">157</span></a> <span class="k">def</span> <span class="nf">rangen_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RangeN</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Teradata.Generator-158"><a href="#Teradata.Generator-158"><span class="linenos">158</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
-</span><span id="Teradata.Generator-159"><a href="#Teradata.Generator-159"><span class="linenos">159</span></a> <span class="n">expressions_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
-</span><span id="Teradata.Generator-160"><a href="#Teradata.Generator-160"><span class="linenos">160</span></a> <span class="n">each_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;each&quot;</span><span class="p">)</span>
-</span><span id="Teradata.Generator-161"><a href="#Teradata.Generator-161"><span class="linenos">161</span></a> <span class="n">each_sql</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot; EACH </span><span class="si">{</span><span class="n">each_sql</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="n">each_sql</span> <span class="k">else</span> <span class="s2">&quot;&quot;</span>
-</span><span id="Teradata.Generator-162"><a href="#Teradata.Generator-162"><span class="linenos">162</span></a>
-</span><span id="Teradata.Generator-163"><a href="#Teradata.Generator-163"><span class="linenos">163</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;RANGE_N(</span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="s2"> BETWEEN </span><span class="si">{</span><span class="n">expressions_sql</span><span class="si">}{</span><span class="n">each_sql</span><span class="si">}</span><span class="s2">)&quot;</span>
+</span><span id="Teradata.Generator-132"><a href="#Teradata.Generator-132"><span class="linenos">132</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Max</span><span class="p">:</span> <span class="n">max_or_greatest</span><span class="p">,</span>
+</span><span id="Teradata.Generator-133"><a href="#Teradata.Generator-133"><span class="linenos">133</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Min</span><span class="p">:</span> <span class="n">min_or_least</span><span class="p">,</span>
+</span><span id="Teradata.Generator-134"><a href="#Teradata.Generator-134"><span class="linenos">134</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">ToChar</span><span class="p">:</span> <span class="k">lambda</span> <span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">function_fallback_sql</span><span class="p">(</span><span class="n">e</span><span class="p">),</span>
+</span><span id="Teradata.Generator-135"><a href="#Teradata.Generator-135"><span class="linenos">135</span></a> <span class="p">}</span>
+</span><span id="Teradata.Generator-136"><a href="#Teradata.Generator-136"><span class="linenos">136</span></a>
+</span><span id="Teradata.Generator-137"><a href="#Teradata.Generator-137"><span class="linenos">137</span></a> <span class="k">def</span> <span class="nf">partitionedbyproperty_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">PartitionedByProperty</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Teradata.Generator-138"><a href="#Teradata.Generator-138"><span class="linenos">138</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;PARTITION BY </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">&quot;</span>
+</span><span id="Teradata.Generator-139"><a href="#Teradata.Generator-139"><span class="linenos">139</span></a>
+</span><span id="Teradata.Generator-140"><a href="#Teradata.Generator-140"><span class="linenos">140</span></a> <span class="c1"># FROM before SET in Teradata UPDATE syntax</span>
+</span><span id="Teradata.Generator-141"><a href="#Teradata.Generator-141"><span class="linenos">141</span></a> <span class="c1"># https://docs.teradata.com/r/Enterprise_IntelliFlex_VMware/Teradata-VantageTM-SQL-Data-Manipulation-Language-17.20/Statement-Syntax/UPDATE/UPDATE-Syntax-Basic-Form-FROM-Clause</span>
+</span><span id="Teradata.Generator-142"><a href="#Teradata.Generator-142"><span class="linenos">142</span></a> <span class="k">def</span> <span class="nf">update_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Update</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Teradata.Generator-143"><a href="#Teradata.Generator-143"><span class="linenos">143</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
+</span><span id="Teradata.Generator-144"><a href="#Teradata.Generator-144"><span class="linenos">144</span></a> <span class="n">from_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;from&quot;</span><span class="p">)</span>
+</span><span id="Teradata.Generator-145"><a href="#Teradata.Generator-145"><span class="linenos">145</span></a> <span class="n">set_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
+</span><span id="Teradata.Generator-146"><a href="#Teradata.Generator-146"><span class="linenos">146</span></a> <span class="n">where_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;where&quot;</span><span class="p">)</span>
+</span><span id="Teradata.Generator-147"><a href="#Teradata.Generator-147"><span class="linenos">147</span></a> <span class="n">sql</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;UPDATE </span><span class="si">{</span><span class="n">this</span><span class="si">}{</span><span class="n">from_sql</span><span class="si">}</span><span class="s2"> SET </span><span class="si">{</span><span class="n">set_sql</span><span class="si">}{</span><span class="n">where_sql</span><span class="si">}</span><span class="s2">&quot;</span>
+</span><span id="Teradata.Generator-148"><a href="#Teradata.Generator-148"><span class="linenos">148</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">prepend_ctes</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">sql</span><span class="p">)</span>
+</span><span id="Teradata.Generator-149"><a href="#Teradata.Generator-149"><span class="linenos">149</span></a>
+</span><span id="Teradata.Generator-150"><a href="#Teradata.Generator-150"><span class="linenos">150</span></a> <span class="k">def</span> <span class="nf">mod_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Mod</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Teradata.Generator-151"><a href="#Teradata.Generator-151"><span class="linenos">151</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">binary</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;MOD&quot;</span><span class="p">)</span>
+</span><span id="Teradata.Generator-152"><a href="#Teradata.Generator-152"><span class="linenos">152</span></a>
+</span><span id="Teradata.Generator-153"><a href="#Teradata.Generator-153"><span class="linenos">153</span></a> <span class="k">def</span> <span class="nf">datatype_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Teradata.Generator-154"><a href="#Teradata.Generator-154"><span class="linenos">154</span></a> <span class="n">type_sql</span> <span class="o">=</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">datatype_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
+</span><span id="Teradata.Generator-155"><a href="#Teradata.Generator-155"><span class="linenos">155</span></a> <span class="n">prefix_sql</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;prefix&quot;</span><span class="p">)</span>
+</span><span id="Teradata.Generator-156"><a href="#Teradata.Generator-156"><span class="linenos">156</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;SYSUDTLIB.</span><span class="si">{</span><span class="n">type_sql</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="n">prefix_sql</span> <span class="k">else</span> <span class="n">type_sql</span>
+</span><span id="Teradata.Generator-157"><a href="#Teradata.Generator-157"><span class="linenos">157</span></a>
+</span><span id="Teradata.Generator-158"><a href="#Teradata.Generator-158"><span class="linenos">158</span></a> <span class="k">def</span> <span class="nf">rangen_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RangeN</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Teradata.Generator-159"><a href="#Teradata.Generator-159"><span class="linenos">159</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
+</span><span id="Teradata.Generator-160"><a href="#Teradata.Generator-160"><span class="linenos">160</span></a> <span class="n">expressions_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
+</span><span id="Teradata.Generator-161"><a href="#Teradata.Generator-161"><span class="linenos">161</span></a> <span class="n">each_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;each&quot;</span><span class="p">)</span>
+</span><span id="Teradata.Generator-162"><a href="#Teradata.Generator-162"><span class="linenos">162</span></a> <span class="n">each_sql</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot; EACH </span><span class="si">{</span><span class="n">each_sql</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="n">each_sql</span> <span class="k">else</span> <span class="s2">&quot;&quot;</span>
+</span><span id="Teradata.Generator-163"><a href="#Teradata.Generator-163"><span class="linenos">163</span></a>
+</span><span id="Teradata.Generator-164"><a href="#Teradata.Generator-164"><span class="linenos">164</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;RANGE_N(</span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="s2"> BETWEEN </span><span class="si">{</span><span class="n">expressions_sql</span><span class="si">}{</span><span class="n">each_sql</span><span class="si">}</span><span class="s2">)&quot;</span>
</span></pre></div>
@@ -751,8 +754,8 @@ Default: True</li>
</div>
<a class="headerlink" href="#Teradata.Generator.partitionedbyproperty_sql"></a>
- <div class="pdoc-code codehilite"><pre><span></span><span id="Teradata.Generator.partitionedbyproperty_sql-136"><a href="#Teradata.Generator.partitionedbyproperty_sql-136"><span class="linenos">136</span></a> <span class="k">def</span> <span class="nf">partitionedbyproperty_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">PartitionedByProperty</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Teradata.Generator.partitionedbyproperty_sql-137"><a href="#Teradata.Generator.partitionedbyproperty_sql-137"><span class="linenos">137</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;PARTITION BY </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">&quot;</span>
+ <div class="pdoc-code codehilite"><pre><span></span><span id="Teradata.Generator.partitionedbyproperty_sql-137"><a href="#Teradata.Generator.partitionedbyproperty_sql-137"><span class="linenos">137</span></a> <span class="k">def</span> <span class="nf">partitionedbyproperty_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">PartitionedByProperty</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Teradata.Generator.partitionedbyproperty_sql-138"><a href="#Teradata.Generator.partitionedbyproperty_sql-138"><span class="linenos">138</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;PARTITION BY </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;this&#39;</span><span class="p">)</span><span class="si">}</span><span class="s2">&quot;</span>
</span></pre></div>
@@ -770,13 +773,13 @@ Default: True</li>
</div>
<a class="headerlink" href="#Teradata.Generator.update_sql"></a>
- <div class="pdoc-code codehilite"><pre><span></span><span id="Teradata.Generator.update_sql-141"><a href="#Teradata.Generator.update_sql-141"><span class="linenos">141</span></a> <span class="k">def</span> <span class="nf">update_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Update</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Teradata.Generator.update_sql-142"><a href="#Teradata.Generator.update_sql-142"><span class="linenos">142</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
-</span><span id="Teradata.Generator.update_sql-143"><a href="#Teradata.Generator.update_sql-143"><span class="linenos">143</span></a> <span class="n">from_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;from&quot;</span><span class="p">)</span>
-</span><span id="Teradata.Generator.update_sql-144"><a href="#Teradata.Generator.update_sql-144"><span class="linenos">144</span></a> <span class="n">set_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
-</span><span id="Teradata.Generator.update_sql-145"><a href="#Teradata.Generator.update_sql-145"><span class="linenos">145</span></a> <span class="n">where_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;where&quot;</span><span class="p">)</span>
-</span><span id="Teradata.Generator.update_sql-146"><a href="#Teradata.Generator.update_sql-146"><span class="linenos">146</span></a> <span class="n">sql</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;UPDATE </span><span class="si">{</span><span class="n">this</span><span class="si">}{</span><span class="n">from_sql</span><span class="si">}</span><span class="s2"> SET </span><span class="si">{</span><span class="n">set_sql</span><span class="si">}{</span><span class="n">where_sql</span><span class="si">}</span><span class="s2">&quot;</span>
-</span><span id="Teradata.Generator.update_sql-147"><a href="#Teradata.Generator.update_sql-147"><span class="linenos">147</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">prepend_ctes</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">sql</span><span class="p">)</span>
+ <div class="pdoc-code codehilite"><pre><span></span><span id="Teradata.Generator.update_sql-142"><a href="#Teradata.Generator.update_sql-142"><span class="linenos">142</span></a> <span class="k">def</span> <span class="nf">update_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Update</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Teradata.Generator.update_sql-143"><a href="#Teradata.Generator.update_sql-143"><span class="linenos">143</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
+</span><span id="Teradata.Generator.update_sql-144"><a href="#Teradata.Generator.update_sql-144"><span class="linenos">144</span></a> <span class="n">from_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;from&quot;</span><span class="p">)</span>
+</span><span id="Teradata.Generator.update_sql-145"><a href="#Teradata.Generator.update_sql-145"><span class="linenos">145</span></a> <span class="n">set_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
+</span><span id="Teradata.Generator.update_sql-146"><a href="#Teradata.Generator.update_sql-146"><span class="linenos">146</span></a> <span class="n">where_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;where&quot;</span><span class="p">)</span>
+</span><span id="Teradata.Generator.update_sql-147"><a href="#Teradata.Generator.update_sql-147"><span class="linenos">147</span></a> <span class="n">sql</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;UPDATE </span><span class="si">{</span><span class="n">this</span><span class="si">}{</span><span class="n">from_sql</span><span class="si">}</span><span class="s2"> SET </span><span class="si">{</span><span class="n">set_sql</span><span class="si">}{</span><span class="n">where_sql</span><span class="si">}</span><span class="s2">&quot;</span>
+</span><span id="Teradata.Generator.update_sql-148"><a href="#Teradata.Generator.update_sql-148"><span class="linenos">148</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">prepend_ctes</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="n">sql</span><span class="p">)</span>
</span></pre></div>
@@ -794,8 +797,8 @@ Default: True</li>
</div>
<a class="headerlink" href="#Teradata.Generator.mod_sql"></a>
- <div class="pdoc-code codehilite"><pre><span></span><span id="Teradata.Generator.mod_sql-149"><a href="#Teradata.Generator.mod_sql-149"><span class="linenos">149</span></a> <span class="k">def</span> <span class="nf">mod_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Mod</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Teradata.Generator.mod_sql-150"><a href="#Teradata.Generator.mod_sql-150"><span class="linenos">150</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">binary</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;MOD&quot;</span><span class="p">)</span>
+ <div class="pdoc-code codehilite"><pre><span></span><span id="Teradata.Generator.mod_sql-150"><a href="#Teradata.Generator.mod_sql-150"><span class="linenos">150</span></a> <span class="k">def</span> <span class="nf">mod_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Mod</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Teradata.Generator.mod_sql-151"><a href="#Teradata.Generator.mod_sql-151"><span class="linenos">151</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">binary</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;MOD&quot;</span><span class="p">)</span>
</span></pre></div>
@@ -813,10 +816,10 @@ Default: True</li>
</div>
<a class="headerlink" href="#Teradata.Generator.datatype_sql"></a>
- <div class="pdoc-code codehilite"><pre><span></span><span id="Teradata.Generator.datatype_sql-152"><a href="#Teradata.Generator.datatype_sql-152"><span class="linenos">152</span></a> <span class="k">def</span> <span class="nf">datatype_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Teradata.Generator.datatype_sql-153"><a href="#Teradata.Generator.datatype_sql-153"><span class="linenos">153</span></a> <span class="n">type_sql</span> <span class="o">=</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">datatype_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
-</span><span id="Teradata.Generator.datatype_sql-154"><a href="#Teradata.Generator.datatype_sql-154"><span class="linenos">154</span></a> <span class="n">prefix_sql</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;prefix&quot;</span><span class="p">)</span>
-</span><span id="Teradata.Generator.datatype_sql-155"><a href="#Teradata.Generator.datatype_sql-155"><span class="linenos">155</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;SYSUDTLIB.</span><span class="si">{</span><span class="n">type_sql</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="n">prefix_sql</span> <span class="k">else</span> <span class="n">type_sql</span>
+ <div class="pdoc-code codehilite"><pre><span></span><span id="Teradata.Generator.datatype_sql-153"><a href="#Teradata.Generator.datatype_sql-153"><span class="linenos">153</span></a> <span class="k">def</span> <span class="nf">datatype_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">DataType</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Teradata.Generator.datatype_sql-154"><a href="#Teradata.Generator.datatype_sql-154"><span class="linenos">154</span></a> <span class="n">type_sql</span> <span class="o">=</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">datatype_sql</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
+</span><span id="Teradata.Generator.datatype_sql-155"><a href="#Teradata.Generator.datatype_sql-155"><span class="linenos">155</span></a> <span class="n">prefix_sql</span> <span class="o">=</span> <span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;prefix&quot;</span><span class="p">)</span>
+</span><span id="Teradata.Generator.datatype_sql-156"><a href="#Teradata.Generator.datatype_sql-156"><span class="linenos">156</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;SYSUDTLIB.</span><span class="si">{</span><span class="n">type_sql</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="n">prefix_sql</span> <span class="k">else</span> <span class="n">type_sql</span>
</span></pre></div>
@@ -834,13 +837,13 @@ Default: True</li>
</div>
<a class="headerlink" href="#Teradata.Generator.rangen_sql"></a>
- <div class="pdoc-code codehilite"><pre><span></span><span id="Teradata.Generator.rangen_sql-157"><a href="#Teradata.Generator.rangen_sql-157"><span class="linenos">157</span></a> <span class="k">def</span> <span class="nf">rangen_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RangeN</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
-</span><span id="Teradata.Generator.rangen_sql-158"><a href="#Teradata.Generator.rangen_sql-158"><span class="linenos">158</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
-</span><span id="Teradata.Generator.rangen_sql-159"><a href="#Teradata.Generator.rangen_sql-159"><span class="linenos">159</span></a> <span class="n">expressions_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
-</span><span id="Teradata.Generator.rangen_sql-160"><a href="#Teradata.Generator.rangen_sql-160"><span class="linenos">160</span></a> <span class="n">each_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;each&quot;</span><span class="p">)</span>
-</span><span id="Teradata.Generator.rangen_sql-161"><a href="#Teradata.Generator.rangen_sql-161"><span class="linenos">161</span></a> <span class="n">each_sql</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot; EACH </span><span class="si">{</span><span class="n">each_sql</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="n">each_sql</span> <span class="k">else</span> <span class="s2">&quot;&quot;</span>
-</span><span id="Teradata.Generator.rangen_sql-162"><a href="#Teradata.Generator.rangen_sql-162"><span class="linenos">162</span></a>
-</span><span id="Teradata.Generator.rangen_sql-163"><a href="#Teradata.Generator.rangen_sql-163"><span class="linenos">163</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;RANGE_N(</span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="s2"> BETWEEN </span><span class="si">{</span><span class="n">expressions_sql</span><span class="si">}{</span><span class="n">each_sql</span><span class="si">}</span><span class="s2">)&quot;</span>
+ <div class="pdoc-code codehilite"><pre><span></span><span id="Teradata.Generator.rangen_sql-158"><a href="#Teradata.Generator.rangen_sql-158"><span class="linenos">158</span></a> <span class="k">def</span> <span class="nf">rangen_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">RangeN</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
+</span><span id="Teradata.Generator.rangen_sql-159"><a href="#Teradata.Generator.rangen_sql-159"><span class="linenos">159</span></a> <span class="n">this</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;this&quot;</span><span class="p">)</span>
+</span><span id="Teradata.Generator.rangen_sql-160"><a href="#Teradata.Generator.rangen_sql-160"><span class="linenos">160</span></a> <span class="n">expressions_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">expression</span><span class="p">)</span>
+</span><span id="Teradata.Generator.rangen_sql-161"><a href="#Teradata.Generator.rangen_sql-161"><span class="linenos">161</span></a> <span class="n">each_sql</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">(</span><span class="n">expression</span><span class="p">,</span> <span class="s2">&quot;each&quot;</span><span class="p">)</span>
+</span><span id="Teradata.Generator.rangen_sql-162"><a href="#Teradata.Generator.rangen_sql-162"><span class="linenos">162</span></a> <span class="n">each_sql</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot; EACH </span><span class="si">{</span><span class="n">each_sql</span><span class="si">}</span><span class="s2">&quot;</span> <span class="k">if</span> <span class="n">each_sql</span> <span class="k">else</span> <span class="s2">&quot;&quot;</span>
+</span><span id="Teradata.Generator.rangen_sql-163"><a href="#Teradata.Generator.rangen_sql-163"><span class="linenos">163</span></a>
+</span><span id="Teradata.Generator.rangen_sql-164"><a href="#Teradata.Generator.rangen_sql-164"><span class="linenos">164</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;RANGE_N(</span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="s2"> BETWEEN </span><span class="si">{</span><span class="n">expressions_sql</span><span class="si">}{</span><span class="n">each_sql</span><span class="si">}</span><span class="s2">)&quot;</span>
</span></pre></div>
@@ -937,6 +940,7 @@ Default: True</li>
<dd id="Teradata.Generator.offset_sql" class="function"><a href="../generator.html#Generator.offset_sql">offset_sql</a></dd>
<dd id="Teradata.Generator.setitem_sql" class="function"><a href="../generator.html#Generator.setitem_sql">setitem_sql</a></dd>
<dd id="Teradata.Generator.set_sql" class="function"><a href="../generator.html#Generator.set_sql">set_sql</a></dd>
+ <dd id="Teradata.Generator.pragma_sql" class="function"><a href="../generator.html#Generator.pragma_sql">pragma_sql</a></dd>
<dd id="Teradata.Generator.lock_sql" class="function"><a href="../generator.html#Generator.lock_sql">lock_sql</a></dd>
<dd id="Teradata.Generator.literal_sql" class="function"><a href="../generator.html#Generator.literal_sql">literal_sql</a></dd>
<dd id="Teradata.Generator.loaddata_sql" class="function"><a href="../generator.html#Generator.loaddata_sql">loaddata_sql</a></dd>
@@ -981,6 +985,8 @@ Default: True</li>
<dd id="Teradata.Generator.primarykey_sql" class="function"><a href="../generator.html#Generator.primarykey_sql">primarykey_sql</a></dd>
<dd id="Teradata.Generator.unique_sql" class="function"><a href="../generator.html#Generator.unique_sql">unique_sql</a></dd>
<dd id="Teradata.Generator.if_sql" class="function"><a href="../generator.html#Generator.if_sql">if_sql</a></dd>
+ <dd id="Teradata.Generator.jsonkeyvalue_sql" class="function"><a href="../generator.html#Generator.jsonkeyvalue_sql">jsonkeyvalue_sql</a></dd>
+ <dd id="Teradata.Generator.jsonobject_sql" class="function"><a href="../generator.html#Generator.jsonobject_sql">jsonobject_sql</a></dd>
<dd id="Teradata.Generator.in_sql" class="function"><a href="../generator.html#Generator.in_sql">in_sql</a></dd>
<dd id="Teradata.Generator.in_unnest_op" class="function"><a href="../generator.html#Generator.in_unnest_op">in_unnest_op</a></dd>
<dd id="Teradata.Generator.interval_sql" class="function"><a href="../generator.html#Generator.interval_sql">interval_sql</a></dd>