diff options
Diffstat (limited to 'docs/sqlglot/dialects/presto.html')
-rw-r--r-- | docs/sqlglot/dialects/presto.html | 58 |
1 files changed, 37 insertions, 21 deletions
diff --git a/docs/sqlglot/dialects/presto.html b/docs/sqlglot/dialects/presto.html index 8e1374d..8480a52 100644 --- a/docs/sqlglot/dialects/presto.html +++ b/docs/sqlglot/dialects/presto.html @@ -79,6 +79,9 @@ <a class="variable" href="#Presto.Parser.STRICT_STRING_CONCAT">STRICT_STRING_CONCAT</a> </li> <li> + <a class="variable" href="#Presto.Parser.SUPPORTS_USER_DEFINED_TYPES">SUPPORTS_USER_DEFINED_TYPES</a> + </li> + <li> <a class="variable" href="#Presto.Parser.NULL_ORDERING">NULL_ORDERING</a> </li> <li> @@ -1229,6 +1232,7 @@ <dd id="Presto.ALIAS_POST_TABLESAMPLE" class="variable"><a href="dialect.html#Dialect.ALIAS_POST_TABLESAMPLE">ALIAS_POST_TABLESAMPLE</a></dd> <dd id="Presto.IDENTIFIERS_CAN_START_WITH_DIGIT" class="variable"><a href="dialect.html#Dialect.IDENTIFIERS_CAN_START_WITH_DIGIT">IDENTIFIERS_CAN_START_WITH_DIGIT</a></dd> <dd id="Presto.DPIPE_IS_STRING_CONCAT" class="variable"><a href="dialect.html#Dialect.DPIPE_IS_STRING_CONCAT">DPIPE_IS_STRING_CONCAT</a></dd> + <dd id="Presto.SUPPORTS_USER_DEFINED_TYPES" class="variable"><a href="dialect.html#Dialect.SUPPORTS_USER_DEFINED_TYPES">SUPPORTS_USER_DEFINED_TYPES</a></dd> <dd id="Presto.NORMALIZE_FUNCTIONS" class="variable"><a href="dialect.html#Dialect.NORMALIZE_FUNCTIONS">NORMALIZE_FUNCTIONS</a></dd> <dd id="Presto.DATE_FORMAT" class="variable"><a href="dialect.html#Dialect.DATE_FORMAT">DATE_FORMAT</a></dd> <dd id="Presto.DATEINT_FORMAT" class="variable"><a href="dialect.html#Dialect.DATEINT_FORMAT">DATEINT_FORMAT</a></dd> @@ -1433,7 +1437,7 @@ Default: 3</li> <div id="Presto.Parser.TOKENIZER_CLASS" class="classattr"> <div class="attr variable"> <span class="name">TOKENIZER_CLASS</span><span class="annotation">: Type[<a href="../tokens.html#Tokenizer">sqlglot.tokens.Tokenizer</a>]</span> = -<span class="default_value"><class '<a href="#Presto.Tokenizer">Presto.Tokenizer</a>'></span> +<span class="default_value"><class '<a href="trino.html#Trino.Tokenizer">sqlglot.dialects.trino.Trino.Tokenizer</a>'></span> </div> @@ -1466,6 +1470,18 @@ Default: 3</li> </div> + <div id="Presto.Parser.SUPPORTS_USER_DEFINED_TYPES" class="classattr"> + <div class="attr variable"> + <span class="name">SUPPORTS_USER_DEFINED_TYPES</span> = +<span class="default_value">False</span> + + + </div> + <a class="headerlink" href="#Presto.Parser.SUPPORTS_USER_DEFINED_TYPES"></a> + + + + </div> <div id="Presto.Parser.NULL_ORDERING" class="classattr"> <div class="attr variable"> <span class="name">NULL_ORDERING</span><span class="annotation">: str</span> = @@ -1606,6 +1622,7 @@ Default: 3</li> <dd id="Presto.Parser.WINDOW_ALIAS_TOKENS" class="variable"><a href="../parser.html#Parser.WINDOW_ALIAS_TOKENS">WINDOW_ALIAS_TOKENS</a></dd> <dd id="Presto.Parser.WINDOW_BEFORE_PAREN_TOKENS" class="variable"><a href="../parser.html#Parser.WINDOW_BEFORE_PAREN_TOKENS">WINDOW_BEFORE_PAREN_TOKENS</a></dd> <dd id="Presto.Parser.WINDOW_SIDES" class="variable"><a href="../parser.html#Parser.WINDOW_SIDES">WINDOW_SIDES</a></dd> + <dd id="Presto.Parser.FETCH_TOKENS" class="variable"><a href="../parser.html#Parser.FETCH_TOKENS">FETCH_TOKENS</a></dd> <dd id="Presto.Parser.ADD_CONSTRAINT_TOKENS" class="variable"><a href="../parser.html#Parser.ADD_CONSTRAINT_TOKENS">ADD_CONSTRAINT_TOKENS</a></dd> <dd id="Presto.Parser.DISTINCT_TOKENS" class="variable"><a href="../parser.html#Parser.DISTINCT_TOKENS">DISTINCT_TOKENS</a></dd> <dd id="Presto.Parser.STRICT_CAST" class="variable"><a href="../parser.html#Parser.STRICT_CAST">STRICT_CAST</a></dd> @@ -1614,7 +1631,6 @@ Default: 3</li> <dd id="Presto.Parser.IDENTIFY_PIVOT_STRINGS" class="variable"><a href="../parser.html#Parser.IDENTIFY_PIVOT_STRINGS">IDENTIFY_PIVOT_STRINGS</a></dd> <dd id="Presto.Parser.LOG_BASE_FIRST" class="variable"><a href="../parser.html#Parser.LOG_BASE_FIRST">LOG_BASE_FIRST</a></dd> <dd id="Presto.Parser.LOG_DEFAULTS_TO_LN" class="variable"><a href="../parser.html#Parser.LOG_DEFAULTS_TO_LN">LOG_DEFAULTS_TO_LN</a></dd> - <dd id="Presto.Parser.SUPPORTS_USER_DEFINED_TYPES" class="variable"><a href="../parser.html#Parser.SUPPORTS_USER_DEFINED_TYPES">SUPPORTS_USER_DEFINED_TYPES</a></dd> <dd id="Presto.Parser.ALTER_TABLE_ADD_COLUMN_KEYWORD" class="variable"><a href="../parser.html#Parser.ALTER_TABLE_ADD_COLUMN_KEYWORD">ALTER_TABLE_ADD_COLUMN_KEYWORD</a></dd> <dd id="Presto.Parser.TABLESAMPLE_CSV" class="variable"><a href="../parser.html#Parser.TABLESAMPLE_CSV">TABLESAMPLE_CSV</a></dd> <dd id="Presto.Parser.UNNEST_COLUMN_ONLY" class="variable"><a href="../parser.html#Parser.UNNEST_COLUMN_ONLY">UNNEST_COLUMN_ONLY</a></dd> @@ -2179,26 +2195,26 @@ Default: True</li> </div> <a class="headerlink" href="#Presto.Generator.can_identify"></a> - <div class="pdoc-code codehilite"><pre><span></span><span id="Presto.Generator.can_identify-257"><a href="#Presto.Generator.can_identify-257"><span class="linenos">257</span></a> <span class="nd">@classmethod</span> -</span><span id="Presto.Generator.can_identify-258"><a href="#Presto.Generator.can_identify-258"><span class="linenos">258</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="Presto.Generator.can_identify-259"><a href="#Presto.Generator.can_identify-259"><span class="linenos">259</span></a><span class="w"> </span><span class="sd">"""Checks if text can be identified given an identify option.</span> -</span><span id="Presto.Generator.can_identify-260"><a href="#Presto.Generator.can_identify-260"><span class="linenos">260</span></a> -</span><span id="Presto.Generator.can_identify-261"><a href="#Presto.Generator.can_identify-261"><span class="linenos">261</span></a><span class="sd"> Args:</span> -</span><span id="Presto.Generator.can_identify-262"><a href="#Presto.Generator.can_identify-262"><span class="linenos">262</span></a><span class="sd"> text: The text to check.</span> -</span><span id="Presto.Generator.can_identify-263"><a href="#Presto.Generator.can_identify-263"><span class="linenos">263</span></a><span class="sd"> identify:</span> -</span><span id="Presto.Generator.can_identify-264"><a href="#Presto.Generator.can_identify-264"><span class="linenos">264</span></a><span class="sd"> "always" or `True`: Always returns true.</span> -</span><span id="Presto.Generator.can_identify-265"><a href="#Presto.Generator.can_identify-265"><span class="linenos">265</span></a><span class="sd"> "safe": True if the identifier is case-insensitive.</span> -</span><span id="Presto.Generator.can_identify-266"><a href="#Presto.Generator.can_identify-266"><span class="linenos">266</span></a> -</span><span id="Presto.Generator.can_identify-267"><a href="#Presto.Generator.can_identify-267"><span class="linenos">267</span></a><span class="sd"> Returns:</span> -</span><span id="Presto.Generator.can_identify-268"><a href="#Presto.Generator.can_identify-268"><span class="linenos">268</span></a><span class="sd"> Whether or not the given text can be identified.</span> -</span><span id="Presto.Generator.can_identify-269"><a href="#Presto.Generator.can_identify-269"><span class="linenos">269</span></a><span class="sd"> """</span> -</span><span id="Presto.Generator.can_identify-270"><a href="#Presto.Generator.can_identify-270"><span class="linenos">270</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="Presto.Generator.can_identify-271"><a href="#Presto.Generator.can_identify-271"><span class="linenos">271</span></a> <span class="k">return</span> <span class="kc">True</span> -</span><span id="Presto.Generator.can_identify-272"><a href="#Presto.Generator.can_identify-272"><span class="linenos">272</span></a> -</span><span id="Presto.Generator.can_identify-273"><a href="#Presto.Generator.can_identify-273"><span class="linenos">273</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="Presto.Generator.can_identify-274"><a href="#Presto.Generator.can_identify-274"><span class="linenos">274</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> + <div class="pdoc-code codehilite"><pre><span></span><span id="Presto.Generator.can_identify-260"><a href="#Presto.Generator.can_identify-260"><span class="linenos">260</span></a> <span class="nd">@classmethod</span> +</span><span id="Presto.Generator.can_identify-261"><a href="#Presto.Generator.can_identify-261"><span class="linenos">261</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="Presto.Generator.can_identify-262"><a href="#Presto.Generator.can_identify-262"><span class="linenos">262</span></a><span class="w"> </span><span class="sd">"""Checks if text can be identified given an identify option.</span> +</span><span id="Presto.Generator.can_identify-263"><a href="#Presto.Generator.can_identify-263"><span class="linenos">263</span></a> +</span><span id="Presto.Generator.can_identify-264"><a href="#Presto.Generator.can_identify-264"><span class="linenos">264</span></a><span class="sd"> Args:</span> +</span><span id="Presto.Generator.can_identify-265"><a href="#Presto.Generator.can_identify-265"><span class="linenos">265</span></a><span class="sd"> text: The text to check.</span> +</span><span id="Presto.Generator.can_identify-266"><a href="#Presto.Generator.can_identify-266"><span class="linenos">266</span></a><span class="sd"> identify:</span> +</span><span id="Presto.Generator.can_identify-267"><a href="#Presto.Generator.can_identify-267"><span class="linenos">267</span></a><span class="sd"> "always" or `True`: Always returns true.</span> +</span><span id="Presto.Generator.can_identify-268"><a href="#Presto.Generator.can_identify-268"><span class="linenos">268</span></a><span class="sd"> "safe": True if the identifier is case-insensitive.</span> +</span><span id="Presto.Generator.can_identify-269"><a href="#Presto.Generator.can_identify-269"><span class="linenos">269</span></a> +</span><span id="Presto.Generator.can_identify-270"><a href="#Presto.Generator.can_identify-270"><span class="linenos">270</span></a><span class="sd"> Returns:</span> +</span><span id="Presto.Generator.can_identify-271"><a href="#Presto.Generator.can_identify-271"><span class="linenos">271</span></a><span class="sd"> Whether or not the given text can be identified.</span> +</span><span id="Presto.Generator.can_identify-272"><a href="#Presto.Generator.can_identify-272"><span class="linenos">272</span></a><span class="sd"> """</span> +</span><span id="Presto.Generator.can_identify-273"><a href="#Presto.Generator.can_identify-273"><span class="linenos">273</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="Presto.Generator.can_identify-274"><a href="#Presto.Generator.can_identify-274"><span class="linenos">274</span></a> <span class="k">return</span> <span class="kc">True</span> </span><span id="Presto.Generator.can_identify-275"><a href="#Presto.Generator.can_identify-275"><span class="linenos">275</span></a> -</span><span id="Presto.Generator.can_identify-276"><a href="#Presto.Generator.can_identify-276"><span class="linenos">276</span></a> <span class="k">return</span> <span class="kc">False</span> +</span><span id="Presto.Generator.can_identify-276"><a href="#Presto.Generator.can_identify-276"><span class="linenos">276</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="Presto.Generator.can_identify-277"><a href="#Presto.Generator.can_identify-277"><span class="linenos">277</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="Presto.Generator.can_identify-278"><a href="#Presto.Generator.can_identify-278"><span class="linenos">278</span></a> +</span><span id="Presto.Generator.can_identify-279"><a href="#Presto.Generator.can_identify-279"><span class="linenos">279</span></a> <span class="k">return</span> <span class="kc">False</span> </span></pre></div> |