diff options
Diffstat (limited to 'docs/sqlglot/executor')
-rw-r--r-- | docs/sqlglot/executor/python.html | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/docs/sqlglot/executor/python.html b/docs/sqlglot/executor/python.html index d54561d..796fce7 100644 --- a/docs/sqlglot/executor/python.html +++ b/docs/sqlglot/executor/python.html @@ -96,6 +96,9 @@ <li> <a class="class" href="#Python.Generator">Python.Generator</a> <ul class="memberlist"> + <li> + <a class="function" href="#Python.Generator.can_identify">can_identify</a> + </li> </ul> </li> @@ -1542,6 +1545,10 @@ <div><dt><a href="../dialects/dialect.html#Dialect">sqlglot.dialects.dialect.Dialect</a></dt> <dd id="Python.get_or_raise" class="function"><a href="../dialects/dialect.html#Dialect.get_or_raise">get_or_raise</a></dd> <dd id="Python.format_time" class="function"><a href="../dialects/dialect.html#Dialect.format_time">format_time</a></dd> + <dd id="Python.normalize_identifier" class="function"><a href="../dialects/dialect.html#Dialect.normalize_identifier">normalize_identifier</a></dd> + <dd id="Python.case_sensitive" class="function"><a href="../dialects/dialect.html#Dialect.case_sensitive">case_sensitive</a></dd> + <dd id="Python.can_identify" class="function"><a href="../dialects/dialect.html#Dialect.can_identify">can_identify</a></dd> + <dd id="Python.quote_identifier" class="function"><a href="../dialects/dialect.html#Dialect.quote_identifier">quote_identifier</a></dd> <dd id="Python.parse" class="function"><a href="../dialects/dialect.html#Dialect.parse">parse</a></dd> <dd id="Python.parse_into" class="function"><a href="../dialects/dialect.html#Dialect.parse_into">parse_into</a></dd> <dd id="Python.generate" class="function"><a href="../dialects/dialect.html#Dialect.generate">generate</a></dd> @@ -1661,6 +1668,60 @@ Default: True</li> </div> + <div id="Python.Generator.can_identify" class="classattr"> + <input id="Python.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="Python.Generator.can_identify-view-source"><span>View Source</span></label> + + </div> + <a class="headerlink" href="#Python.Generator.can_identify"></a> + <div class="pdoc-code codehilite"><pre><span></span><span id="Python.Generator.can_identify-247"><a href="#Python.Generator.can_identify-247"><span class="linenos">247</span></a> <span class="nd">@classmethod</span> +</span><span id="Python.Generator.can_identify-248"><a href="#Python.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="Python.Generator.can_identify-249"><a href="#Python.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="Python.Generator.can_identify-250"><a href="#Python.Generator.can_identify-250"><span class="linenos">250</span></a> +</span><span id="Python.Generator.can_identify-251"><a href="#Python.Generator.can_identify-251"><span class="linenos">251</span></a><span class="sd"> Args:</span> +</span><span id="Python.Generator.can_identify-252"><a href="#Python.Generator.can_identify-252"><span class="linenos">252</span></a><span class="sd"> text: The text to check.</span> +</span><span id="Python.Generator.can_identify-253"><a href="#Python.Generator.can_identify-253"><span class="linenos">253</span></a><span class="sd"> identify:</span> +</span><span id="Python.Generator.can_identify-254"><a href="#Python.Generator.can_identify-254"><span class="linenos">254</span></a><span class="sd"> "always" or `True`: Always returns true.</span> +</span><span id="Python.Generator.can_identify-255"><a href="#Python.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="Python.Generator.can_identify-256"><a href="#Python.Generator.can_identify-256"><span class="linenos">256</span></a> +</span><span id="Python.Generator.can_identify-257"><a href="#Python.Generator.can_identify-257"><span class="linenos">257</span></a><span class="sd"> Returns:</span> +</span><span id="Python.Generator.can_identify-258"><a href="#Python.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="Python.Generator.can_identify-259"><a href="#Python.Generator.can_identify-259"><span class="linenos">259</span></a><span class="sd"> """</span> +</span><span id="Python.Generator.can_identify-260"><a href="#Python.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="Python.Generator.can_identify-261"><a href="#Python.Generator.can_identify-261"><span class="linenos">261</span></a> <span class="k">return</span> <span class="kc">True</span> +</span><span id="Python.Generator.can_identify-262"><a href="#Python.Generator.can_identify-262"><span class="linenos">262</span></a> +</span><span id="Python.Generator.can_identify-263"><a href="#Python.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="Python.Generator.can_identify-264"><a href="#Python.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="Python.Generator.can_identify-265"><a href="#Python.Generator.can_identify-265"><span class="linenos">265</span></a> +</span><span id="Python.Generator.can_identify-266"><a href="#Python.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> @@ -1763,6 +1824,7 @@ Default: True</li> <dd id="Python.Generator.pragma_sql" class="function"><a href="../generator.html#Generator.pragma_sql">pragma_sql</a></dd> <dd id="Python.Generator.lock_sql" class="function"><a href="../generator.html#Generator.lock_sql">lock_sql</a></dd> <dd id="Python.Generator.literal_sql" class="function"><a href="../generator.html#Generator.literal_sql">literal_sql</a></dd> + <dd id="Python.Generator.escape_str" class="function"><a href="../generator.html#Generator.escape_str">escape_str</a></dd> <dd id="Python.Generator.loaddata_sql" class="function"><a href="../generator.html#Generator.loaddata_sql">loaddata_sql</a></dd> <dd id="Python.Generator.null_sql" class="function"><a href="../generator.html#Generator.null_sql">null_sql</a></dd> <dd id="Python.Generator.boolean_sql" class="function"><a href="../generator.html#Generator.boolean_sql">boolean_sql</a></dd> |