| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc --> |
| <title>SqlLiteral (Apache Calcite API)</title> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../jquery/jquery-ui.css" title="Style"> |
| <script type="text/javascript" src="../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script> |
| <!--[if IE]> |
| <script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script> |
| <![endif]--> |
| <script type="text/javascript" src="../../../../jquery/jquery-3.3.1.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jquery-migrate-3.0.1.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jquery-ui.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="SqlLiteral (Apache Calcite API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":41,"i11":9,"i12":9,"i13":9,"i14":9,"i15":9,"i16":9,"i17":10,"i18":9,"i19":41,"i20":9,"i21":41,"i22":9,"i23":9,"i24":10,"i25":10,"i26":10,"i27":10,"i28":42,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":9,"i36":42,"i37":41,"i38":10,"i39":42,"i40":10,"i41":9,"i42":10,"i43":10,"i44":10,"i45":9,"i46":9}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| var pathtoroot = "../../../../"; |
| var useModuleDirectories = true; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <header role="banner"> |
| <nav role="navigation"> |
| <div class="fixedNav"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a id="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/SqlLiteral.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <ul class="navListSearch"> |
| <li><label for="search">SEARCH:</label> |
| <input type="text" id="search" value="search" disabled="disabled"> |
| <input type="reset" id="reset" value="reset" disabled="disabled"> |
| </li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a id="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| </div> |
| <div class="navPadding"> </div> |
| <script type="text/javascript"><!-- |
| $('.navPadding').css('padding-top', $('.fixedNav').css("height")); |
| //--> |
| </script> |
| </nav> |
| </header> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <main role="main"> |
| <div class="header"> |
| <div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">org.apache.calcite.sql</a></div> |
| <h2 title="Class SqlLiteral" class="title">Class SqlLiteral</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li>java.lang.Object</li> |
| <li> |
| <ul class="inheritance"> |
| <li><a href="SqlNode.html" title="class in org.apache.calcite.sql">org.apache.calcite.sql.SqlNode</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.calcite.sql.SqlLiteral</li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><code>java.lang.Cloneable</code></dd> |
| </dl> |
| <dl> |
| <dt>Direct Known Subclasses:</dt> |
| <dd><code><a href="SqlAbstractDateTimeLiteral.html" title="class in org.apache.calcite.sql">SqlAbstractDateTimeLiteral</a></code>, <code><a href="SqlAbstractStringLiteral.html" title="class in org.apache.calcite.sql">SqlAbstractStringLiteral</a></code>, <code><a href="SqlIntervalLiteral.html" title="class in org.apache.calcite.sql">SqlIntervalLiteral</a></code>, <code><a href="SqlNumericLiteral.html" title="class in org.apache.calcite.sql">SqlNumericLiteral</a></code></dd> |
| </dl> |
| <hr> |
| <pre>public class <span class="typeNameLabel">SqlLiteral</span> |
| extends <a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a></pre> |
| <div class="block">A <code>SqlLiteral</code> is a constant. It is, appropriately, immutable. |
| |
| <p>How is the value stored? In that respect, the class is somewhat of a black |
| box. There is a <a href="#getValue()"><code>getValue()</code></a> method which returns the value as an |
| object, but the type of that value is implementation detail, and it is best |
| that your code does not depend upon that knowledge. It is better to use |
| task-oriented methods such as <a href="SqlNode.html#toSqlString(org.apache.calcite.sql.SqlDialect)"><code>SqlNode.toSqlString(SqlDialect)</code></a> and |
| <a href="#toValue()"><code>toValue()</code></a>.</p> |
| |
| <p>If you really need to access the value directly, you should switch on the |
| value of the <a href="#typeName"><code>typeName</code></a> field, rather than making assumptions about |
| the runtime type of the <a href="#value"><code>value</code></a>.</p> |
| |
| <p>The allowable types and combinations are: |
| |
| <table> |
| <caption>Allowable types for SqlLiteral</caption> |
| <tr> |
| <th>TypeName</th> |
| <th>Meaing</th> |
| <th>Value type</th> |
| </tr> |
| <tr> |
| <td><a href="type/SqlTypeName.html#NULL"><code>SqlTypeName.NULL</code></a></td> |
| <td>The null value. It has its own special type.</td> |
| <td>null</td> |
| </tr> |
| <tr> |
| <td><a href="type/SqlTypeName.html#BOOLEAN"><code>SqlTypeName.BOOLEAN</code></a></td> |
| <td>Boolean, namely <code>TRUE</code>, <code>FALSE</code> or <code> |
| UNKNOWN</code>.</td> |
| <td><code>Boolean</code>, or null represents the UNKNOWN value</td> |
| </tr> |
| <tr> |
| <td><a href="type/SqlTypeName.html#DECIMAL"><code>SqlTypeName.DECIMAL</code></a></td> |
| <td>Exact number, for example <code>0</code>, <code>-.5</code>, <code> |
| 12345</code>.</td> |
| <td><code>BigDecimal</code></td> |
| </tr> |
| <tr> |
| <td><a href="type/SqlTypeName.html#DOUBLE"><code>SqlTypeName.DOUBLE</code></a></td> |
| <td>Approximate number, for example <code>6.023E-23</code>.</td> |
| <td><code>BigDecimal</code></td> |
| </tr> |
| <tr> |
| <td><a href="type/SqlTypeName.html#DATE"><code>SqlTypeName.DATE</code></a></td> |
| <td>Date, for example <code>DATE '1969-04'29'</code></td> |
| <td><code>Calendar</code></td> |
| </tr> |
| <tr> |
| <td><a href="type/SqlTypeName.html#TIME"><code>SqlTypeName.TIME</code></a></td> |
| <td>Time, for example <code>TIME '18:37:42.567'</code></td> |
| <td><code>Calendar</code></td> |
| </tr> |
| <tr> |
| <td><a href="type/SqlTypeName.html#TIMESTAMP"><code>SqlTypeName.TIMESTAMP</code></a></td> |
| <td>Timestamp, for example <code>TIMESTAMP '1969-04-29 |
| 18:37:42.567'</code></td> |
| <td><code>Calendar</code></td> |
| </tr> |
| <tr> |
| <td><a href="type/SqlTypeName.html#CHAR"><code>SqlTypeName.CHAR</code></a></td> |
| <td>Character constant, for example <code>'Hello, world!'</code>, <code> |
| ''</code>, <code>_N'Bonjour'</code>, <code>_ISO-8859-1'It''s superman!' |
| COLLATE SHIFT_JIS$ja_JP$2</code>. These are always CHAR, never VARCHAR.</td> |
| <td><a href="../util/NlsString.html" title="class in org.apache.calcite.util"><code>NlsString</code></a></td> |
| </tr> |
| <tr> |
| <td><a href="type/SqlTypeName.html#BINARY"><code>SqlTypeName.BINARY</code></a></td> |
| <td>Binary constant, for example <code>X'ABC'</code>, <code>X'7F'</code>. |
| Note that strings with an odd number of hexits will later become values of |
| the BIT datatype, because they have an incomplete number of bytes. But here, |
| they are all binary constants, because that's how they were written. These |
| constants are always BINARY, never VARBINARY.</td> |
| <td><a href="../util/BitString.html" title="class in org.apache.calcite.util"><code>BitString</code></a></td> |
| </tr> |
| <tr> |
| <td><a href="type/SqlTypeName.html#SYMBOL"><code>SqlTypeName.SYMBOL</code></a></td> |
| <td>A symbol is a special type used to make parsing easier; it is not part of |
| the SQL standard, and is not exposed to end-users. It is used to hold a |
| symbol, such as the LEADING flag in a call to the function <code> |
| TRIM([LEADING|TRAILING|BOTH] chars FROM string)</code>.</td> |
| <td>An <code>Enum</code></td> |
| </tr> |
| <tr> |
| <td><a href="type/SqlTypeName.html#INTERVAL_YEAR"><code>SqlTypeName.INTERVAL_YEAR</code></a> |
| .. <a href="type/SqlTypeName.html#INTERVAL_SECOND"><code>SqlTypeName.INTERVAL_SECOND</code></a></td> |
| <td>Interval, for example <code>INTERVAL '1:34' HOUR</code>.</td> |
| <td><a href="SqlIntervalLiteral.IntervalValue.html" title="class in org.apache.calcite.sql"><code>SqlIntervalLiteral.IntervalValue</code></a>.</td> |
| </tr> |
| </table></div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== NESTED CLASS SUMMARY ======== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="nested.class.summary"> |
| <!-- --> |
| </a> |
| <h3>Nested Class Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Nested Classes</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Class</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static interface </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="SqlLiteral.SqlSymbol.html" title="interface in org.apache.calcite.sql">SqlLiteral.SqlSymbol</a></span></code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span></div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Field</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private <a href="type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#typeName">typeName</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">The type with which this literal was declared.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected java.lang.Object</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#value">value</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">The value of this literal.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a id="fields.inherited.from.class.org.apache.calcite.sql.SqlNode"> |
| <!-- --> |
| </a> |
| <h3>Fields inherited from class org.apache.calcite.sql.<a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a></h3> |
| <code><a href="SqlNode.html#EMPTY_ARRAY">EMPTY_ARRAY</a>, <a href="SqlNode.html#pos">pos</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier</th> |
| <th class="colSecond" scope="col">Constructor</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected </code></td> |
| <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(java.lang.Object,org.apache.calcite.sql.type.SqlTypeName,org.apache.calcite.sql.parser.SqlParserPos)">SqlLiteral</a></span>​(java.lang.Object value, |
| <a href="type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a> typeName, |
| <a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a <code>SqlLiteral</code>.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Method</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code><R> R</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#accept(org.apache.calcite.sql.util.SqlVisitor)">accept</a></span>​(<a href="util/SqlVisitor.html" title="interface in org.apache.calcite.sql.util">SqlVisitor</a><R> visitor)</code></th> |
| <td class="colLast"> |
| <div class="block">Accepts a generic visitor.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>java.math.BigDecimal</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#bigDecimalValue()">bigDecimalValue</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a numeric literal's value as a <code>BigDecimal</code>.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#booleanValue()">booleanValue</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the value as a boolean.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code><a href="SqlLiteral.html" title="class in org.apache.calcite.sql">SqlLiteral</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#clone(org.apache.calcite.sql.parser.SqlParserPos)">clone</a></span>​(<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</code></th> |
| <td class="colLast"> |
| <div class="block">Clones a SqlNode with a different position.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>static <a href="SqlNumericLiteral.html" title="class in org.apache.calcite.sql">SqlNumericLiteral</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createApproxNumeric(java.lang.String,org.apache.calcite.sql.parser.SqlParserPos)">createApproxNumeric</a></span>​(java.lang.String s, |
| <a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>static <a href="SqlBinaryStringLiteral.html" title="class in org.apache.calcite.sql">SqlBinaryStringLiteral</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createBinaryString(byte%5B%5D,org.apache.calcite.sql.parser.SqlParserPos)">createBinaryString</a></span>​(byte[] bytes, |
| <a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a literal like X'ABAB' from an array of bytes.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>static <a href="SqlBinaryStringLiteral.html" title="class in org.apache.calcite.sql">SqlBinaryStringLiteral</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createBinaryString(java.lang.String,org.apache.calcite.sql.parser.SqlParserPos)">createBinaryString</a></span>​(java.lang.String s, |
| <a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a literal like X'ABAB'.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>static <a href="SqlLiteral.html" title="class in org.apache.calcite.sql">SqlLiteral</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createBoolean(boolean,org.apache.calcite.sql.parser.SqlParserPos)">createBoolean</a></span>​(boolean b, |
| <a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a boolean literal.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>static <a href="SqlCharStringLiteral.html" title="class in org.apache.calcite.sql">SqlCharStringLiteral</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createCharString(java.lang.String,java.lang.String,org.apache.calcite.sql.parser.SqlParserPos)">createCharString</a></span>​(java.lang.String s, |
| java.lang.String charSet, |
| <a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a string literal, with optional character-set.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>static <a href="SqlCharStringLiteral.html" title="class in org.apache.calcite.sql">SqlCharStringLiteral</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createCharString(java.lang.String,org.apache.calcite.sql.parser.SqlParserPos)">createCharString</a></span>​(java.lang.String s, |
| <a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a string literal in the system character set.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>static <a href="SqlDateLiteral.html" title="class in org.apache.calcite.sql">SqlDateLiteral</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createDate(java.util.Calendar,org.apache.calcite.sql.parser.SqlParserPos)">createDate</a></span>​(java.util.Calendar calendar, |
| <a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span></div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>static <a href="SqlDateLiteral.html" title="class in org.apache.calcite.sql">SqlDateLiteral</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createDate(org.apache.calcite.util.DateString,org.apache.calcite.sql.parser.SqlParserPos)">createDate</a></span>​(<a href="../util/DateString.html" title="class in org.apache.calcite.util">DateString</a> date, |
| <a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>static <a href="SqlNumericLiteral.html" title="class in org.apache.calcite.sql">SqlNumericLiteral</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createExactNumeric(java.lang.String,org.apache.calcite.sql.parser.SqlParserPos)">createExactNumeric</a></span>​(java.lang.String s, |
| <a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>static <a href="SqlIntervalLiteral.html" title="class in org.apache.calcite.sql">SqlIntervalLiteral</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createInterval(int,java.lang.String,org.apache.calcite.sql.SqlIntervalQualifier,org.apache.calcite.sql.parser.SqlParserPos)">createInterval</a></span>​(int sign, |
| java.lang.String intervalStr, |
| <a href="SqlIntervalQualifier.html" title="class in org.apache.calcite.sql">SqlIntervalQualifier</a> intervalQualifier, |
| <a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates an interval literal.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>static <a href="SqlNumericLiteral.html" title="class in org.apache.calcite.sql">SqlNumericLiteral</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createNegative(org.apache.calcite.sql.SqlNumericLiteral,org.apache.calcite.sql.parser.SqlParserPos)">createNegative</a></span>​(<a href="SqlNumericLiteral.html" title="class in org.apache.calcite.sql">SqlNumericLiteral</a> num, |
| <a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>static <a href="SqlLiteral.html" title="class in org.apache.calcite.sql">SqlLiteral</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createNull(org.apache.calcite.sql.parser.SqlParserPos)">createNull</a></span>​(<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a NULL literal.</div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code>static <a href="SqlLiteral.html" title="class in org.apache.calcite.sql">SqlLiteral</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createSample(org.apache.calcite.sql.SqlSampleSpec,org.apache.calcite.sql.parser.SqlParserPos)">createSample</a></span>​(<a href="SqlSampleSpec.html" title="class in org.apache.calcite.sql">SqlSampleSpec</a> sampleSpec, |
| <a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a literal which represents a sample specification.</div> |
| </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code><a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createSqlType(org.apache.calcite.rel.type.RelDataTypeFactory)">createSqlType</a></span>​(<a href="../rel/type/RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a> typeFactory)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code>static <a href="SqlLiteral.html" title="class in org.apache.calcite.sql">SqlLiteral</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createSymbol(java.lang.Enum,org.apache.calcite.sql.parser.SqlParserPos)">createSymbol</a></span>​(java.lang.Enum<?> o, |
| <a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a literal which represents a parser symbol, for example the |
| <code>TRAILING</code> keyword in the call <code>Trim(TRAILING 'x' FROM |
| 'Hello world!')</code>.</div> |
| </td> |
| </tr> |
| <tr id="i19" class="rowColor"> |
| <td class="colFirst"><code>static <a href="SqlTimeLiteral.html" title="class in org.apache.calcite.sql">SqlTimeLiteral</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createTime(java.util.Calendar,int,org.apache.calcite.sql.parser.SqlParserPos)">createTime</a></span>​(java.util.Calendar calendar, |
| int precision, |
| <a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span></div> |
| </td> |
| </tr> |
| <tr id="i20" class="altColor"> |
| <td class="colFirst"><code>static <a href="SqlTimeLiteral.html" title="class in org.apache.calcite.sql">SqlTimeLiteral</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createTime(org.apache.calcite.util.TimeString,int,org.apache.calcite.sql.parser.SqlParserPos)">createTime</a></span>​(<a href="../util/TimeString.html" title="class in org.apache.calcite.util">TimeString</a> t, |
| int precision, |
| <a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i21" class="rowColor"> |
| <td class="colFirst"><code>static <a href="SqlTimestampLiteral.html" title="class in org.apache.calcite.sql">SqlTimestampLiteral</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createTimestamp(java.util.Calendar,int,org.apache.calcite.sql.parser.SqlParserPos)">createTimestamp</a></span>​(java.util.Calendar calendar, |
| int precision, |
| <a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span></div> |
| </td> |
| </tr> |
| <tr id="i22" class="altColor"> |
| <td class="colFirst"><code>static <a href="SqlTimestampLiteral.html" title="class in org.apache.calcite.sql">SqlTimestampLiteral</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createTimestamp(org.apache.calcite.util.TimestampString,int,org.apache.calcite.sql.parser.SqlParserPos)">createTimestamp</a></span>​(<a href="../util/TimestampString.html" title="class in org.apache.calcite.util">TimestampString</a> ts, |
| int precision, |
| <a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i23" class="rowColor"> |
| <td class="colFirst"><code>static <a href="SqlLiteral.html" title="class in org.apache.calcite.sql">SqlLiteral</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createUnknown(org.apache.calcite.sql.parser.SqlParserPos)">createUnknown</a></span>​(<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i24" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#equals(java.lang.Object)">equals</a></span>​(java.lang.Object obj)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i25" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#equalsDeep(org.apache.calcite.sql.SqlNode,org.apache.calcite.util.Litmus)">equalsDeep</a></span>​(<a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a> node, |
| <a href="../util/Litmus.html" title="interface in org.apache.calcite.util">Litmus</a> litmus)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns whether this node is structurally equivalent to another node.</div> |
| </td> |
| </tr> |
| <tr id="i26" class="altColor"> |
| <td class="colFirst"><code><a href="SqlKind.html" title="enum in org.apache.calcite.sql">SqlKind</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getKind()">getKind</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the type of node this is, or |
| <a href="SqlKind.html#OTHER"><code>SqlKind.OTHER</code></a> if it's nothing special.</div> |
| </td> |
| </tr> |
| <tr id="i27" class="rowColor"> |
| <td class="colFirst"><code><a href="validate/SqlMonotonicity.html" title="enum in org.apache.calcite.sql.validate">SqlMonotonicity</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMonotonicity(org.apache.calcite.sql.validate.SqlValidatorScope)">getMonotonicity</a></span>​(<a href="validate/SqlValidatorScope.html" title="interface in org.apache.calcite.sql.validate">SqlValidatorScope</a> scope)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns whether expression is always ascending, descending or constant.</div> |
| </td> |
| </tr> |
| <tr id="i28" class="altColor"> |
| <td class="colFirst"><code>java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getStringValue()">getStringValue</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span></div> |
| </td> |
| </tr> |
| <tr id="i29" class="rowColor"> |
| <td class="colFirst"><code><a href="type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getTypeName()">getTypeName</a></span>()</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i30" class="altColor"> |
| <td class="colFirst"><code>java.lang.Object</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getValue()">getValue</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the value of this literal.</div> |
| </td> |
| </tr> |
| <tr id="i31" class="rowColor"> |
| <td class="colFirst"><code><T> T</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getValueAs(java.lang.Class)">getValueAs</a></span>​(java.lang.Class<T> clazz)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i32" class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hashCode()">hashCode</a></span>()</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i33" class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#intValue(boolean)">intValue</a></span>​(boolean exact)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the integer value of this literal.</div> |
| </td> |
| </tr> |
| <tr id="i34" class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#longValue(boolean)">longValue</a></span>​(boolean exact)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the long value of this literal.</div> |
| </td> |
| </tr> |
| <tr id="i35" class="rowColor"> |
| <td class="colFirst"><code>static <a href="SqlSampleSpec.html" title="class in org.apache.calcite.sql">SqlSampleSpec</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sampleValue(org.apache.calcite.sql.SqlNode)">sampleValue</a></span>​(<a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a> node)</code></th> |
| <td class="colLast"> |
| <div class="block">Extracts the <a href="SqlSampleSpec.html" title="class in org.apache.calcite.sql"><code>SqlSampleSpec</code></a> value from a symbol literal.</div> |
| </td> |
| </tr> |
| <tr id="i36" class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#signum()">signum</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span></div> |
| </td> |
| </tr> |
| <tr id="i37" class="rowColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#stringValue(org.apache.calcite.sql.SqlNode)">stringValue</a></span>​(<a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a> node)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">Use <a href="#value(org.apache.calcite.sql.SqlNode)"><code>value(SqlNode)</code></a></div> |
| </div> |
| </td> |
| </tr> |
| <tr id="i38" class="altColor"> |
| <td class="colFirst"><code><E extends java.lang.Enum<E>><br>E</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#symbolValue(java.lang.Class)">symbolValue</a></span>​(java.lang.Class<E> class_)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the value as a symbol.</div> |
| </td> |
| </tr> |
| <tr id="i39" class="rowColor"> |
| <td class="colFirst"><code><E extends java.lang.Enum<E>><br>E</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#symbolValue_()">symbolValue_</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span></div> |
| </td> |
| </tr> |
| <tr id="i40" class="altColor"> |
| <td class="colFirst"><code>java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toValue()">toValue</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">For calc program builder - value may be different than <a href="#unparse(org.apache.calcite.sql.SqlWriter,int,int)"><code>unparse(org.apache.calcite.sql.SqlWriter, int, int)</code></a> |
| Typical values: |
| |
| |
| Hello, world! |
| 12.34 |
| {null} |
| 1969-04-29 |
| </div> |
| </td> |
| </tr> |
| <tr id="i41" class="rowColor"> |
| <td class="colFirst"><code>static <a href="SqlLiteral.html" title="class in org.apache.calcite.sql">SqlLiteral</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unchain(org.apache.calcite.sql.SqlNode)">unchain</a></span>​(<a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a> node)</code></th> |
| <td class="colLast"> |
| <div class="block">Converts a chained string literals into regular literals; returns regular |
| literals unchanged.</div> |
| </td> |
| </tr> |
| <tr id="i42" class="altColor"> |
| <td class="colFirst"><code><a href="SqlLiteral.html" title="class in org.apache.calcite.sql">SqlLiteral</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unescapeUnicode(char)">unescapeUnicode</a></span>​(char unicodeEscapeChar)</code></th> |
| <td class="colLast"> |
| <div class="block">Transforms this literal (which must be of type character) into a new one |
| in which 4-digit Unicode escape sequences have been replaced with the |
| corresponding Unicode characters.</div> |
| </td> |
| </tr> |
| <tr id="i43" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unparse(org.apache.calcite.sql.SqlWriter,int,int)">unparse</a></span>​(<a href="SqlWriter.html" title="interface in org.apache.calcite.sql">SqlWriter</a> writer, |
| int leftPrec, |
| int rightPrec)</code></th> |
| <td class="colLast"> |
| <div class="block">Writes a SQL representation of this node to a writer.</div> |
| </td> |
| </tr> |
| <tr id="i44" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#validate(org.apache.calcite.sql.validate.SqlValidator,org.apache.calcite.sql.validate.SqlValidatorScope)">validate</a></span>​(<a href="validate/SqlValidator.html" title="interface in org.apache.calcite.sql.validate">SqlValidator</a> validator, |
| <a href="validate/SqlValidatorScope.html" title="interface in org.apache.calcite.sql.validate">SqlValidatorScope</a> scope)</code></th> |
| <td class="colLast"> |
| <div class="block">Validates this node.</div> |
| </td> |
| </tr> |
| <tr id="i45" class="rowColor"> |
| <td class="colFirst"><code>static java.lang.Comparable</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#value(org.apache.calcite.sql.SqlNode)">value</a></span>​(<a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a> node)</code></th> |
| <td class="colLast"> |
| <div class="block">Extracts the value from a literal.</div> |
| </td> |
| </tr> |
| <tr id="i46" class="altColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#valueMatchesType(java.lang.Object,org.apache.calcite.sql.type.SqlTypeName)">valueMatchesType</a></span>​(java.lang.Object value, |
| <a href="type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a> typeName)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a id="methods.inherited.from.class.org.apache.calcite.sql.SqlNode"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class org.apache.calcite.sql.<a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a></h3> |
| <code><a href="SqlNode.html#clone()">clone</a>, <a href="SqlNode.html#clone(E)">clone</a>, <a href="SqlNode.html#cloneArray(org.apache.calcite.sql.SqlNode%5B%5D)">cloneArray</a>, <a href="SqlNode.html#equalDeep(java.util.List,java.util.List,org.apache.calcite.util.Litmus)">equalDeep</a>, <a href="SqlNode.html#equalDeep(org.apache.calcite.sql.SqlNode,org.apache.calcite.sql.SqlNode,org.apache.calcite.util.Litmus)">equalDeep</a>, <a href="SqlNode.html#equalsDeep(org.apache.calcite.sql.SqlNode,boolean)">equalsDeep</a>, <a href="SqlNode.html#findValidOptions(org.apache.calcite.sql.validate.SqlValidator,org.apache.calcite.sql.validate.SqlValidatorScope,org.apache.calcite.sql.parser.SqlParserPos,java.util.Collection)">findValidOptions</a>, <a href="SqlNode.html#getParserPosition()">getParserPosition</a>, <a href="SqlNode.html#isA(java.util.Set)">isA</a>, <a href="SqlNode.html#toSqlString(org.apache.calcite.sql.SqlDialect)">toSqlString</a>, <a href="SqlNode.html#toSqlString(org.apache.calcite.sql.SqlDialect,boolean)">toSqlString</a>, <a href="SqlNode.html#toString()">toString</a>, <a href="SqlNode.html#validateExpr(org.apache.calcite.sql.validate.SqlValidator,org.apache.calcite.sql.validate.SqlValidatorScope)">validateExpr</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a id="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.Object</h3> |
| <code>finalize, getClass, notify, notifyAll, wait, wait, wait</code></li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="field.detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a id="typeName"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>typeName</h4> |
| <pre>private final <a href="type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a> typeName</pre> |
| <div class="block">The type with which this literal was declared. This type is very |
| approximate: the literal may have a different type once validated. For |
| example, all numeric literals have a type name of |
| <a href="type/SqlTypeName.html#DECIMAL"><code>SqlTypeName.DECIMAL</code></a>, but on validation may become |
| <a href="type/SqlTypeName.html#INTEGER"><code>SqlTypeName.INTEGER</code></a>.</div> |
| </li> |
| </ul> |
| <a id="value"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>value</h4> |
| <pre>protected final java.lang.Object value</pre> |
| <div class="block">The value of this literal. The type of the value must be appropriate for |
| the typeName, as defined by the <a href="#valueMatchesType(java.lang.Object,org.apache.calcite.sql.type.SqlTypeName)"><code>valueMatchesType(java.lang.Object, org.apache.calcite.sql.type.SqlTypeName)</code></a> method.</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a id="<init>(java.lang.Object,org.apache.calcite.sql.type.SqlTypeName,org.apache.calcite.sql.parser.SqlParserPos)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>SqlLiteral</h4> |
| <pre>protected SqlLiteral​(java.lang.Object value, |
| <a href="type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a> typeName, |
| <a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</pre> |
| <div class="block">Creates a <code>SqlLiteral</code>.</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| <!-- ============ METHOD DETAIL ========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a id="getTypeName()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getTypeName</h4> |
| <pre class="methodSignature">public <a href="type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a> getTypeName()</pre> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>value of <a href="#typeName"><code>typeName</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="valueMatchesType(java.lang.Object,org.apache.calcite.sql.type.SqlTypeName)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>valueMatchesType</h4> |
| <pre class="methodSignature">public static boolean valueMatchesType​(java.lang.Object value, |
| <a href="type/SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a> typeName)</pre> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>whether value is appropriate for its type (we have rules about |
| these things)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="clone(org.apache.calcite.sql.parser.SqlParserPos)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>clone</h4> |
| <pre class="methodSignature">public <a href="SqlLiteral.html" title="class in org.apache.calcite.sql">SqlLiteral</a> clone​(<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="SqlNode.html#clone(org.apache.calcite.sql.parser.SqlParserPos)">SqlNode</a></code></span></div> |
| <div class="block">Clones a SqlNode with a different position.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="SqlNode.html#clone(org.apache.calcite.sql.parser.SqlParserPos)">clone</a></code> in class <code><a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getKind()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getKind</h4> |
| <pre class="methodSignature">public <a href="SqlKind.html" title="enum in org.apache.calcite.sql">SqlKind</a> getKind()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="SqlNode.html#getKind()">SqlNode</a></code></span></div> |
| <div class="block">Returns the type of node this is, or |
| <a href="SqlKind.html#OTHER"><code>SqlKind.OTHER</code></a> if it's nothing special.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="SqlNode.html#getKind()">getKind</a></code> in class <code><a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a <a href="SqlKind.html" title="enum in org.apache.calcite.sql"><code>SqlKind</code></a> value, never null</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="SqlNode.html#isA(java.util.Set)"><code>SqlNode.isA(java.util.Set<org.apache.calcite.sql.SqlKind>)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getValue()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getValue</h4> |
| <pre class="methodSignature">public java.lang.Object getValue()</pre> |
| <div class="block">Returns the value of this literal. |
| |
| <p>Try not to use this method! There are so many different kinds of |
| values, it's better to to let SqlLiteral do whatever it is you want to |
| do.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="#booleanValue()"><code>booleanValue()</code></a>, |
| <a href="#symbolValue(java.lang.Class)"><code>symbolValue(Class)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getValueAs(java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getValueAs</h4> |
| <pre class="methodSignature">public <T> T getValueAs​(java.lang.Class<T> clazz)</pre> |
| </li> |
| </ul> |
| <a id="symbolValue_()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>symbolValue_</h4> |
| <pre class="methodSignature">@Deprecated |
| public <E extends java.lang.Enum<E>> E symbolValue_()</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> |
| <div class="block">Returns the value as a symbol.</div> |
| </li> |
| </ul> |
| <a id="symbolValue(java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>symbolValue</h4> |
| <pre class="methodSignature">public <E extends java.lang.Enum<E>> E symbolValue​(java.lang.Class<E> class_)</pre> |
| <div class="block">Returns the value as a symbol.</div> |
| </li> |
| </ul> |
| <a id="booleanValue()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>booleanValue</h4> |
| <pre class="methodSignature">public boolean booleanValue()</pre> |
| <div class="block">Returns the value as a boolean.</div> |
| </li> |
| </ul> |
| <a id="sampleValue(org.apache.calcite.sql.SqlNode)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>sampleValue</h4> |
| <pre class="methodSignature">public static <a href="SqlSampleSpec.html" title="class in org.apache.calcite.sql">SqlSampleSpec</a> sampleValue​(<a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a> node)</pre> |
| <div class="block">Extracts the <a href="SqlSampleSpec.html" title="class in org.apache.calcite.sql"><code>SqlSampleSpec</code></a> value from a symbol literal.</div> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.ClassCastException</code> - if the value is not a symbol literal</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="#createSymbol(java.lang.Enum,org.apache.calcite.sql.parser.SqlParserPos)"><code>createSymbol(Enum, SqlParserPos)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="value(org.apache.calcite.sql.SqlNode)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>value</h4> |
| <pre class="methodSignature">public static java.lang.Comparable value​(<a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a> node) |
| throws java.lang.IllegalArgumentException</pre> |
| <div class="block">Extracts the value from a literal. |
| |
| <p>Cases: |
| <ul> |
| <li>If the node is a character literal, a chain of string |
| literals, or a CAST of a character literal, returns the value as a |
| <a href="../util/NlsString.html" title="class in org.apache.calcite.util"><code>NlsString</code></a>. |
| |
| <li>If the node is a numeric literal, or a negated numeric literal, |
| returns the value as a <code>BigDecimal</code>. |
| |
| <li>If the node is a <a href="SqlIntervalQualifier.html" title="class in org.apache.calcite.sql"><code>SqlIntervalQualifier</code></a>, |
| returns its <code>TimeUnitRange</code>. |
| |
| <li>If the node is INTERVAL_DAY_TIME_ in <a href="type/SqlTypeFamily.html" title="enum in org.apache.calcite.sql.type"><code>SqlTypeFamily</code></a>, |
| returns its sign multiplied by its millisecond equivalent value |
| |
| <li>If the node is INTERVAL_YEAR_MONTH_ in <a href="type/SqlTypeFamily.html" title="enum in org.apache.calcite.sql.type"><code>SqlTypeFamily</code></a>, |
| returns its sign multiplied by its months equivalent value |
| |
| <li>Otherwise throws <code>IllegalArgumentException</code>. |
| </ul></div> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.IllegalArgumentException</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="stringValue(org.apache.calcite.sql.SqlNode)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>stringValue</h4> |
| <pre class="methodSignature">@Deprecated |
| public static java.lang.String stringValue​(<a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a> node)</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">Use <a href="#value(org.apache.calcite.sql.SqlNode)"><code>value(SqlNode)</code></a></div> |
| </div> |
| <div class="block">Extracts the string value from a string literal, a chain of string |
| literals, or a CAST of a string literal.</div> |
| </li> |
| </ul> |
| <a id="unchain(org.apache.calcite.sql.SqlNode)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>unchain</h4> |
| <pre class="methodSignature">public static <a href="SqlLiteral.html" title="class in org.apache.calcite.sql">SqlLiteral</a> unchain​(<a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a> node)</pre> |
| <div class="block">Converts a chained string literals into regular literals; returns regular |
| literals unchanged.</div> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.IllegalArgumentException</code> - if <code>node</code> is not a string literal |
| and cannot be unchained.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="toValue()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toValue</h4> |
| <pre class="methodSignature">public java.lang.String toValue()</pre> |
| <div class="block">For calc program builder - value may be different than <a href="#unparse(org.apache.calcite.sql.SqlWriter,int,int)"><code>unparse(org.apache.calcite.sql.SqlWriter, int, int)</code></a> |
| Typical values: |
| |
| <ul> |
| <li>Hello, world!</li> |
| <li>12.34</li> |
| <li>{null}</li> |
| <li>1969-04-29</li> |
| </ul></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>string representation of the value</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="validate(org.apache.calcite.sql.validate.SqlValidator,org.apache.calcite.sql.validate.SqlValidatorScope)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>validate</h4> |
| <pre class="methodSignature">public void validate​(<a href="validate/SqlValidator.html" title="interface in org.apache.calcite.sql.validate">SqlValidator</a> validator, |
| <a href="validate/SqlValidatorScope.html" title="interface in org.apache.calcite.sql.validate">SqlValidatorScope</a> scope)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="SqlNode.html#validate(org.apache.calcite.sql.validate.SqlValidator,org.apache.calcite.sql.validate.SqlValidatorScope)">SqlNode</a></code></span></div> |
| <div class="block">Validates this node. |
| |
| <p>The typical implementation of this method will make a callback to the |
| validator appropriate to the node type and context. The validator has |
| methods such as <a href="validate/SqlValidator.html#validateLiteral(org.apache.calcite.sql.SqlLiteral)"><code>SqlValidator.validateLiteral(org.apache.calcite.sql.SqlLiteral)</code></a> for these purposes.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="SqlNode.html#validate(org.apache.calcite.sql.validate.SqlValidator,org.apache.calcite.sql.validate.SqlValidatorScope)">validate</a></code> in class <code><a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a></code></dd> |
| <dd><code>scope</code> - Validator</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="accept(org.apache.calcite.sql.util.SqlVisitor)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>accept</h4> |
| <pre class="methodSignature">public <R> R accept​(<a href="util/SqlVisitor.html" title="interface in org.apache.calcite.sql.util">SqlVisitor</a><R> visitor)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="SqlNode.html#accept(org.apache.calcite.sql.util.SqlVisitor)">SqlNode</a></code></span></div> |
| <div class="block">Accepts a generic visitor. |
| |
| <p>Implementations of this method in subtypes simply call the appropriate |
| <code>visit</code> method on the |
| <a href="util/SqlVisitor.html" title="interface in org.apache.calcite.sql.util"><code>visitor object</code></a>. |
| |
| <p>The type parameter <code>R</code> must be consistent with the type |
| parameter of the visitor.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="SqlNode.html#accept(org.apache.calcite.sql.util.SqlVisitor)">accept</a></code> in class <code><a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="equalsDeep(org.apache.calcite.sql.SqlNode,org.apache.calcite.util.Litmus)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>equalsDeep</h4> |
| <pre class="methodSignature">public boolean equalsDeep​(<a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a> node, |
| <a href="../util/Litmus.html" title="interface in org.apache.calcite.util">Litmus</a> litmus)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="SqlNode.html#equalsDeep(org.apache.calcite.sql.SqlNode,org.apache.calcite.util.Litmus)">SqlNode</a></code></span></div> |
| <div class="block">Returns whether this node is structurally equivalent to another node. |
| Some examples: |
| |
| <ul> |
| <li>1 + 2 is structurally equivalent to 1 + 2</li> |
| <li>1 + 2 + 3 is structurally equivalent to (1 + 2) + 3, but not to 1 + |
| (2 + 3), because the '+' operator is left-associative</li> |
| </ul></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="SqlNode.html#equalsDeep(org.apache.calcite.sql.SqlNode,org.apache.calcite.util.Litmus)">equalsDeep</a></code> in class <code><a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getMonotonicity(org.apache.calcite.sql.validate.SqlValidatorScope)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMonotonicity</h4> |
| <pre class="methodSignature">public <a href="validate/SqlMonotonicity.html" title="enum in org.apache.calcite.sql.validate">SqlMonotonicity</a> getMonotonicity​(<a href="validate/SqlValidatorScope.html" title="interface in org.apache.calcite.sql.validate">SqlValidatorScope</a> scope)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="SqlNode.html#getMonotonicity(org.apache.calcite.sql.validate.SqlValidatorScope)">SqlNode</a></code></span></div> |
| <div class="block">Returns whether expression is always ascending, descending or constant. |
| This property is useful because it allows to safely aggregate infinite |
| streams of values. |
| |
| <p>The default implementation returns |
| <a href="validate/SqlMonotonicity.html#NOT_MONOTONIC"><code>SqlMonotonicity.NOT_MONOTONIC</code></a>.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="SqlNode.html#getMonotonicity(org.apache.calcite.sql.validate.SqlValidatorScope)">getMonotonicity</a></code> in class <code><a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>scope</code> - Scope</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="createNull(org.apache.calcite.sql.parser.SqlParserPos)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createNull</h4> |
| <pre class="methodSignature">public static <a href="SqlLiteral.html" title="class in org.apache.calcite.sql">SqlLiteral</a> createNull​(<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</pre> |
| <div class="block">Creates a NULL literal. |
| |
| <p>There's no singleton constant for a NULL literal. Instead, nulls must |
| be instantiated via createNull(), because different instances have |
| different context-dependent types.</div> |
| </li> |
| </ul> |
| <a id="createBoolean(boolean,org.apache.calcite.sql.parser.SqlParserPos)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createBoolean</h4> |
| <pre class="methodSignature">public static <a href="SqlLiteral.html" title="class in org.apache.calcite.sql">SqlLiteral</a> createBoolean​(boolean b, |
| <a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</pre> |
| <div class="block">Creates a boolean literal.</div> |
| </li> |
| </ul> |
| <a id="createUnknown(org.apache.calcite.sql.parser.SqlParserPos)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createUnknown</h4> |
| <pre class="methodSignature">public static <a href="SqlLiteral.html" title="class in org.apache.calcite.sql">SqlLiteral</a> createUnknown​(<a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</pre> |
| </li> |
| </ul> |
| <a id="createSymbol(java.lang.Enum,org.apache.calcite.sql.parser.SqlParserPos)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createSymbol</h4> |
| <pre class="methodSignature">public static <a href="SqlLiteral.html" title="class in org.apache.calcite.sql">SqlLiteral</a> createSymbol​(java.lang.Enum<?> o, |
| <a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</pre> |
| <div class="block">Creates a literal which represents a parser symbol, for example the |
| <code>TRAILING</code> keyword in the call <code>Trim(TRAILING 'x' FROM |
| 'Hello world!')</code>.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="#symbolValue(java.lang.Class)"><code>symbolValue(Class)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="createSample(org.apache.calcite.sql.SqlSampleSpec,org.apache.calcite.sql.parser.SqlParserPos)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createSample</h4> |
| <pre class="methodSignature">public static <a href="SqlLiteral.html" title="class in org.apache.calcite.sql">SqlLiteral</a> createSample​(<a href="SqlSampleSpec.html" title="class in org.apache.calcite.sql">SqlSampleSpec</a> sampleSpec, |
| <a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</pre> |
| <div class="block">Creates a literal which represents a sample specification.</div> |
| </li> |
| </ul> |
| <a id="equals(java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>equals</h4> |
| <pre class="methodSignature">public boolean equals​(java.lang.Object obj)</pre> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code>equals</code> in class <code>java.lang.Object</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="hashCode()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>hashCode</h4> |
| <pre class="methodSignature">public int hashCode()</pre> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code>hashCode</code> in class <code>java.lang.Object</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="intValue(boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>intValue</h4> |
| <pre class="methodSignature">public int intValue​(boolean exact)</pre> |
| <div class="block">Returns the integer value of this literal.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>exact</code> - Whether the value has to be exact. If true, and the literal |
| is a fraction (e.g. 3.14), throws. If false, discards the |
| fractional part of the value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Integer value of this literal</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="longValue(boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>longValue</h4> |
| <pre class="methodSignature">public long longValue​(boolean exact)</pre> |
| <div class="block">Returns the long value of this literal.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>exact</code> - Whether the value has to be exact. If true, and the literal |
| is a fraction (e.g. 3.14), throws. If false, discards the |
| fractional part of the value.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Long value of this literal</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="signum()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>signum</h4> |
| <pre class="methodSignature">@Deprecated |
| public int signum()</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> |
| <div class="block">Returns sign of value.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>-1, 0 or 1</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="bigDecimalValue()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>bigDecimalValue</h4> |
| <pre class="methodSignature">public java.math.BigDecimal bigDecimalValue()</pre> |
| <div class="block">Returns a numeric literal's value as a <code>BigDecimal</code>.</div> |
| </li> |
| </ul> |
| <a id="getStringValue()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getStringValue</h4> |
| <pre class="methodSignature">@Deprecated |
| public java.lang.String getStringValue()</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> |
| </li> |
| </ul> |
| <a id="unparse(org.apache.calcite.sql.SqlWriter,int,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>unparse</h4> |
| <pre class="methodSignature">public void unparse​(<a href="SqlWriter.html" title="interface in org.apache.calcite.sql">SqlWriter</a> writer, |
| int leftPrec, |
| int rightPrec)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="SqlNode.html#unparse(org.apache.calcite.sql.SqlWriter,int,int)">SqlNode</a></code></span></div> |
| <div class="block">Writes a SQL representation of this node to a writer. |
| |
| <p>The <code>leftPrec</code> and <code>rightPrec</code> parameters give |
| us enough context to decide whether we need to enclose the expression in |
| parentheses. For example, we need parentheses around "2 + 3" if preceded |
| by "5 *". This is because the precedence of the "*" operator is greater |
| than the precedence of the "+" operator. |
| |
| <p>The algorithm handles left- and right-associative operators by giving |
| them slightly different left- and right-precedence. |
| |
| <p>If <a href="SqlWriter.html#isAlwaysUseParentheses()"><code>SqlWriter.isAlwaysUseParentheses()</code></a> is true, we use |
| parentheses even when they are not required by the precedence rules. |
| |
| <p>For the details of this algorithm, see <a href="SqlCall.html#unparse(org.apache.calcite.sql.SqlWriter,int,int)"><code>SqlCall.unparse(org.apache.calcite.sql.SqlWriter, int, int)</code></a>.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="SqlNode.html#unparse(org.apache.calcite.sql.SqlWriter,int,int)">unparse</a></code> in class <code><a href="SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>writer</code> - Target writer</dd> |
| <dd><code>leftPrec</code> - The precedence of the <a href="SqlNode.html" title="class in org.apache.calcite.sql"><code>SqlNode</code></a> immediately |
| preceding this node in a depth-first scan of the parse |
| tree</dd> |
| <dd><code>rightPrec</code> - The precedence of the <a href="SqlNode.html" title="class in org.apache.calcite.sql"><code>SqlNode</code></a> immediately</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="createSqlType(org.apache.calcite.rel.type.RelDataTypeFactory)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createSqlType</h4> |
| <pre class="methodSignature">public <a href="../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a> createSqlType​(<a href="../rel/type/RelDataTypeFactory.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFactory</a> typeFactory)</pre> |
| </li> |
| </ul> |
| <a id="createDate(java.util.Calendar,org.apache.calcite.sql.parser.SqlParserPos)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createDate</h4> |
| <pre class="methodSignature">@Deprecated |
| public static <a href="SqlDateLiteral.html" title="class in org.apache.calcite.sql">SqlDateLiteral</a> createDate​(java.util.Calendar calendar, |
| <a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> |
| </li> |
| </ul> |
| <a id="createDate(org.apache.calcite.util.DateString,org.apache.calcite.sql.parser.SqlParserPos)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createDate</h4> |
| <pre class="methodSignature">public static <a href="SqlDateLiteral.html" title="class in org.apache.calcite.sql">SqlDateLiteral</a> createDate​(<a href="../util/DateString.html" title="class in org.apache.calcite.util">DateString</a> date, |
| <a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</pre> |
| </li> |
| </ul> |
| <a id="createTimestamp(java.util.Calendar,int,org.apache.calcite.sql.parser.SqlParserPos)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createTimestamp</h4> |
| <pre class="methodSignature">@Deprecated |
| public static <a href="SqlTimestampLiteral.html" title="class in org.apache.calcite.sql">SqlTimestampLiteral</a> createTimestamp​(java.util.Calendar calendar, |
| int precision, |
| <a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> |
| </li> |
| </ul> |
| <a id="createTimestamp(org.apache.calcite.util.TimestampString,int,org.apache.calcite.sql.parser.SqlParserPos)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createTimestamp</h4> |
| <pre class="methodSignature">public static <a href="SqlTimestampLiteral.html" title="class in org.apache.calcite.sql">SqlTimestampLiteral</a> createTimestamp​(<a href="../util/TimestampString.html" title="class in org.apache.calcite.util">TimestampString</a> ts, |
| int precision, |
| <a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</pre> |
| </li> |
| </ul> |
| <a id="createTime(java.util.Calendar,int,org.apache.calcite.sql.parser.SqlParserPos)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createTime</h4> |
| <pre class="methodSignature">@Deprecated |
| public static <a href="SqlTimeLiteral.html" title="class in org.apache.calcite.sql">SqlTimeLiteral</a> createTime​(java.util.Calendar calendar, |
| int precision, |
| <a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> |
| </li> |
| </ul> |
| <a id="createTime(org.apache.calcite.util.TimeString,int,org.apache.calcite.sql.parser.SqlParserPos)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createTime</h4> |
| <pre class="methodSignature">public static <a href="SqlTimeLiteral.html" title="class in org.apache.calcite.sql">SqlTimeLiteral</a> createTime​(<a href="../util/TimeString.html" title="class in org.apache.calcite.util">TimeString</a> t, |
| int precision, |
| <a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</pre> |
| </li> |
| </ul> |
| <a id="createInterval(int,java.lang.String,org.apache.calcite.sql.SqlIntervalQualifier,org.apache.calcite.sql.parser.SqlParserPos)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createInterval</h4> |
| <pre class="methodSignature">public static <a href="SqlIntervalLiteral.html" title="class in org.apache.calcite.sql">SqlIntervalLiteral</a> createInterval​(int sign, |
| java.lang.String intervalStr, |
| <a href="SqlIntervalQualifier.html" title="class in org.apache.calcite.sql">SqlIntervalQualifier</a> intervalQualifier, |
| <a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</pre> |
| <div class="block">Creates an interval literal.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>intervalStr</code> - input string of '1:23:04'</dd> |
| <dd><code>intervalQualifier</code> - describes the interval type and precision</dd> |
| <dd><code>pos</code> - Parser position</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="createNegative(org.apache.calcite.sql.SqlNumericLiteral,org.apache.calcite.sql.parser.SqlParserPos)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createNegative</h4> |
| <pre class="methodSignature">public static <a href="SqlNumericLiteral.html" title="class in org.apache.calcite.sql">SqlNumericLiteral</a> createNegative​(<a href="SqlNumericLiteral.html" title="class in org.apache.calcite.sql">SqlNumericLiteral</a> num, |
| <a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</pre> |
| </li> |
| </ul> |
| <a id="createExactNumeric(java.lang.String,org.apache.calcite.sql.parser.SqlParserPos)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createExactNumeric</h4> |
| <pre class="methodSignature">public static <a href="SqlNumericLiteral.html" title="class in org.apache.calcite.sql">SqlNumericLiteral</a> createExactNumeric​(java.lang.String s, |
| <a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</pre> |
| </li> |
| </ul> |
| <a id="createApproxNumeric(java.lang.String,org.apache.calcite.sql.parser.SqlParserPos)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createApproxNumeric</h4> |
| <pre class="methodSignature">public static <a href="SqlNumericLiteral.html" title="class in org.apache.calcite.sql">SqlNumericLiteral</a> createApproxNumeric​(java.lang.String s, |
| <a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</pre> |
| </li> |
| </ul> |
| <a id="createBinaryString(java.lang.String,org.apache.calcite.sql.parser.SqlParserPos)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createBinaryString</h4> |
| <pre class="methodSignature">public static <a href="SqlBinaryStringLiteral.html" title="class in org.apache.calcite.sql">SqlBinaryStringLiteral</a> createBinaryString​(java.lang.String s, |
| <a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</pre> |
| <div class="block">Creates a literal like X'ABAB'. Although it matters when we derive a type |
| for this beastie, we don't care at this point whether the number of |
| hexits is odd or even.</div> |
| </li> |
| </ul> |
| <a id="createBinaryString(byte[],org.apache.calcite.sql.parser.SqlParserPos)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createBinaryString</h4> |
| <pre class="methodSignature">public static <a href="SqlBinaryStringLiteral.html" title="class in org.apache.calcite.sql">SqlBinaryStringLiteral</a> createBinaryString​(byte[] bytes, |
| <a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</pre> |
| <div class="block">Creates a literal like X'ABAB' from an array of bytes.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>bytes</code> - Contents of binary literal</dd> |
| <dd><code>pos</code> - Parser position</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Binary string literal</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="createCharString(java.lang.String,org.apache.calcite.sql.parser.SqlParserPos)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createCharString</h4> |
| <pre class="methodSignature">public static <a href="SqlCharStringLiteral.html" title="class in org.apache.calcite.sql">SqlCharStringLiteral</a> createCharString​(java.lang.String s, |
| <a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</pre> |
| <div class="block">Creates a string literal in the system character set.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>s</code> - a string (without the sql single quotes)</dd> |
| <dd><code>pos</code> - Parser position</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="createCharString(java.lang.String,java.lang.String,org.apache.calcite.sql.parser.SqlParserPos)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createCharString</h4> |
| <pre class="methodSignature">public static <a href="SqlCharStringLiteral.html" title="class in org.apache.calcite.sql">SqlCharStringLiteral</a> createCharString​(java.lang.String s, |
| java.lang.String charSet, |
| <a href="parser/SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</pre> |
| <div class="block">Creates a string literal, with optional character-set.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>s</code> - a string (without the sql single quotes)</dd> |
| <dd><code>charSet</code> - character set name, null means take system default</dd> |
| <dd><code>pos</code> - Parser position</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>A string literal</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.nio.charset.UnsupportedCharsetException</code> - if charSet is not null but there is |
| no character set with that name in this |
| environment</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="unescapeUnicode(char)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>unescapeUnicode</h4> |
| <pre class="methodSignature">public <a href="SqlLiteral.html" title="class in org.apache.calcite.sql">SqlLiteral</a> unescapeUnicode​(char unicodeEscapeChar)</pre> |
| <div class="block">Transforms this literal (which must be of type character) into a new one |
| in which 4-digit Unicode escape sequences have been replaced with the |
| corresponding Unicode characters.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>unicodeEscapeChar</code> - escape character (e.g. backslash) for Unicode |
| numeric sequences; 0 implies no transformation</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>transformed literal</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| </div> |
| </main> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <footer role="contentinfo"> |
| <nav role="navigation"> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a id="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/SqlLiteral.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a id="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </nav> |
| <p class="legalCopy"><small>Copyright © 2012–2019 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </footer> |
| </body> |
| </html> |