diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-06-02 23:59:11 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-06-02 23:59:11 +0000 |
commit | caea5267cb8e1fea3702adbdf6f68fd37d13b3b7 (patch) | |
tree | f06f1da1ab3b6906beca1c3c7222d28ff00766ac /docs/sqlglot/executor/python.html | |
parent | Adding upstream version 12.2.0. (diff) | |
download | sqlglot-caea5267cb8e1fea3702adbdf6f68fd37d13b3b7.tar.xz sqlglot-caea5267cb8e1fea3702adbdf6f68fd37d13b3b7.zip |
Adding upstream version 15.0.0.upstream/15.0.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'docs/sqlglot/executor/python.html')
-rw-r--r-- | docs/sqlglot/executor/python.html | 250 |
1 files changed, 138 insertions, 112 deletions
diff --git a/docs/sqlglot/executor/python.html b/docs/sqlglot/executor/python.html index a93e0b6..c73d51c 100644 --- a/docs/sqlglot/executor/python.html +++ b/docs/sqlglot/executor/python.html @@ -487,67 +487,76 @@ </span><span id="L-360"><a href="#L-360"><span class="linenos">360</span></a> </span><span id="L-361"><a href="#L-361"><span class="linenos">361</span></a><span class="k">def</span> <span class="nf">_rename</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">):</span> </span><span id="L-362"><a href="#L-362"><span class="linenos">362</span></a> <span class="k">try</span><span class="p">:</span> -</span><span id="L-363"><a href="#L-363"><span class="linenos">363</span></a> <span class="k">if</span> <span class="s2">"expressions"</span> <span class="ow">in</span> <span class="n">e</span><span class="o">.</span><span class="n">args</span><span class="p">:</span> -</span><span id="L-364"><a href="#L-364"><span class="linenos">364</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">e</span><span class="p">,</span> <span class="s2">"this"</span><span class="p">)</span> -</span><span id="L-365"><a href="#L-365"><span class="linenos">365</span></a> <span class="n">this</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="s2">, "</span> <span class="k">if</span> <span class="n">this</span> <span class="k">else</span> <span class="s2">""</span> -</span><span id="L-366"><a href="#L-366"><span class="linenos">366</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">e</span><span class="o">.</span><span class="n">key</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span><span class="si">}</span><span class="s2">(</span><span class="si">{</span><span class="n">this</span><span class="si">}{</span><span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">e</span><span class="p">)</span><span class="si">}</span><span class="s2">)"</span> -</span><span id="L-367"><a href="#L-367"><span class="linenos">367</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="n">e</span><span class="o">.</span><span class="n">key</span><span class="p">,</span> <span class="o">*</span><span class="n">e</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">values</span><span class="p">())</span> -</span><span id="L-368"><a href="#L-368"><span class="linenos">368</span></a> <span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">ex</span><span class="p">:</span> -</span><span id="L-369"><a href="#L-369"><span class="linenos">369</span></a> <span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span><span class="sa">f</span><span class="s2">"Could not rename </span><span class="si">{</span><span class="nb">repr</span><span class="p">(</span><span class="n">e</span><span class="p">)</span><span class="si">}</span><span class="s2">"</span><span class="p">)</span> <span class="kn">from</span> <span class="nn">ex</span> +</span><span id="L-363"><a href="#L-363"><span class="linenos">363</span></a> <span class="n">values</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="n">e</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">values</span><span class="p">())</span> +</span><span id="L-364"><a href="#L-364"><span class="linenos">364</span></a> +</span><span id="L-365"><a href="#L-365"><span class="linenos">365</span></a> <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">values</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span> +</span><span id="L-366"><a href="#L-366"><span class="linenos">366</span></a> <span class="n">values</span> <span class="o">=</span> <span class="n">values</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> +</span><span id="L-367"><a href="#L-367"><span class="linenos">367</span></a> <span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">values</span><span class="p">,</span> <span class="nb">list</span><span class="p">):</span> +</span><span id="L-368"><a href="#L-368"><span class="linenos">368</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="n">e</span><span class="o">.</span><span class="n">key</span><span class="p">,</span> <span class="n">values</span><span class="p">)</span> +</span><span id="L-369"><a href="#L-369"><span class="linenos">369</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="n">e</span><span class="o">.</span><span class="n">key</span><span class="p">,</span> <span class="o">*</span><span class="n">values</span><span class="p">)</span> </span><span id="L-370"><a href="#L-370"><span class="linenos">370</span></a> -</span><span id="L-371"><a href="#L-371"><span class="linenos">371</span></a> -</span><span id="L-372"><a href="#L-372"><span class="linenos">372</span></a><span class="k">def</span> <span class="nf">_case_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><span id="L-373"><a href="#L-373"><span class="linenos">373</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">"this"</span><span class="p">)</span> -</span><span id="L-374"><a href="#L-374"><span class="linenos">374</span></a> <span class="n">chain</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">"default"</span><span class="p">)</span> <span class="ow">or</span> <span class="s2">"None"</span> -</span><span id="L-375"><a href="#L-375"><span class="linenos">375</span></a> -</span><span id="L-376"><a href="#L-376"><span class="linenos">376</span></a> <span class="k">for</span> <span class="n">e</span> <span class="ow">in</span> <span class="nb">reversed</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="p">[</span><span class="s2">"ifs"</span><span class="p">]):</span> -</span><span id="L-377"><a href="#L-377"><span class="linenos">377</span></a> <span class="n">true</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">e</span><span class="p">,</span> <span class="s2">"true"</span><span class="p">)</span> -</span><span id="L-378"><a href="#L-378"><span class="linenos">378</span></a> <span class="n">condition</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">e</span><span class="p">,</span> <span class="s2">"this"</span><span class="p">)</span> -</span><span id="L-379"><a href="#L-379"><span class="linenos">379</span></a> <span class="n">condition</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="s2"> = (</span><span class="si">{</span><span class="n">condition</span><span class="si">}</span><span class="s2">)"</span> <span class="k">if</span> <span class="n">this</span> <span class="k">else</span> <span class="n">condition</span> -</span><span id="L-380"><a href="#L-380"><span class="linenos">380</span></a> <span class="n">chain</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">true</span><span class="si">}</span><span class="s2"> if </span><span class="si">{</span><span class="n">condition</span><span class="si">}</span><span class="s2"> else (</span><span class="si">{</span><span class="n">chain</span><span class="si">}</span><span class="s2">)"</span> -</span><span id="L-381"><a href="#L-381"><span class="linenos">381</span></a> -</span><span id="L-382"><a href="#L-382"><span class="linenos">382</span></a> <span class="k">return</span> <span class="n">chain</span> +</span><span id="L-371"><a href="#L-371"><span class="linenos">371</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Func</span><span class="p">)</span> <span class="ow">and</span> <span class="n">e</span><span class="o">.</span><span class="n">is_var_len_args</span><span class="p">:</span> +</span><span id="L-372"><a href="#L-372"><span class="linenos">372</span></a> <span class="o">*</span><span class="n">head</span><span class="p">,</span> <span class="n">tail</span> <span class="o">=</span> <span class="n">values</span> +</span><span id="L-373"><a href="#L-373"><span class="linenos">373</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="n">e</span><span class="o">.</span><span class="n">key</span><span class="p">,</span> <span class="o">*</span><span class="n">head</span><span class="p">,</span> <span class="o">*</span><span class="n">tail</span><span class="p">)</span> +</span><span id="L-374"><a href="#L-374"><span class="linenos">374</span></a> +</span><span id="L-375"><a href="#L-375"><span class="linenos">375</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">func</span><span class="p">(</span><span class="n">e</span><span class="o">.</span><span class="n">key</span><span class="p">,</span> <span class="o">*</span><span class="n">values</span><span class="p">)</span> +</span><span id="L-376"><a href="#L-376"><span class="linenos">376</span></a> <span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">ex</span><span class="p">:</span> +</span><span id="L-377"><a href="#L-377"><span class="linenos">377</span></a> <span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span><span class="sa">f</span><span class="s2">"Could not rename </span><span class="si">{</span><span class="nb">repr</span><span class="p">(</span><span class="n">e</span><span class="p">)</span><span class="si">}</span><span class="s2">"</span><span class="p">)</span> <span class="kn">from</span> <span class="nn">ex</span> +</span><span id="L-378"><a href="#L-378"><span class="linenos">378</span></a> +</span><span id="L-379"><a href="#L-379"><span class="linenos">379</span></a> +</span><span id="L-380"><a href="#L-380"><span class="linenos">380</span></a><span class="k">def</span> <span class="nf">_case_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><span id="L-381"><a href="#L-381"><span class="linenos">381</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">"this"</span><span class="p">)</span> +</span><span id="L-382"><a href="#L-382"><span class="linenos">382</span></a> <span class="n">chain</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">"default"</span><span class="p">)</span> <span class="ow">or</span> <span class="s2">"None"</span> </span><span id="L-383"><a href="#L-383"><span class="linenos">383</span></a> -</span><span id="L-384"><a href="#L-384"><span class="linenos">384</span></a> -</span><span id="L-385"><a href="#L-385"><span class="linenos">385</span></a><span class="k">def</span> <span class="nf">_lambda_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Lambda</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="L-386"><a href="#L-386"><span class="linenos">386</span></a> <span class="n">names</span> <span class="o">=</span> <span class="p">{</span><span class="n">e</span><span class="o">.</span><span class="n">name</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="k">for</span> <span class="n">e</span> <span class="ow">in</span> <span class="n">e</span><span class="o">.</span><span class="n">expressions</span><span class="p">}</span> -</span><span id="L-387"><a href="#L-387"><span class="linenos">387</span></a> -</span><span id="L-388"><a href="#L-388"><span class="linenos">388</span></a> <span class="n">e</span> <span class="o">=</span> <span class="n">e</span><span class="o">.</span><span class="n">transform</span><span class="p">(</span> -</span><span id="L-389"><a href="#L-389"><span class="linenos">389</span></a> <span class="k">lambda</span> <span class="n">n</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Var</span><span class="p">(</span><span class="n">this</span><span class="o">=</span><span class="n">n</span><span class="o">.</span><span class="n">name</span><span class="p">)</span> -</span><span id="L-390"><a href="#L-390"><span class="linenos">390</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">n</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Identifier</span><span class="p">)</span> <span class="ow">and</span> <span class="n">n</span><span class="o">.</span><span class="n">name</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="ow">in</span> <span class="n">names</span> -</span><span id="L-391"><a href="#L-391"><span class="linenos">391</span></a> <span class="k">else</span> <span class="n">n</span> -</span><span id="L-392"><a href="#L-392"><span class="linenos">392</span></a> <span class="p">)</span> -</span><span id="L-393"><a href="#L-393"><span class="linenos">393</span></a> -</span><span id="L-394"><a href="#L-394"><span class="linenos">394</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"lambda </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span><span class="si">}</span><span class="s2">: </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">e</span><span class="p">,</span><span class="w"> </span><span class="s1">'this'</span><span class="p">)</span><span class="si">}</span><span class="s2">"</span> +</span><span id="L-384"><a href="#L-384"><span class="linenos">384</span></a> <span class="k">for</span> <span class="n">e</span> <span class="ow">in</span> <span class="nb">reversed</span><span class="p">(</span><span class="n">expression</span><span class="o">.</span><span class="n">args</span><span class="p">[</span><span class="s2">"ifs"</span><span class="p">]):</span> +</span><span id="L-385"><a href="#L-385"><span class="linenos">385</span></a> <span class="n">true</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">e</span><span class="p">,</span> <span class="s2">"true"</span><span class="p">)</span> +</span><span id="L-386"><a href="#L-386"><span class="linenos">386</span></a> <span class="n">condition</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">e</span><span class="p">,</span> <span class="s2">"this"</span><span class="p">)</span> +</span><span id="L-387"><a href="#L-387"><span class="linenos">387</span></a> <span class="n">condition</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">this</span><span class="si">}</span><span class="s2"> = (</span><span class="si">{</span><span class="n">condition</span><span class="si">}</span><span class="s2">)"</span> <span class="k">if</span> <span class="n">this</span> <span class="k">else</span> <span class="n">condition</span> +</span><span id="L-388"><a href="#L-388"><span class="linenos">388</span></a> <span class="n">chain</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">true</span><span class="si">}</span><span class="s2"> if </span><span class="si">{</span><span class="n">condition</span><span class="si">}</span><span class="s2"> else (</span><span class="si">{</span><span class="n">chain</span><span class="si">}</span><span class="s2">)"</span> +</span><span id="L-389"><a href="#L-389"><span class="linenos">389</span></a> +</span><span id="L-390"><a href="#L-390"><span class="linenos">390</span></a> <span class="k">return</span> <span class="n">chain</span> +</span><span id="L-391"><a href="#L-391"><span class="linenos">391</span></a> +</span><span id="L-392"><a href="#L-392"><span class="linenos">392</span></a> +</span><span id="L-393"><a href="#L-393"><span class="linenos">393</span></a><span class="k">def</span> <span class="nf">_lambda_sql</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">e</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Lambda</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="L-394"><a href="#L-394"><span class="linenos">394</span></a> <span class="n">names</span> <span class="o">=</span> <span class="p">{</span><span class="n">e</span><span class="o">.</span><span class="n">name</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="k">for</span> <span class="n">e</span> <span class="ow">in</span> <span class="n">e</span><span class="o">.</span><span class="n">expressions</span><span class="p">}</span> </span><span id="L-395"><a href="#L-395"><span class="linenos">395</span></a> -</span><span id="L-396"><a href="#L-396"><span class="linenos">396</span></a> -</span><span id="L-397"><a href="#L-397"><span class="linenos">397</span></a><span class="k">class</span> <span class="nc">Python</span><span class="p">(</span><span class="n">Dialect</span><span class="p">):</span> -</span><span id="L-398"><a href="#L-398"><span class="linenos">398</span></a> <span class="k">class</span> <span class="nc">Tokenizer</span><span class="p">(</span><span class="n">tokens</span><span class="o">.</span><span class="n">Tokenizer</span><span class="p">):</span> -</span><span id="L-399"><a href="#L-399"><span class="linenos">399</span></a> <span class="n">STRING_ESCAPES</span> <span class="o">=</span> <span class="p">[</span><span class="s2">"</span><span class="se">\\</span><span class="s2">"</span><span class="p">]</span> -</span><span id="L-400"><a href="#L-400"><span class="linenos">400</span></a> -</span><span id="L-401"><a href="#L-401"><span class="linenos">401</span></a> <span class="k">class</span> <span class="nc">Generator</span><span class="p">(</span><span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="p">):</span> -</span><span id="L-402"><a href="#L-402"><span class="linenos">402</span></a> <span class="n">TRANSFORMS</span> <span class="o">=</span> <span class="p">{</span> -</span><span id="L-403"><a href="#L-403"><span class="linenos">403</span></a> <span class="o">**</span><span class="p">{</span><span class="n">klass</span><span class="p">:</span> <span class="n">_rename</span> <span class="k">for</span> <span class="n">klass</span> <span class="ow">in</span> <span class="n">subclasses</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="vm">__name__</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Binary</span><span class="p">)},</span> -</span><span id="L-404"><a href="#L-404"><span class="linenos">404</span></a> <span class="o">**</span><span class="p">{</span><span class="n">klass</span><span class="p">:</span> <span class="n">_rename</span> <span class="k">for</span> <span class="n">klass</span> <span class="ow">in</span> <span class="n">exp</span><span class="o">.</span><span class="n">ALL_FUNCTIONS</span><span class="p">},</span> -</span><span id="L-405"><a href="#L-405"><span class="linenos">405</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Case</span><span class="p">:</span> <span class="n">_case_sql</span><span class="p">,</span> -</span><span id="L-406"><a href="#L-406"><span class="linenos">406</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Alias</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">sql</span><span class="p">(</span><span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">),</span> -</span><span id="L-407"><a href="#L-407"><span class="linenos">407</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Array</span><span class="p">:</span> <span class="n">inline_array_sql</span><span class="p">,</span> -</span><span id="L-408"><a href="#L-408"><span class="linenos">408</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">And</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">binary</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="s2">"and"</span><span class="p">),</span> -</span><span id="L-409"><a href="#L-409"><span class="linenos">409</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Between</span><span class="p">:</span> <span class="n">_rename</span><span class="p">,</span> -</span><span id="L-410"><a href="#L-410"><span class="linenos">410</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Boolean</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="s2">"True"</span> <span class="k">if</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span> <span class="k">else</span> <span class="s2">"False"</span><span class="p">,</span> -</span><span id="L-411"><a href="#L-411"><span class="linenos">411</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Cast</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="sa">f</span><span class="s2">"CAST(</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">e</span><span class="o">.</span><span class="n">this</span><span class="p">)</span><span class="si">}</span><span class="s2">, exp.DataType.Type.</span><span class="si">{</span><span class="n">e</span><span class="o">.</span><span class="n">args</span><span class="p">[</span><span class="s1">'to'</span><span class="p">]</span><span class="si">}</span><span class="s2">)"</span><span class="p">,</span> -</span><span id="L-412"><a href="#L-412"><span class="linenos">412</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Column</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="sa">f</span><span class="s2">"scope[</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">e</span><span class="p">,</span><span class="w"> </span><span class="s1">'table'</span><span class="p">)</span><span class="w"> </span><span class="ow">or</span><span class="w"> </span><span class="kc">None</span><span class="si">}</span><span class="s2">][</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">e</span><span class="o">.</span><span class="n">this</span><span class="p">)</span><span class="si">}</span><span class="s2">]"</span><span class="p">,</span> -</span><span id="L-413"><a href="#L-413"><span class="linenos">413</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Distinct</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="sa">f</span><span class="s2">"set(</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">e</span><span class="p">,</span><span class="w"> </span><span class="s1">'this'</span><span class="p">)</span><span class="si">}</span><span class="s2">)"</span><span class="p">,</span> -</span><span id="L-414"><a href="#L-414"><span class="linenos">414</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Extract</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="sa">f</span><span class="s2">"EXTRACT('</span><span class="si">{</span><span class="n">e</span><span class="o">.</span><span class="n">name</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span><span class="si">}</span><span class="s2">', </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">e</span><span class="p">,</span><span class="w"> </span><span class="s1">'expression'</span><span class="p">)</span><span class="si">}</span><span class="s2">)"</span><span class="p">,</span> -</span><span id="L-415"><a href="#L-415"><span class="linenos">415</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">In</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="sa">f</span><span class="s2">"</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">e</span><span class="p">,</span><span class="w"> </span><span class="s1">'this'</span><span class="p">)</span><span class="si">}</span><span class="s2"> in (</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span><span class="si">}</span><span class="s2">)"</span><span class="p">,</span> -</span><span id="L-416"><a href="#L-416"><span class="linenos">416</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Is</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">binary</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="s2">"is"</span><span class="p">),</span> -</span><span id="L-417"><a href="#L-417"><span class="linenos">417</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Lambda</span><span class="p">:</span> <span class="n">_lambda_sql</span><span class="p">,</span> -</span><span id="L-418"><a href="#L-418"><span class="linenos">418</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Not</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="sa">f</span><span class="s2">"not </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">e</span><span class="o">.</span><span class="n">this</span><span class="p">)</span><span class="si">}</span><span class="s2">"</span><span class="p">,</span> -</span><span id="L-419"><a href="#L-419"><span class="linenos">419</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Null</span><span class="p">:</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_</span><span class="p">:</span> <span class="s2">"None"</span><span class="p">,</span> -</span><span id="L-420"><a href="#L-420"><span class="linenos">420</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Or</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">binary</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="s2">"or"</span><span class="p">),</span> -</span><span id="L-421"><a href="#L-421"><span class="linenos">421</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Ordered</span><span class="p">:</span> <span class="n">_ordered_py</span><span class="p">,</span> -</span><span id="L-422"><a href="#L-422"><span class="linenos">422</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Star</span><span class="p">:</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_</span><span class="p">:</span> <span class="s2">"1"</span><span class="p">,</span> -</span><span id="L-423"><a href="#L-423"><span class="linenos">423</span></a> <span class="p">}</span> +</span><span id="L-396"><a href="#L-396"><span class="linenos">396</span></a> <span class="n">e</span> <span class="o">=</span> <span class="n">e</span><span class="o">.</span><span class="n">transform</span><span class="p">(</span> +</span><span id="L-397"><a href="#L-397"><span class="linenos">397</span></a> <span class="k">lambda</span> <span class="n">n</span><span class="p">:</span> <span class="n">exp</span><span class="o">.</span><span class="n">Var</span><span class="p">(</span><span class="n">this</span><span class="o">=</span><span class="n">n</span><span class="o">.</span><span class="n">name</span><span class="p">)</span> +</span><span id="L-398"><a href="#L-398"><span class="linenos">398</span></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">n</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Identifier</span><span class="p">)</span> <span class="ow">and</span> <span class="n">n</span><span class="o">.</span><span class="n">name</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="ow">in</span> <span class="n">names</span> +</span><span id="L-399"><a href="#L-399"><span class="linenos">399</span></a> <span class="k">else</span> <span class="n">n</span> +</span><span id="L-400"><a href="#L-400"><span class="linenos">400</span></a> <span class="p">)</span> +</span><span id="L-401"><a href="#L-401"><span class="linenos">401</span></a> +</span><span id="L-402"><a href="#L-402"><span class="linenos">402</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"lambda </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span><span class="si">}</span><span class="s2">: </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">e</span><span class="p">,</span><span class="w"> </span><span class="s1">'this'</span><span class="p">)</span><span class="si">}</span><span class="s2">"</span> +</span><span id="L-403"><a href="#L-403"><span class="linenos">403</span></a> +</span><span id="L-404"><a href="#L-404"><span class="linenos">404</span></a> +</span><span id="L-405"><a href="#L-405"><span class="linenos">405</span></a><span class="k">class</span> <span class="nc">Python</span><span class="p">(</span><span class="n">Dialect</span><span class="p">):</span> +</span><span id="L-406"><a href="#L-406"><span class="linenos">406</span></a> <span class="k">class</span> <span class="nc">Tokenizer</span><span class="p">(</span><span class="n">tokens</span><span class="o">.</span><span class="n">Tokenizer</span><span class="p">):</span> +</span><span id="L-407"><a href="#L-407"><span class="linenos">407</span></a> <span class="n">STRING_ESCAPES</span> <span class="o">=</span> <span class="p">[</span><span class="s2">"</span><span class="se">\\</span><span class="s2">"</span><span class="p">]</span> +</span><span id="L-408"><a href="#L-408"><span class="linenos">408</span></a> +</span><span id="L-409"><a href="#L-409"><span class="linenos">409</span></a> <span class="k">class</span> <span class="nc">Generator</span><span class="p">(</span><span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="p">):</span> +</span><span id="L-410"><a href="#L-410"><span class="linenos">410</span></a> <span class="n">TRANSFORMS</span> <span class="o">=</span> <span class="p">{</span> +</span><span id="L-411"><a href="#L-411"><span class="linenos">411</span></a> <span class="o">**</span><span class="p">{</span><span class="n">klass</span><span class="p">:</span> <span class="n">_rename</span> <span class="k">for</span> <span class="n">klass</span> <span class="ow">in</span> <span class="n">subclasses</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="vm">__name__</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Binary</span><span class="p">)},</span> +</span><span id="L-412"><a href="#L-412"><span class="linenos">412</span></a> <span class="o">**</span><span class="p">{</span><span class="n">klass</span><span class="p">:</span> <span class="n">_rename</span> <span class="k">for</span> <span class="n">klass</span> <span class="ow">in</span> <span class="n">exp</span><span class="o">.</span><span class="n">ALL_FUNCTIONS</span><span class="p">},</span> +</span><span id="L-413"><a href="#L-413"><span class="linenos">413</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Case</span><span class="p">:</span> <span class="n">_case_sql</span><span class="p">,</span> +</span><span id="L-414"><a href="#L-414"><span class="linenos">414</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Alias</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">sql</span><span class="p">(</span><span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">),</span> +</span><span id="L-415"><a href="#L-415"><span class="linenos">415</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Array</span><span class="p">:</span> <span class="n">inline_array_sql</span><span class="p">,</span> +</span><span id="L-416"><a href="#L-416"><span class="linenos">416</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">And</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">binary</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="s2">"and"</span><span class="p">),</span> +</span><span id="L-417"><a href="#L-417"><span class="linenos">417</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Between</span><span class="p">:</span> <span class="n">_rename</span><span class="p">,</span> +</span><span id="L-418"><a href="#L-418"><span class="linenos">418</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Boolean</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="s2">"True"</span> <span class="k">if</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span> <span class="k">else</span> <span class="s2">"False"</span><span class="p">,</span> +</span><span id="L-419"><a href="#L-419"><span class="linenos">419</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Cast</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="sa">f</span><span class="s2">"CAST(</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">e</span><span class="o">.</span><span class="n">this</span><span class="p">)</span><span class="si">}</span><span class="s2">, exp.DataType.Type.</span><span class="si">{</span><span class="n">e</span><span class="o">.</span><span class="n">args</span><span class="p">[</span><span class="s1">'to'</span><span class="p">]</span><span class="si">}</span><span class="s2">)"</span><span class="p">,</span> +</span><span id="L-420"><a href="#L-420"><span class="linenos">420</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Column</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="sa">f</span><span class="s2">"scope[</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">e</span><span class="p">,</span><span class="w"> </span><span class="s1">'table'</span><span class="p">)</span><span class="w"> </span><span class="ow">or</span><span class="w"> </span><span class="kc">None</span><span class="si">}</span><span class="s2">][</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">e</span><span class="o">.</span><span class="n">this</span><span class="p">)</span><span class="si">}</span><span class="s2">]"</span><span class="p">,</span> +</span><span id="L-421"><a href="#L-421"><span class="linenos">421</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Distinct</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="sa">f</span><span class="s2">"set(</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">e</span><span class="p">,</span><span class="w"> </span><span class="s1">'this'</span><span class="p">)</span><span class="si">}</span><span class="s2">)"</span><span class="p">,</span> +</span><span id="L-422"><a href="#L-422"><span class="linenos">422</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Extract</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="sa">f</span><span class="s2">"EXTRACT('</span><span class="si">{</span><span class="n">e</span><span class="o">.</span><span class="n">name</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span><span class="si">}</span><span class="s2">', </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">e</span><span class="p">,</span><span class="w"> </span><span class="s1">'expression'</span><span class="p">)</span><span class="si">}</span><span class="s2">)"</span><span class="p">,</span> +</span><span id="L-423"><a href="#L-423"><span class="linenos">423</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">In</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="sa">f</span><span class="s2">"</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">e</span><span class="p">,</span><span class="w"> </span><span class="s1">'this'</span><span class="p">)</span><span class="si">}</span><span class="s2"> in (</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span><span class="si">}</span><span class="s2">)"</span><span class="p">,</span> +</span><span id="L-424"><a href="#L-424"><span class="linenos">424</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Interval</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="sa">f</span><span class="s2">"INTERVAL(</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">e</span><span class="o">.</span><span class="n">this</span><span class="p">)</span><span class="si">}</span><span class="s2">, '</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">e</span><span class="o">.</span><span class="n">unit</span><span class="p">)</span><span class="si">}</span><span class="s2">')"</span><span class="p">,</span> +</span><span id="L-425"><a href="#L-425"><span class="linenos">425</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Is</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">binary</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="s2">"is"</span><span class="p">),</span> +</span><span id="L-426"><a href="#L-426"><span class="linenos">426</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Lambda</span><span class="p">:</span> <span class="n">_lambda_sql</span><span class="p">,</span> +</span><span id="L-427"><a href="#L-427"><span class="linenos">427</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Not</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="sa">f</span><span class="s2">"not </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">e</span><span class="o">.</span><span class="n">this</span><span class="p">)</span><span class="si">}</span><span class="s2">"</span><span class="p">,</span> +</span><span id="L-428"><a href="#L-428"><span class="linenos">428</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Null</span><span class="p">:</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_</span><span class="p">:</span> <span class="s2">"None"</span><span class="p">,</span> +</span><span id="L-429"><a href="#L-429"><span class="linenos">429</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Or</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">binary</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="s2">"or"</span><span class="p">),</span> +</span><span id="L-430"><a href="#L-430"><span class="linenos">430</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Ordered</span><span class="p">:</span> <span class="n">_ordered_py</span><span class="p">,</span> +</span><span id="L-431"><a href="#L-431"><span class="linenos">431</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Star</span><span class="p">:</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_</span><span class="p">:</span> <span class="s2">"1"</span><span class="p">,</span> +</span><span id="L-432"><a href="#L-432"><span class="linenos">432</span></a> <span class="p">}</span> </span></pre></div> @@ -1494,33 +1503,34 @@ </div> <a class="headerlink" href="#Python"></a> - <div class="pdoc-code codehilite"><pre><span></span><span id="Python-398"><a href="#Python-398"><span class="linenos">398</span></a><span class="k">class</span> <span class="nc">Python</span><span class="p">(</span><span class="n">Dialect</span><span class="p">):</span> -</span><span id="Python-399"><a href="#Python-399"><span class="linenos">399</span></a> <span class="k">class</span> <span class="nc">Tokenizer</span><span class="p">(</span><span class="n">tokens</span><span class="o">.</span><span class="n">Tokenizer</span><span class="p">):</span> -</span><span id="Python-400"><a href="#Python-400"><span class="linenos">400</span></a> <span class="n">STRING_ESCAPES</span> <span class="o">=</span> <span class="p">[</span><span class="s2">"</span><span class="se">\\</span><span class="s2">"</span><span class="p">]</span> -</span><span id="Python-401"><a href="#Python-401"><span class="linenos">401</span></a> -</span><span id="Python-402"><a href="#Python-402"><span class="linenos">402</span></a> <span class="k">class</span> <span class="nc">Generator</span><span class="p">(</span><span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="p">):</span> -</span><span id="Python-403"><a href="#Python-403"><span class="linenos">403</span></a> <span class="n">TRANSFORMS</span> <span class="o">=</span> <span class="p">{</span> -</span><span id="Python-404"><a href="#Python-404"><span class="linenos">404</span></a> <span class="o">**</span><span class="p">{</span><span class="n">klass</span><span class="p">:</span> <span class="n">_rename</span> <span class="k">for</span> <span class="n">klass</span> <span class="ow">in</span> <span class="n">subclasses</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="vm">__name__</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Binary</span><span class="p">)},</span> -</span><span id="Python-405"><a href="#Python-405"><span class="linenos">405</span></a> <span class="o">**</span><span class="p">{</span><span class="n">klass</span><span class="p">:</span> <span class="n">_rename</span> <span class="k">for</span> <span class="n">klass</span> <span class="ow">in</span> <span class="n">exp</span><span class="o">.</span><span class="n">ALL_FUNCTIONS</span><span class="p">},</span> -</span><span id="Python-406"><a href="#Python-406"><span class="linenos">406</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Case</span><span class="p">:</span> <span class="n">_case_sql</span><span class="p">,</span> -</span><span id="Python-407"><a href="#Python-407"><span class="linenos">407</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Alias</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">sql</span><span class="p">(</span><span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">),</span> -</span><span id="Python-408"><a href="#Python-408"><span class="linenos">408</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Array</span><span class="p">:</span> <span class="n">inline_array_sql</span><span class="p">,</span> -</span><span id="Python-409"><a href="#Python-409"><span class="linenos">409</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">And</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">binary</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="s2">"and"</span><span class="p">),</span> -</span><span id="Python-410"><a href="#Python-410"><span class="linenos">410</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Between</span><span class="p">:</span> <span class="n">_rename</span><span class="p">,</span> -</span><span id="Python-411"><a href="#Python-411"><span class="linenos">411</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Boolean</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="s2">"True"</span> <span class="k">if</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span> <span class="k">else</span> <span class="s2">"False"</span><span class="p">,</span> -</span><span id="Python-412"><a href="#Python-412"><span class="linenos">412</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Cast</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="sa">f</span><span class="s2">"CAST(</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">e</span><span class="o">.</span><span class="n">this</span><span class="p">)</span><span class="si">}</span><span class="s2">, exp.DataType.Type.</span><span class="si">{</span><span class="n">e</span><span class="o">.</span><span class="n">args</span><span class="p">[</span><span class="s1">'to'</span><span class="p">]</span><span class="si">}</span><span class="s2">)"</span><span class="p">,</span> -</span><span id="Python-413"><a href="#Python-413"><span class="linenos">413</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Column</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="sa">f</span><span class="s2">"scope[</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">e</span><span class="p">,</span><span class="w"> </span><span class="s1">'table'</span><span class="p">)</span><span class="w"> </span><span class="ow">or</span><span class="w"> </span><span class="kc">None</span><span class="si">}</span><span class="s2">][</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">e</span><span class="o">.</span><span class="n">this</span><span class="p">)</span><span class="si">}</span><span class="s2">]"</span><span class="p">,</span> -</span><span id="Python-414"><a href="#Python-414"><span class="linenos">414</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Distinct</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="sa">f</span><span class="s2">"set(</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">e</span><span class="p">,</span><span class="w"> </span><span class="s1">'this'</span><span class="p">)</span><span class="si">}</span><span class="s2">)"</span><span class="p">,</span> -</span><span id="Python-415"><a href="#Python-415"><span class="linenos">415</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Extract</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="sa">f</span><span class="s2">"EXTRACT('</span><span class="si">{</span><span class="n">e</span><span class="o">.</span><span class="n">name</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span><span class="si">}</span><span class="s2">', </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">e</span><span class="p">,</span><span class="w"> </span><span class="s1">'expression'</span><span class="p">)</span><span class="si">}</span><span class="s2">)"</span><span class="p">,</span> -</span><span id="Python-416"><a href="#Python-416"><span class="linenos">416</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">In</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="sa">f</span><span class="s2">"</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">e</span><span class="p">,</span><span class="w"> </span><span class="s1">'this'</span><span class="p">)</span><span class="si">}</span><span class="s2"> in (</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span><span class="si">}</span><span class="s2">)"</span><span class="p">,</span> -</span><span id="Python-417"><a href="#Python-417"><span class="linenos">417</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Is</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">binary</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="s2">"is"</span><span class="p">),</span> -</span><span id="Python-418"><a href="#Python-418"><span class="linenos">418</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Lambda</span><span class="p">:</span> <span class="n">_lambda_sql</span><span class="p">,</span> -</span><span id="Python-419"><a href="#Python-419"><span class="linenos">419</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Not</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="sa">f</span><span class="s2">"not </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">e</span><span class="o">.</span><span class="n">this</span><span class="p">)</span><span class="si">}</span><span class="s2">"</span><span class="p">,</span> -</span><span id="Python-420"><a href="#Python-420"><span class="linenos">420</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Null</span><span class="p">:</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_</span><span class="p">:</span> <span class="s2">"None"</span><span class="p">,</span> -</span><span id="Python-421"><a href="#Python-421"><span class="linenos">421</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Or</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">binary</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="s2">"or"</span><span class="p">),</span> -</span><span id="Python-422"><a href="#Python-422"><span class="linenos">422</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Ordered</span><span class="p">:</span> <span class="n">_ordered_py</span><span class="p">,</span> -</span><span id="Python-423"><a href="#Python-423"><span class="linenos">423</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Star</span><span class="p">:</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_</span><span class="p">:</span> <span class="s2">"1"</span><span class="p">,</span> -</span><span id="Python-424"><a href="#Python-424"><span class="linenos">424</span></a> <span class="p">}</span> + <div class="pdoc-code codehilite"><pre><span></span><span id="Python-406"><a href="#Python-406"><span class="linenos">406</span></a><span class="k">class</span> <span class="nc">Python</span><span class="p">(</span><span class="n">Dialect</span><span class="p">):</span> +</span><span id="Python-407"><a href="#Python-407"><span class="linenos">407</span></a> <span class="k">class</span> <span class="nc">Tokenizer</span><span class="p">(</span><span class="n">tokens</span><span class="o">.</span><span class="n">Tokenizer</span><span class="p">):</span> +</span><span id="Python-408"><a href="#Python-408"><span class="linenos">408</span></a> <span class="n">STRING_ESCAPES</span> <span class="o">=</span> <span class="p">[</span><span class="s2">"</span><span class="se">\\</span><span class="s2">"</span><span class="p">]</span> +</span><span id="Python-409"><a href="#Python-409"><span class="linenos">409</span></a> +</span><span id="Python-410"><a href="#Python-410"><span class="linenos">410</span></a> <span class="k">class</span> <span class="nc">Generator</span><span class="p">(</span><span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="p">):</span> +</span><span id="Python-411"><a href="#Python-411"><span class="linenos">411</span></a> <span class="n">TRANSFORMS</span> <span class="o">=</span> <span class="p">{</span> +</span><span id="Python-412"><a href="#Python-412"><span class="linenos">412</span></a> <span class="o">**</span><span class="p">{</span><span class="n">klass</span><span class="p">:</span> <span class="n">_rename</span> <span class="k">for</span> <span class="n">klass</span> <span class="ow">in</span> <span class="n">subclasses</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="vm">__name__</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Binary</span><span class="p">)},</span> +</span><span id="Python-413"><a href="#Python-413"><span class="linenos">413</span></a> <span class="o">**</span><span class="p">{</span><span class="n">klass</span><span class="p">:</span> <span class="n">_rename</span> <span class="k">for</span> <span class="n">klass</span> <span class="ow">in</span> <span class="n">exp</span><span class="o">.</span><span class="n">ALL_FUNCTIONS</span><span class="p">},</span> +</span><span id="Python-414"><a href="#Python-414"><span class="linenos">414</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Case</span><span class="p">:</span> <span class="n">_case_sql</span><span class="p">,</span> +</span><span id="Python-415"><a href="#Python-415"><span class="linenos">415</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Alias</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">sql</span><span class="p">(</span><span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">),</span> +</span><span id="Python-416"><a href="#Python-416"><span class="linenos">416</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Array</span><span class="p">:</span> <span class="n">inline_array_sql</span><span class="p">,</span> +</span><span id="Python-417"><a href="#Python-417"><span class="linenos">417</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">And</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">binary</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="s2">"and"</span><span class="p">),</span> +</span><span id="Python-418"><a href="#Python-418"><span class="linenos">418</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Between</span><span class="p">:</span> <span class="n">_rename</span><span class="p">,</span> +</span><span id="Python-419"><a href="#Python-419"><span class="linenos">419</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Boolean</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="s2">"True"</span> <span class="k">if</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span> <span class="k">else</span> <span class="s2">"False"</span><span class="p">,</span> +</span><span id="Python-420"><a href="#Python-420"><span class="linenos">420</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Cast</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="sa">f</span><span class="s2">"CAST(</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">e</span><span class="o">.</span><span class="n">this</span><span class="p">)</span><span class="si">}</span><span class="s2">, exp.DataType.Type.</span><span class="si">{</span><span class="n">e</span><span class="o">.</span><span class="n">args</span><span class="p">[</span><span class="s1">'to'</span><span class="p">]</span><span class="si">}</span><span class="s2">)"</span><span class="p">,</span> +</span><span id="Python-421"><a href="#Python-421"><span class="linenos">421</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Column</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="sa">f</span><span class="s2">"scope[</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">e</span><span class="p">,</span><span class="w"> </span><span class="s1">'table'</span><span class="p">)</span><span class="w"> </span><span class="ow">or</span><span class="w"> </span><span class="kc">None</span><span class="si">}</span><span class="s2">][</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">e</span><span class="o">.</span><span class="n">this</span><span class="p">)</span><span class="si">}</span><span class="s2">]"</span><span class="p">,</span> +</span><span id="Python-422"><a href="#Python-422"><span class="linenos">422</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Distinct</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="sa">f</span><span class="s2">"set(</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">e</span><span class="p">,</span><span class="w"> </span><span class="s1">'this'</span><span class="p">)</span><span class="si">}</span><span class="s2">)"</span><span class="p">,</span> +</span><span id="Python-423"><a href="#Python-423"><span class="linenos">423</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Extract</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="sa">f</span><span class="s2">"EXTRACT('</span><span class="si">{</span><span class="n">e</span><span class="o">.</span><span class="n">name</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span><span class="si">}</span><span class="s2">', </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">e</span><span class="p">,</span><span class="w"> </span><span class="s1">'expression'</span><span class="p">)</span><span class="si">}</span><span class="s2">)"</span><span class="p">,</span> +</span><span id="Python-424"><a href="#Python-424"><span class="linenos">424</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">In</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="sa">f</span><span class="s2">"</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">e</span><span class="p">,</span><span class="w"> </span><span class="s1">'this'</span><span class="p">)</span><span class="si">}</span><span class="s2"> in (</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span><span class="si">}</span><span class="s2">)"</span><span class="p">,</span> +</span><span id="Python-425"><a href="#Python-425"><span class="linenos">425</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Interval</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="sa">f</span><span class="s2">"INTERVAL(</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">e</span><span class="o">.</span><span class="n">this</span><span class="p">)</span><span class="si">}</span><span class="s2">, '</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">e</span><span class="o">.</span><span class="n">unit</span><span class="p">)</span><span class="si">}</span><span class="s2">')"</span><span class="p">,</span> +</span><span id="Python-426"><a href="#Python-426"><span class="linenos">426</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Is</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">binary</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="s2">"is"</span><span class="p">),</span> +</span><span id="Python-427"><a href="#Python-427"><span class="linenos">427</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Lambda</span><span class="p">:</span> <span class="n">_lambda_sql</span><span class="p">,</span> +</span><span id="Python-428"><a href="#Python-428"><span class="linenos">428</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Not</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="sa">f</span><span class="s2">"not </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">e</span><span class="o">.</span><span class="n">this</span><span class="p">)</span><span class="si">}</span><span class="s2">"</span><span class="p">,</span> +</span><span id="Python-429"><a href="#Python-429"><span class="linenos">429</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Null</span><span class="p">:</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_</span><span class="p">:</span> <span class="s2">"None"</span><span class="p">,</span> +</span><span id="Python-430"><a href="#Python-430"><span class="linenos">430</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Or</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">binary</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="s2">"or"</span><span class="p">),</span> +</span><span id="Python-431"><a href="#Python-431"><span class="linenos">431</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Ordered</span><span class="p">:</span> <span class="n">_ordered_py</span><span class="p">,</span> +</span><span id="Python-432"><a href="#Python-432"><span class="linenos">432</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Star</span><span class="p">:</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_</span><span class="p">:</span> <span class="s2">"1"</span><span class="p">,</span> +</span><span id="Python-433"><a href="#Python-433"><span class="linenos">433</span></a> <span class="p">}</span> </span></pre></div> @@ -1555,8 +1565,8 @@ </div> <a class="headerlink" href="#Python.Tokenizer"></a> - <div class="pdoc-code codehilite"><pre><span></span><span id="Python.Tokenizer-399"><a href="#Python.Tokenizer-399"><span class="linenos">399</span></a> <span class="k">class</span> <span class="nc">Tokenizer</span><span class="p">(</span><span class="n">tokens</span><span class="o">.</span><span class="n">Tokenizer</span><span class="p">):</span> -</span><span id="Python.Tokenizer-400"><a href="#Python.Tokenizer-400"><span class="linenos">400</span></a> <span class="n">STRING_ESCAPES</span> <span class="o">=</span> <span class="p">[</span><span class="s2">"</span><span class="se">\\</span><span class="s2">"</span><span class="p">]</span> + <div class="pdoc-code codehilite"><pre><span></span><span id="Python.Tokenizer-407"><a href="#Python.Tokenizer-407"><span class="linenos">407</span></a> <span class="k">class</span> <span class="nc">Tokenizer</span><span class="p">(</span><span class="n">tokens</span><span class="o">.</span><span class="n">Tokenizer</span><span class="p">):</span> +</span><span id="Python.Tokenizer-408"><a href="#Python.Tokenizer-408"><span class="linenos">408</span></a> <span class="n">STRING_ESCAPES</span> <span class="o">=</span> <span class="p">[</span><span class="s2">"</span><span class="se">\\</span><span class="s2">"</span><span class="p">]</span> </span></pre></div> @@ -1584,29 +1594,30 @@ </div> <a class="headerlink" href="#Python.Generator"></a> - <div class="pdoc-code codehilite"><pre><span></span><span id="Python.Generator-402"><a href="#Python.Generator-402"><span class="linenos">402</span></a> <span class="k">class</span> <span class="nc">Generator</span><span class="p">(</span><span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="p">):</span> -</span><span id="Python.Generator-403"><a href="#Python.Generator-403"><span class="linenos">403</span></a> <span class="n">TRANSFORMS</span> <span class="o">=</span> <span class="p">{</span> -</span><span id="Python.Generator-404"><a href="#Python.Generator-404"><span class="linenos">404</span></a> <span class="o">**</span><span class="p">{</span><span class="n">klass</span><span class="p">:</span> <span class="n">_rename</span> <span class="k">for</span> <span class="n">klass</span> <span class="ow">in</span> <span class="n">subclasses</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="vm">__name__</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Binary</span><span class="p">)},</span> -</span><span id="Python.Generator-405"><a href="#Python.Generator-405"><span class="linenos">405</span></a> <span class="o">**</span><span class="p">{</span><span class="n">klass</span><span class="p">:</span> <span class="n">_rename</span> <span class="k">for</span> <span class="n">klass</span> <span class="ow">in</span> <span class="n">exp</span><span class="o">.</span><span class="n">ALL_FUNCTIONS</span><span class="p">},</span> -</span><span id="Python.Generator-406"><a href="#Python.Generator-406"><span class="linenos">406</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Case</span><span class="p">:</span> <span class="n">_case_sql</span><span class="p">,</span> -</span><span id="Python.Generator-407"><a href="#Python.Generator-407"><span class="linenos">407</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Alias</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">sql</span><span class="p">(</span><span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">),</span> -</span><span id="Python.Generator-408"><a href="#Python.Generator-408"><span class="linenos">408</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Array</span><span class="p">:</span> <span class="n">inline_array_sql</span><span class="p">,</span> -</span><span id="Python.Generator-409"><a href="#Python.Generator-409"><span class="linenos">409</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">And</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">binary</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="s2">"and"</span><span class="p">),</span> -</span><span id="Python.Generator-410"><a href="#Python.Generator-410"><span class="linenos">410</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Between</span><span class="p">:</span> <span class="n">_rename</span><span class="p">,</span> -</span><span id="Python.Generator-411"><a href="#Python.Generator-411"><span class="linenos">411</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Boolean</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="s2">"True"</span> <span class="k">if</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span> <span class="k">else</span> <span class="s2">"False"</span><span class="p">,</span> -</span><span id="Python.Generator-412"><a href="#Python.Generator-412"><span class="linenos">412</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Cast</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="sa">f</span><span class="s2">"CAST(</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">e</span><span class="o">.</span><span class="n">this</span><span class="p">)</span><span class="si">}</span><span class="s2">, exp.DataType.Type.</span><span class="si">{</span><span class="n">e</span><span class="o">.</span><span class="n">args</span><span class="p">[</span><span class="s1">'to'</span><span class="p">]</span><span class="si">}</span><span class="s2">)"</span><span class="p">,</span> -</span><span id="Python.Generator-413"><a href="#Python.Generator-413"><span class="linenos">413</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Column</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="sa">f</span><span class="s2">"scope[</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">e</span><span class="p">,</span><span class="w"> </span><span class="s1">'table'</span><span class="p">)</span><span class="w"> </span><span class="ow">or</span><span class="w"> </span><span class="kc">None</span><span class="si">}</span><span class="s2">][</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">e</span><span class="o">.</span><span class="n">this</span><span class="p">)</span><span class="si">}</span><span class="s2">]"</span><span class="p">,</span> -</span><span id="Python.Generator-414"><a href="#Python.Generator-414"><span class="linenos">414</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Distinct</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="sa">f</span><span class="s2">"set(</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">e</span><span class="p">,</span><span class="w"> </span><span class="s1">'this'</span><span class="p">)</span><span class="si">}</span><span class="s2">)"</span><span class="p">,</span> -</span><span id="Python.Generator-415"><a href="#Python.Generator-415"><span class="linenos">415</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Extract</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="sa">f</span><span class="s2">"EXTRACT('</span><span class="si">{</span><span class="n">e</span><span class="o">.</span><span class="n">name</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span><span class="si">}</span><span class="s2">', </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">e</span><span class="p">,</span><span class="w"> </span><span class="s1">'expression'</span><span class="p">)</span><span class="si">}</span><span class="s2">)"</span><span class="p">,</span> -</span><span id="Python.Generator-416"><a href="#Python.Generator-416"><span class="linenos">416</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">In</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="sa">f</span><span class="s2">"</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">e</span><span class="p">,</span><span class="w"> </span><span class="s1">'this'</span><span class="p">)</span><span class="si">}</span><span class="s2"> in (</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span><span class="si">}</span><span class="s2">)"</span><span class="p">,</span> -</span><span id="Python.Generator-417"><a href="#Python.Generator-417"><span class="linenos">417</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Is</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">binary</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="s2">"is"</span><span class="p">),</span> -</span><span id="Python.Generator-418"><a href="#Python.Generator-418"><span class="linenos">418</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Lambda</span><span class="p">:</span> <span class="n">_lambda_sql</span><span class="p">,</span> -</span><span id="Python.Generator-419"><a href="#Python.Generator-419"><span class="linenos">419</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Not</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="sa">f</span><span class="s2">"not </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">e</span><span class="o">.</span><span class="n">this</span><span class="p">)</span><span class="si">}</span><span class="s2">"</span><span class="p">,</span> -</span><span id="Python.Generator-420"><a href="#Python.Generator-420"><span class="linenos">420</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Null</span><span class="p">:</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_</span><span class="p">:</span> <span class="s2">"None"</span><span class="p">,</span> -</span><span id="Python.Generator-421"><a href="#Python.Generator-421"><span class="linenos">421</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Or</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">binary</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="s2">"or"</span><span class="p">),</span> -</span><span id="Python.Generator-422"><a href="#Python.Generator-422"><span class="linenos">422</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Ordered</span><span class="p">:</span> <span class="n">_ordered_py</span><span class="p">,</span> -</span><span id="Python.Generator-423"><a href="#Python.Generator-423"><span class="linenos">423</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Star</span><span class="p">:</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_</span><span class="p">:</span> <span class="s2">"1"</span><span class="p">,</span> -</span><span id="Python.Generator-424"><a href="#Python.Generator-424"><span class="linenos">424</span></a> <span class="p">}</span> + <div class="pdoc-code codehilite"><pre><span></span><span id="Python.Generator-410"><a href="#Python.Generator-410"><span class="linenos">410</span></a> <span class="k">class</span> <span class="nc">Generator</span><span class="p">(</span><span class="n">generator</span><span class="o">.</span><span class="n">Generator</span><span class="p">):</span> +</span><span id="Python.Generator-411"><a href="#Python.Generator-411"><span class="linenos">411</span></a> <span class="n">TRANSFORMS</span> <span class="o">=</span> <span class="p">{</span> +</span><span id="Python.Generator-412"><a href="#Python.Generator-412"><span class="linenos">412</span></a> <span class="o">**</span><span class="p">{</span><span class="n">klass</span><span class="p">:</span> <span class="n">_rename</span> <span class="k">for</span> <span class="n">klass</span> <span class="ow">in</span> <span class="n">subclasses</span><span class="p">(</span><span class="n">exp</span><span class="o">.</span><span class="vm">__name__</span><span class="p">,</span> <span class="n">exp</span><span class="o">.</span><span class="n">Binary</span><span class="p">)},</span> +</span><span id="Python.Generator-413"><a href="#Python.Generator-413"><span class="linenos">413</span></a> <span class="o">**</span><span class="p">{</span><span class="n">klass</span><span class="p">:</span> <span class="n">_rename</span> <span class="k">for</span> <span class="n">klass</span> <span class="ow">in</span> <span class="n">exp</span><span class="o">.</span><span class="n">ALL_FUNCTIONS</span><span class="p">},</span> +</span><span id="Python.Generator-414"><a href="#Python.Generator-414"><span class="linenos">414</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Case</span><span class="p">:</span> <span class="n">_case_sql</span><span class="p">,</span> +</span><span id="Python.Generator-415"><a href="#Python.Generator-415"><span class="linenos">415</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Alias</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">sql</span><span class="p">(</span><span class="n">e</span><span class="o">.</span><span class="n">this</span><span class="p">),</span> +</span><span id="Python.Generator-416"><a href="#Python.Generator-416"><span class="linenos">416</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Array</span><span class="p">:</span> <span class="n">inline_array_sql</span><span class="p">,</span> +</span><span id="Python.Generator-417"><a href="#Python.Generator-417"><span class="linenos">417</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">And</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">binary</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="s2">"and"</span><span class="p">),</span> +</span><span id="Python.Generator-418"><a href="#Python.Generator-418"><span class="linenos">418</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Between</span><span class="p">:</span> <span class="n">_rename</span><span class="p">,</span> +</span><span id="Python.Generator-419"><a href="#Python.Generator-419"><span class="linenos">419</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Boolean</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="s2">"True"</span> <span class="k">if</span> <span class="n">e</span><span class="o">.</span><span class="n">this</span> <span class="k">else</span> <span class="s2">"False"</span><span class="p">,</span> +</span><span id="Python.Generator-420"><a href="#Python.Generator-420"><span class="linenos">420</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Cast</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="sa">f</span><span class="s2">"CAST(</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">e</span><span class="o">.</span><span class="n">this</span><span class="p">)</span><span class="si">}</span><span class="s2">, exp.DataType.Type.</span><span class="si">{</span><span class="n">e</span><span class="o">.</span><span class="n">args</span><span class="p">[</span><span class="s1">'to'</span><span class="p">]</span><span class="si">}</span><span class="s2">)"</span><span class="p">,</span> +</span><span id="Python.Generator-421"><a href="#Python.Generator-421"><span class="linenos">421</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Column</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="sa">f</span><span class="s2">"scope[</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">e</span><span class="p">,</span><span class="w"> </span><span class="s1">'table'</span><span class="p">)</span><span class="w"> </span><span class="ow">or</span><span class="w"> </span><span class="kc">None</span><span class="si">}</span><span class="s2">][</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">e</span><span class="o">.</span><span class="n">this</span><span class="p">)</span><span class="si">}</span><span class="s2">]"</span><span class="p">,</span> +</span><span id="Python.Generator-422"><a href="#Python.Generator-422"><span class="linenos">422</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Distinct</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="sa">f</span><span class="s2">"set(</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">e</span><span class="p">,</span><span class="w"> </span><span class="s1">'this'</span><span class="p">)</span><span class="si">}</span><span class="s2">)"</span><span class="p">,</span> +</span><span id="Python.Generator-423"><a href="#Python.Generator-423"><span class="linenos">423</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Extract</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="sa">f</span><span class="s2">"EXTRACT('</span><span class="si">{</span><span class="n">e</span><span class="o">.</span><span class="n">name</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span><span class="si">}</span><span class="s2">', </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">e</span><span class="p">,</span><span class="w"> </span><span class="s1">'expression'</span><span class="p">)</span><span class="si">}</span><span class="s2">)"</span><span class="p">,</span> +</span><span id="Python.Generator-424"><a href="#Python.Generator-424"><span class="linenos">424</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">In</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="sa">f</span><span class="s2">"</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">e</span><span class="p">,</span><span class="w"> </span><span class="s1">'this'</span><span class="p">)</span><span class="si">}</span><span class="s2"> in (</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">expressions</span><span class="p">(</span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="n">flat</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span><span class="si">}</span><span class="s2">)"</span><span class="p">,</span> +</span><span id="Python.Generator-425"><a href="#Python.Generator-425"><span class="linenos">425</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Interval</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="sa">f</span><span class="s2">"INTERVAL(</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">e</span><span class="o">.</span><span class="n">this</span><span class="p">)</span><span class="si">}</span><span class="s2">, '</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">e</span><span class="o">.</span><span class="n">unit</span><span class="p">)</span><span class="si">}</span><span class="s2">')"</span><span class="p">,</span> +</span><span id="Python.Generator-426"><a href="#Python.Generator-426"><span class="linenos">426</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Is</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">binary</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="s2">"is"</span><span class="p">),</span> +</span><span id="Python.Generator-427"><a href="#Python.Generator-427"><span class="linenos">427</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Lambda</span><span class="p">:</span> <span class="n">_lambda_sql</span><span class="p">,</span> +</span><span id="Python.Generator-428"><a href="#Python.Generator-428"><span class="linenos">428</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Not</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="sa">f</span><span class="s2">"not </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">e</span><span class="o">.</span><span class="n">this</span><span class="p">)</span><span class="si">}</span><span class="s2">"</span><span class="p">,</span> +</span><span id="Python.Generator-429"><a href="#Python.Generator-429"><span class="linenos">429</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Null</span><span class="p">:</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_</span><span class="p">:</span> <span class="s2">"None"</span><span class="p">,</span> +</span><span id="Python.Generator-430"><a href="#Python.Generator-430"><span class="linenos">430</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Or</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">binary</span><span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="s2">"or"</span><span class="p">),</span> +</span><span id="Python.Generator-431"><a href="#Python.Generator-431"><span class="linenos">431</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Ordered</span><span class="p">:</span> <span class="n">_ordered_py</span><span class="p">,</span> +</span><span id="Python.Generator-432"><a href="#Python.Generator-432"><span class="linenos">432</span></a> <span class="n">exp</span><span class="o">.</span><span class="n">Star</span><span class="p">:</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">_</span><span class="p">:</span> <span class="s2">"1"</span><span class="p">,</span> +</span><span id="Python.Generator-433"><a href="#Python.Generator-433"><span class="linenos">433</span></a> <span class="p">}</span> </span></pre></div> @@ -1623,6 +1634,14 @@ represents a python time format and the output the target time format</li> <li><strong>quote_end (str):</strong> specifies which ending character to use to delimit quotes. Default: '.</li> <li><strong>identifier_start (str):</strong> specifies which starting character to use to delimit identifiers. Default: ".</li> <li><strong>identifier_end (str):</strong> specifies which ending character to use to delimit identifiers. Default: ".</li> +<li><strong>bit_start (str):</strong> specifies which starting character to use to delimit bit literals. Default: None.</li> +<li><strong>bit_end (str):</strong> specifies which ending character to use to delimit bit literals. Default: None.</li> +<li><strong>hex_start (str):</strong> specifies which starting character to use to delimit hex literals. Default: None.</li> +<li><strong>hex_end (str):</strong> specifies which ending character to use to delimit hex literals. Default: None.</li> +<li><strong>byte_start (str):</strong> specifies which starting character to use to delimit byte literals. Default: None.</li> +<li><strong>byte_end (str):</strong> specifies which ending character to use to delimit byte literals. Default: None.</li> +<li><strong>raw_start (str):</strong> specifies which starting character to use to delimit raw literals. Default: None.</li> +<li><strong>raw_end (str):</strong> specifies which ending character to use to delimit raw literals. Default: None.</li> <li><strong>identify (bool | str):</strong> 'always': always quote, 'safe': quote identifiers if they don't contain an upcase, True defaults to always.</li> <li><strong>normalize (bool):</strong> if set to True all identifiers will lower cased</li> <li><strong>string_escape (str):</strong> specifies a string escape character. Default: '.</li> @@ -1684,6 +1703,7 @@ Default: True</li> <dd id="Python.Generator.primarykeycolumnconstraint_sql" class="function"><a href="../generator.html#Generator.primarykeycolumnconstraint_sql">primarykeycolumnconstraint_sql</a></dd> <dd id="Python.Generator.uniquecolumnconstraint_sql" class="function"><a href="../generator.html#Generator.uniquecolumnconstraint_sql">uniquecolumnconstraint_sql</a></dd> <dd id="Python.Generator.create_sql" class="function"><a href="../generator.html#Generator.create_sql">create_sql</a></dd> + <dd id="Python.Generator.clone_sql" class="function"><a href="../generator.html#Generator.clone_sql">clone_sql</a></dd> <dd id="Python.Generator.describe_sql" class="function"><a href="../generator.html#Generator.describe_sql">describe_sql</a></dd> <dd id="Python.Generator.prepend_ctes" class="function"><a href="../generator.html#Generator.prepend_ctes">prepend_ctes</a></dd> <dd id="Python.Generator.with_sql" class="function"><a href="../generator.html#Generator.with_sql">with_sql</a></dd> @@ -1692,6 +1712,8 @@ Default: True</li> <dd id="Python.Generator.bitstring_sql" class="function"><a href="../generator.html#Generator.bitstring_sql">bitstring_sql</a></dd> <dd id="Python.Generator.hexstring_sql" class="function"><a href="../generator.html#Generator.hexstring_sql">hexstring_sql</a></dd> <dd id="Python.Generator.bytestring_sql" class="function"><a href="../generator.html#Generator.bytestring_sql">bytestring_sql</a></dd> + <dd id="Python.Generator.rawstring_sql" class="function"><a href="../generator.html#Generator.rawstring_sql">rawstring_sql</a></dd> + <dd id="Python.Generator.datatypesize_sql" class="function"><a href="../generator.html#Generator.datatypesize_sql">datatypesize_sql</a></dd> <dd id="Python.Generator.datatype_sql" class="function"><a href="../generator.html#Generator.datatype_sql">datatype_sql</a></dd> <dd id="Python.Generator.directory_sql" class="function"><a href="../generator.html#Generator.directory_sql">directory_sql</a></dd> <dd id="Python.Generator.delete_sql" class="function"><a href="../generator.html#Generator.delete_sql">delete_sql</a></dd> @@ -1716,7 +1738,6 @@ Default: True</li> <dd id="Python.Generator.fallbackproperty_sql" class="function"><a href="../generator.html#Generator.fallbackproperty_sql">fallbackproperty_sql</a></dd> <dd id="Python.Generator.journalproperty_sql" class="function"><a href="../generator.html#Generator.journalproperty_sql">journalproperty_sql</a></dd> <dd id="Python.Generator.freespaceproperty_sql" class="function"><a href="../generator.html#Generator.freespaceproperty_sql">freespaceproperty_sql</a></dd> - <dd id="Python.Generator.afterjournalproperty_sql" class="function"><a href="../generator.html#Generator.afterjournalproperty_sql">afterjournalproperty_sql</a></dd> <dd id="Python.Generator.checksumproperty_sql" class="function"><a href="../generator.html#Generator.checksumproperty_sql">checksumproperty_sql</a></dd> <dd id="Python.Generator.mergeblockratioproperty_sql" class="function"><a href="../generator.html#Generator.mergeblockratioproperty_sql">mergeblockratioproperty_sql</a></dd> <dd id="Python.Generator.datablocksizeproperty_sql" class="function"><a href="../generator.html#Generator.datablocksizeproperty_sql">datablocksizeproperty_sql</a></dd> @@ -1763,10 +1784,11 @@ Default: True</li> <dd id="Python.Generator.ordered_sql" class="function"><a href="../generator.html#Generator.ordered_sql">ordered_sql</a></dd> <dd id="Python.Generator.matchrecognize_sql" class="function"><a href="../generator.html#Generator.matchrecognize_sql">matchrecognize_sql</a></dd> <dd id="Python.Generator.query_modifiers" class="function"><a href="../generator.html#Generator.query_modifiers">query_modifiers</a></dd> + <dd id="Python.Generator.after_having_modifiers" class="function"><a href="../generator.html#Generator.after_having_modifiers">after_having_modifiers</a></dd> + <dd id="Python.Generator.after_limit_modifiers" class="function"><a href="../generator.html#Generator.after_limit_modifiers">after_limit_modifiers</a></dd> <dd id="Python.Generator.select_sql" class="function"><a href="../generator.html#Generator.select_sql">select_sql</a></dd> <dd id="Python.Generator.schema_sql" class="function"><a href="../generator.html#Generator.schema_sql">schema_sql</a></dd> <dd id="Python.Generator.star_sql" class="function"><a href="../generator.html#Generator.star_sql">star_sql</a></dd> - <dd id="Python.Generator.structkwarg_sql" class="function"><a href="../generator.html#Generator.structkwarg_sql">structkwarg_sql</a></dd> <dd id="Python.Generator.parameter_sql" class="function"><a href="../generator.html#Generator.parameter_sql">parameter_sql</a></dd> <dd id="Python.Generator.sessionparameter_sql" class="function"><a href="../generator.html#Generator.sessionparameter_sql">sessionparameter_sql</a></dd> <dd id="Python.Generator.placeholder_sql" class="function"><a href="../generator.html#Generator.placeholder_sql">placeholder_sql</a></dd> @@ -1799,6 +1821,8 @@ Default: True</li> <dd id="Python.Generator.matchagainst_sql" class="function"><a href="../generator.html#Generator.matchagainst_sql">matchagainst_sql</a></dd> <dd id="Python.Generator.jsonkeyvalue_sql" class="function"><a href="../generator.html#Generator.jsonkeyvalue_sql">jsonkeyvalue_sql</a></dd> <dd id="Python.Generator.jsonobject_sql" class="function"><a href="../generator.html#Generator.jsonobject_sql">jsonobject_sql</a></dd> + <dd id="Python.Generator.openjsoncolumndef_sql" class="function"><a href="../generator.html#Generator.openjsoncolumndef_sql">openjsoncolumndef_sql</a></dd> + <dd id="Python.Generator.openjson_sql" class="function"><a href="../generator.html#Generator.openjson_sql">openjson_sql</a></dd> <dd id="Python.Generator.in_sql" class="function"><a href="../generator.html#Generator.in_sql">in_sql</a></dd> <dd id="Python.Generator.in_unnest_op" class="function"><a href="../generator.html#Generator.in_unnest_op">in_unnest_op</a></dd> <dd id="Python.Generator.interval_sql" class="function"><a href="../generator.html#Generator.interval_sql">interval_sql</a></dd> @@ -1825,6 +1849,8 @@ Default: True</li> <dd id="Python.Generator.collate_sql" class="function"><a href="../generator.html#Generator.collate_sql">collate_sql</a></dd> <dd id="Python.Generator.command_sql" class="function"><a href="../generator.html#Generator.command_sql">command_sql</a></dd> <dd id="Python.Generator.comment_sql" class="function"><a href="../generator.html#Generator.comment_sql">comment_sql</a></dd> + <dd id="Python.Generator.mergetreettlaction_sql" class="function"><a href="../generator.html#Generator.mergetreettlaction_sql">mergetreettlaction_sql</a></dd> + <dd id="Python.Generator.mergetreettl_sql" class="function"><a href="../generator.html#Generator.mergetreettl_sql">mergetreettl_sql</a></dd> <dd id="Python.Generator.transaction_sql" class="function"><a href="../generator.html#Generator.transaction_sql">transaction_sql</a></dd> <dd id="Python.Generator.commit_sql" class="function"><a href="../generator.html#Generator.commit_sql">commit_sql</a></dd> <dd id="Python.Generator.rollback_sql" class="function"><a href="../generator.html#Generator.rollback_sql">rollback_sql</a></dd> |