diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-06-22 18:53:31 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-06-22 18:53:31 +0000 |
commit | 20d090151fbc2e75394fc456f49f0078e59752d8 (patch) | |
tree | 084494962f092ff80f5ef8fdba1b917206abbc83 /docs/sqlglot/dialects/spark2.html | |
parent | Adding upstream version 16.2.1. (diff) | |
download | sqlglot-20d090151fbc2e75394fc456f49f0078e59752d8.tar.xz sqlglot-20d090151fbc2e75394fc456f49f0078e59752d8.zip |
Adding upstream version 16.4.0.upstream/16.4.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'docs/sqlglot/dialects/spark2.html')
-rw-r--r-- | docs/sqlglot/dialects/spark2.html | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/docs/sqlglot/dialects/spark2.html b/docs/sqlglot/dialects/spark2.html index 5e87bc5..0a6a1e4 100644 --- a/docs/sqlglot/dialects/spark2.html +++ b/docs/sqlglot/dialects/spark2.html @@ -48,6 +48,9 @@ <li> <a class="function" href="#Spark2.Generator.columndef_sql">columndef_sql</a> </li> + <li> + <a class="function" href="#Spark2.Generator.can_identify">can_identify</a> + </li> </ul> </li> @@ -509,6 +512,10 @@ <div><dt><a href="dialect.html#Dialect">sqlglot.dialects.dialect.Dialect</a></dt> <dd id="Spark2.get_or_raise" class="function"><a href="dialect.html#Dialect.get_or_raise">get_or_raise</a></dd> <dd id="Spark2.format_time" class="function"><a href="dialect.html#Dialect.format_time">format_time</a></dd> + <dd id="Spark2.normalize_identifier" class="function"><a href="dialect.html#Dialect.normalize_identifier">normalize_identifier</a></dd> + <dd id="Spark2.case_sensitive" class="function"><a href="dialect.html#Dialect.case_sensitive">case_sensitive</a></dd> + <dd id="Spark2.can_identify" class="function"><a href="dialect.html#Dialect.can_identify">can_identify</a></dd> + <dd id="Spark2.quote_identifier" class="function"><a href="dialect.html#Dialect.quote_identifier">quote_identifier</a></dd> <dd id="Spark2.parse" class="function"><a href="dialect.html#Dialect.parse">parse</a></dd> <dd id="Spark2.parse_into" class="function"><a href="dialect.html#Dialect.parse_into">parse_into</a></dd> <dd id="Spark2.generate" class="function"><a href="dialect.html#Dialect.generate">generate</a></dd> @@ -814,6 +821,60 @@ Default: True</li> </div> + <div id="Spark2.Generator.can_identify" class="classattr"> + <input id="Spark2.Generator.can_identify-view-source" class="view-source-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1"> +<div class="attr function"> + <div class="decorator">@classmethod</div> + + <span class="def">def</span> + <span class="name">can_identify</span><span class="signature pdoc-code condensed">(<span class="param"><span class="n">text</span><span class="p">:</span> <span class="nb">str</span>, </span><span class="param"><span class="n">identify</span><span class="p">:</span> <span class="nb">str</span> <span class="o">|</span> <span class="nb">bool</span> <span class="o">=</span> <span class="s1">'safe'</span></span><span class="return-annotation">) -> <span class="nb">bool</span>:</span></span> + + <label class="view-source-button" for="Spark2.Generator.can_identify-view-source"><span>View Source</span></label> + + </div> + <a class="headerlink" href="#Spark2.Generator.can_identify"></a> + <div class="pdoc-code codehilite"><pre><span></span><span id="Spark2.Generator.can_identify-247"><a href="#Spark2.Generator.can_identify-247"><span class="linenos">247</span></a> <span class="nd">@classmethod</span> +</span><span id="Spark2.Generator.can_identify-248"><a href="#Spark2.Generator.can_identify-248"><span class="linenos">248</span></a> <span class="k">def</span> <span class="nf">can_identify</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">text</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">identify</span><span class="p">:</span> <span class="nb">str</span> <span class="o">|</span> <span class="nb">bool</span> <span class="o">=</span> <span class="s2">"safe"</span><span class="p">)</span> <span class="o">-></span> <span class="nb">bool</span><span class="p">:</span> +</span><span id="Spark2.Generator.can_identify-249"><a href="#Spark2.Generator.can_identify-249"><span class="linenos">249</span></a><span class="w"> </span><span class="sd">"""Checks if text can be identified given an identify option.</span> +</span><span id="Spark2.Generator.can_identify-250"><a href="#Spark2.Generator.can_identify-250"><span class="linenos">250</span></a> +</span><span id="Spark2.Generator.can_identify-251"><a href="#Spark2.Generator.can_identify-251"><span class="linenos">251</span></a><span class="sd"> Args:</span> +</span><span id="Spark2.Generator.can_identify-252"><a href="#Spark2.Generator.can_identify-252"><span class="linenos">252</span></a><span class="sd"> text: The text to check.</span> +</span><span id="Spark2.Generator.can_identify-253"><a href="#Spark2.Generator.can_identify-253"><span class="linenos">253</span></a><span class="sd"> identify:</span> +</span><span id="Spark2.Generator.can_identify-254"><a href="#Spark2.Generator.can_identify-254"><span class="linenos">254</span></a><span class="sd"> "always" or `True`: Always returns true.</span> +</span><span id="Spark2.Generator.can_identify-255"><a href="#Spark2.Generator.can_identify-255"><span class="linenos">255</span></a><span class="sd"> "safe": True if the identifier is case-insensitive.</span> +</span><span id="Spark2.Generator.can_identify-256"><a href="#Spark2.Generator.can_identify-256"><span class="linenos">256</span></a> +</span><span id="Spark2.Generator.can_identify-257"><a href="#Spark2.Generator.can_identify-257"><span class="linenos">257</span></a><span class="sd"> Returns:</span> +</span><span id="Spark2.Generator.can_identify-258"><a href="#Spark2.Generator.can_identify-258"><span class="linenos">258</span></a><span class="sd"> Whether or not the given text can be identified.</span> +</span><span id="Spark2.Generator.can_identify-259"><a href="#Spark2.Generator.can_identify-259"><span class="linenos">259</span></a><span class="sd"> """</span> +</span><span id="Spark2.Generator.can_identify-260"><a href="#Spark2.Generator.can_identify-260"><span class="linenos">260</span></a> <span class="k">if</span> <span class="n">identify</span> <span class="ow">is</span> <span class="kc">True</span> <span class="ow">or</span> <span class="n">identify</span> <span class="o">==</span> <span class="s2">"always"</span><span class="p">:</span> +</span><span id="Spark2.Generator.can_identify-261"><a href="#Spark2.Generator.can_identify-261"><span class="linenos">261</span></a> <span class="k">return</span> <span class="kc">True</span> +</span><span id="Spark2.Generator.can_identify-262"><a href="#Spark2.Generator.can_identify-262"><span class="linenos">262</span></a> +</span><span id="Spark2.Generator.can_identify-263"><a href="#Spark2.Generator.can_identify-263"><span class="linenos">263</span></a> <span class="k">if</span> <span class="n">identify</span> <span class="o">==</span> <span class="s2">"safe"</span><span class="p">:</span> +</span><span id="Spark2.Generator.can_identify-264"><a href="#Spark2.Generator.can_identify-264"><span class="linenos">264</span></a> <span class="k">return</span> <span class="ow">not</span> <span class="bp">cls</span><span class="o">.</span><span class="n">case_sensitive</span><span class="p">(</span><span class="n">text</span><span class="p">)</span> +</span><span id="Spark2.Generator.can_identify-265"><a href="#Spark2.Generator.can_identify-265"><span class="linenos">265</span></a> +</span><span id="Spark2.Generator.can_identify-266"><a href="#Spark2.Generator.can_identify-266"><span class="linenos">266</span></a> <span class="k">return</span> <span class="kc">False</span> +</span></pre></div> + + + <div class="docstring"><p>Checks if text can be identified given an identify option.</p> + +<h6 id="arguments">Arguments:</h6> + +<ul> +<li><strong>text:</strong> The text to check.</li> +<li><strong>identify:</strong> "always" or <code>True</code>: Always returns true. +"safe": True if the identifier is case-insensitive.</li> +</ul> + +<h6 id="returns">Returns:</h6> + +<blockquote> + <p>Whether or not the given text can be identified.</p> +</blockquote> +</div> + + + </div> <div class="inherited"> <h5>Inherited Members</h5> <dl> @@ -913,6 +974,7 @@ Default: True</li> <dd id="Spark2.Generator.pragma_sql" class="function"><a href="../generator.html#Generator.pragma_sql">pragma_sql</a></dd> <dd id="Spark2.Generator.lock_sql" class="function"><a href="../generator.html#Generator.lock_sql">lock_sql</a></dd> <dd id="Spark2.Generator.literal_sql" class="function"><a href="../generator.html#Generator.literal_sql">literal_sql</a></dd> + <dd id="Spark2.Generator.escape_str" class="function"><a href="../generator.html#Generator.escape_str">escape_str</a></dd> <dd id="Spark2.Generator.loaddata_sql" class="function"><a href="../generator.html#Generator.loaddata_sql">loaddata_sql</a></dd> <dd id="Spark2.Generator.null_sql" class="function"><a href="../generator.html#Generator.null_sql">null_sql</a></dd> <dd id="Spark2.Generator.boolean_sql" class="function"><a href="../generator.html#Generator.boolean_sql">boolean_sql</a></dd> |