| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc --> |
| <title>SqlParserUtil (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="SqlParserUtil (Apache Calcite API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var data = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":41,"i15":9,"i16":41,"i17":9,"i18":9,"i19":9,"i20":9,"i21":9,"i22":9,"i23":41,"i24":9,"i25":41,"i26":9,"i27":9,"i28":41,"i29":9,"i30":9,"i31":9,"i32":41,"i33":9,"i34":9,"i35":9}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static 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/SqlParserUtil.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.parser</a></div> |
| <h2 title="Class SqlParserUtil" class="title">Class SqlParserUtil</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li>java.lang.Object</li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.calcite.sql.parser.SqlParserUtil</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <pre>public final class <span class="typeNameLabel">SqlParserUtil</span> |
| extends java.lang.Object</pre> |
| <div class="block">Utility methods relating to parsing SQL.</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>private static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="SqlParserUtil.Format.html" title="class in org.apache.calcite.sql.parser">SqlParserUtil.Format</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Pre-initialized <code>DateFormat</code> objects, to be used within the current |
| thread, because <code>DateFormat</code> is not thread-safe.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>private static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="SqlParserUtil.OldTokenSequenceImpl.html" title="class in org.apache.calcite.sql.parser">SqlParserUtil.OldTokenSequenceImpl</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Implementation of |
| <a href="../SqlSpecialOperator.TokenSequence.html" title="interface in org.apache.calcite.sql"><code>SqlSpecialOperator.TokenSequence</code></a>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="SqlParserUtil.ParsedCollation.html" title="class in org.apache.calcite.sql.parser">SqlParserUtil.ParsedCollation</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">The components of a collation definition, per the SQL standard.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="SqlParserUtil.StringAndPos.html" title="class in org.apache.calcite.sql.parser">SqlParserUtil.StringAndPos</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Contains a string, the offset of a token within the string, and a parser |
| position containing the beginning and end line number.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="SqlParserUtil.TokenSequenceImpl.html" title="class in org.apache.calcite.sql.parser">SqlParserUtil.TokenSequenceImpl</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Implementation of |
| <a href="../SqlSpecialOperator.TokenSequence.html" title="interface in org.apache.calcite.sql"><code>SqlSpecialOperator.TokenSequence</code></a> |
| based on an existing parser.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="SqlParserUtil.ToTreeListItem.html" title="class in org.apache.calcite.sql.parser">SqlParserUtil.ToTreeListItem</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Class that holds a <a href="../SqlOperator.html" title="class in org.apache.calcite.sql"><code>SqlOperator</code></a> and a <a href="SqlParserPos.html" title="class in org.apache.calcite.sql.parser"><code>SqlParserPos</code></a>.</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>(package private) static org.slf4j.Logger</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#LOGGER">LOGGER</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| </table> |
| </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>private </code></td> |
| <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">SqlParserUtil</a></span>()</code></th> |
| <td class="colLast"> </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="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>static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addCarets(java.lang.String,int,int,int,int)">addCarets</a></span>​(java.lang.String sql, |
| int line, |
| int col, |
| int endLine, |
| int endCol)</code></th> |
| <td class="colLast"> |
| <div class="block">Converts a string to a string with one or two carets in it.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#checkDateFormat(java.lang.String)">checkDateFormat</a></span>​(java.lang.String pattern)</code></th> |
| <td class="colLast"> |
| <div class="block">Checks if the date/time format is valid</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>static char</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#checkUnicodeEscapeChar(java.lang.String)">checkUnicodeEscapeChar</a></span>​(java.lang.String s)</code></th> |
| <td class="colLast"> |
| <div class="block">Checks a UESCAPE string for validity, and returns the escape character if |
| no exception is thrown.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>private static <a href="../SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#convert(org.apache.calcite.util.PrecedenceClimbingParser.Token)">convert</a></span>​(<a href="../../util/PrecedenceClimbingParser.Token.html" title="class in org.apache.calcite.util">PrecedenceClimbingParser.Token</a> token)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>static <a href="SqlParserUtil.StringAndPos.html" title="class in org.apache.calcite.sql.parser">SqlParserUtil.StringAndPos</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#findPos(java.lang.String)">findPos</a></span>​(java.lang.String sql)</code></th> |
| <td class="colLast"> |
| <div class="block">Looks for one or two carets in a SQL string, and if present, converts |
| them into a parser position.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCharacterSet(java.lang.String)">getCharacterSet</a></span>​(java.lang.String s)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getTokenVal(java.lang.String)">getTokenVal</a></span>​(java.lang.String token)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>static int[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#indexToLineCol(java.lang.String,int)">indexToLineCol</a></span>​(java.lang.String sql, |
| int i)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the (1-based) line and column corresponding to a particular |
| (0-based) offset in a string.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>static long</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#intervalToMillis(java.lang.String,org.apache.calcite.sql.SqlIntervalQualifier)">intervalToMillis</a></span>​(java.lang.String literal, |
| <a href="../SqlIntervalQualifier.html" title="class in org.apache.calcite.sql">SqlIntervalQualifier</a> intervalQualifier)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>static long</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#intervalToMillis(org.apache.calcite.sql.SqlIntervalLiteral.IntervalValue)">intervalToMillis</a></span>​(<a href="../SqlIntervalLiteral.IntervalValue.html" title="class in org.apache.calcite.sql">SqlIntervalLiteral.IntervalValue</a> interval)</code></th> |
| <td class="colLast"> |
| <div class="block">Converts the interval value into a millisecond representation.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>static long</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#intervalToMonths(java.lang.String,org.apache.calcite.sql.SqlIntervalQualifier)">intervalToMonths</a></span>​(java.lang.String literal, |
| <a href="../SqlIntervalQualifier.html" title="class in org.apache.calcite.sql">SqlIntervalQualifier</a> intervalQualifier)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>static long</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#intervalToMonths(org.apache.calcite.sql.SqlIntervalLiteral.IntervalValue)">intervalToMonths</a></span>​(<a href="../SqlIntervalLiteral.IntervalValue.html" title="class in org.apache.calcite.sql">SqlIntervalLiteral.IntervalValue</a> interval)</code></th> |
| <td class="colLast"> |
| <div class="block">Converts the interval value into a months representation.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#lineColToIndex(java.lang.String,int,int)">lineColToIndex</a></span>​(java.lang.String sql, |
| int line, |
| int column)</code></th> |
| <td class="colLast"> |
| <div class="block">Finds the position (0-based) in a string which corresponds to a given |
| line and column (1-based).</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#nextLine(java.lang.String,int)">nextLine</a></span>​(java.lang.String sql, |
| int j)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>static byte[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#parseBinaryString(java.lang.String)">parseBinaryString</a></span>​(java.lang.String s)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span></div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>static <a href="SqlParserUtil.ParsedCollation.html" title="class in org.apache.calcite.sql.parser">SqlParserUtil.ParsedCollation</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#parseCollation(java.lang.String)">parseCollation</a></span>​(java.lang.String in)</code></th> |
| <td class="colLast"> |
| <div class="block">Extracts the values from a collation name.</div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code>static java.sql.Date</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#parseDate(java.lang.String)">parseDate</a></span>​(java.lang.String s)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">this method is not localized for Farrago standards</div> |
| </div> |
| </td> |
| </tr> |
| <tr id="i17" 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="#parseDateLiteral(java.lang.String,org.apache.calcite.sql.parser.SqlParserPos)">parseDateLiteral</a></span>​(java.lang.String s, |
| <a href="SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code>static java.math.BigDecimal</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#parseDecimal(java.lang.String)">parseDecimal</a></span>​(java.lang.String s)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i19" class="rowColor"> |
| <td class="colFirst"><code>static java.math.BigDecimal</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#parseInteger(java.lang.String)">parseInteger</a></span>​(java.lang.String s)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i20" class="altColor"> |
| <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="#parseIntervalLiteral(org.apache.calcite.sql.parser.SqlParserPos,int,java.lang.String,org.apache.calcite.sql.SqlIntervalQualifier)">parseIntervalLiteral</a></span>​(<a href="SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos, |
| int sign, |
| java.lang.String s, |
| <a href="../SqlIntervalQualifier.html" title="class in org.apache.calcite.sql">SqlIntervalQualifier</a> intervalQualifier)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i21" class="rowColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#parsePositiveInt(java.lang.String)">parsePositiveInt</a></span>​(java.lang.String value)</code></th> |
| <td class="colLast"> |
| <div class="block">Parses a positive int.</div> |
| </td> |
| </tr> |
| <tr id="i22" class="altColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#parseString(java.lang.String)">parseString</a></span>​(java.lang.String s)</code></th> |
| <td class="colLast"> |
| <div class="block">Converts the contents of an sql quoted string literal into the |
| corresponding Java string representation (removing leading and trailing |
| quotes and unescaping internal doubled quotes).</div> |
| </td> |
| </tr> |
| <tr id="i23" class="rowColor"> |
| <td class="colFirst"><code>static java.sql.Time</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#parseTime(java.lang.String)">parseTime</a></span>​(java.lang.String s)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">Does not parse SQL:99 milliseconds</div> |
| </div> |
| </td> |
| </tr> |
| <tr id="i24" 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="#parseTimeLiteral(java.lang.String,org.apache.calcite.sql.parser.SqlParserPos)">parseTimeLiteral</a></span>​(java.lang.String s, |
| <a href="SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i25" class="rowColor"> |
| <td class="colFirst"><code>static java.sql.Timestamp</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#parseTimestamp(java.lang.String)">parseTimestamp</a></span>​(java.lang.String s)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">this method is not localized for Farrago standards</div> |
| </div> |
| </td> |
| </tr> |
| <tr id="i26" 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="#parseTimestampLiteral(java.lang.String,org.apache.calcite.sql.parser.SqlParserPos)">parseTimestampLiteral</a></span>​(java.lang.String s, |
| <a href="SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i27" class="rowColor"> |
| <td class="colFirst"><code>static <T> void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#replaceSublist(java.util.List,int,int,T)">replaceSublist</a></span>​(java.util.List<T> list, |
| int start, |
| int end, |
| T o)</code></th> |
| <td class="colLast"> |
| <div class="block">Replaces a range of elements in a list with a single element.</div> |
| </td> |
| </tr> |
| <tr id="i28" class="altColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#rightTrim(java.lang.String,char)">rightTrim</a></span>​(java.lang.String s, |
| char c)</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>static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#strip(java.lang.String,java.lang.String,java.lang.String,java.lang.String,org.apache.calcite.avatica.util.Casing)">strip</a></span>​(java.lang.String s, |
| java.lang.String startQuote, |
| java.lang.String endQuote, |
| java.lang.String escape, |
| org.apache.calcite.avatica.util.Casing casing)</code></th> |
| <td class="colLast"> |
| <div class="block">Unquotes a quoted string, using different quotes for beginning and end.</div> |
| </td> |
| </tr> |
| <tr id="i30" class="altColor"> |
| <td class="colFirst"><code>static <a href="../SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toNodeArray(java.util.List)">toNodeArray</a></span>​(java.util.List<<a href="../SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>> list)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i31" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toNodeArray(org.apache.calcite.sql.SqlNodeList)">toNodeArray</a></span>​(<a href="../SqlNodeList.html" title="class in org.apache.calcite.sql">SqlNodeList</a> list)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i32" class="altColor"> |
| <td class="colFirst"><code>static java.lang.String[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toStringArray(java.util.List)">toStringArray</a></span>​(java.util.List<java.lang.String> list)</code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span></div> |
| </td> |
| </tr> |
| <tr id="i33" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toTree(java.util.List)">toTree</a></span>​(java.util.List<java.lang.Object> list)</code></th> |
| <td class="colLast"> |
| <div class="block">Converts a list of {expression, operator, expression, ...} into a tree, |
| taking operator precedence and associativity into account.</div> |
| </td> |
| </tr> |
| <tr id="i34" class="altColor"> |
| <td class="colFirst"><code>static <a href="../SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toTreeEx(org.apache.calcite.sql.SqlSpecialOperator.TokenSequence,int,int,org.apache.calcite.sql.SqlKind)">toTreeEx</a></span>​(<a href="../SqlSpecialOperator.TokenSequence.html" title="interface in org.apache.calcite.sql">SqlSpecialOperator.TokenSequence</a> list, |
| int start, |
| int minPrec, |
| <a href="../SqlKind.html" title="enum in org.apache.calcite.sql">SqlKind</a> stopperKind)</code></th> |
| <td class="colLast"> |
| <div class="block">Converts a list of {expression, operator, expression, ...} into a tree, |
| taking operator precedence and associativity into account.</div> |
| </td> |
| </tr> |
| <tr id="i35" class="rowColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#trim(java.lang.String,java.lang.String)">trim</a></span>​(java.lang.String s, |
| java.lang.String chars)</code></th> |
| <td class="colLast"> |
| <div class="block">Trims a string for given characters from left and right.</div> |
| </td> |
| </tr> |
| </table> |
| <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>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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="LOGGER"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>LOGGER</h4> |
| <pre>static final org.slf4j.Logger LOGGER</pre> |
| </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>()"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>SqlParserUtil</h4> |
| <pre>private SqlParserUtil()</pre> |
| </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="getCharacterSet(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCharacterSet</h4> |
| <pre class="methodSignature">public static java.lang.String getCharacterSet​(java.lang.String s)</pre> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the character-set prefix of an sql string literal; returns null |
| if there is none</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="parseString(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>parseString</h4> |
| <pre class="methodSignature">public static java.lang.String parseString​(java.lang.String s)</pre> |
| <div class="block">Converts the contents of an sql quoted string literal into the |
| corresponding Java string representation (removing leading and trailing |
| quotes and unescaping internal doubled quotes).</div> |
| </li> |
| </ul> |
| <a id="parseDecimal(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>parseDecimal</h4> |
| <pre class="methodSignature">public static java.math.BigDecimal parseDecimal​(java.lang.String s)</pre> |
| </li> |
| </ul> |
| <a id="parseInteger(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>parseInteger</h4> |
| <pre class="methodSignature">public static java.math.BigDecimal parseInteger​(java.lang.String s)</pre> |
| </li> |
| </ul> |
| <a id="parseDate(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>parseDate</h4> |
| <pre class="methodSignature">@Deprecated |
| public static java.sql.Date parseDate​(java.lang.String s)</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">this method is not localized for Farrago standards</div> |
| </div> |
| </li> |
| </ul> |
| <a id="parseTime(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>parseTime</h4> |
| <pre class="methodSignature">@Deprecated |
| public static java.sql.Time parseTime​(java.lang.String s)</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">Does not parse SQL:99 milliseconds</div> |
| </div> |
| </li> |
| </ul> |
| <a id="parseTimestamp(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>parseTimestamp</h4> |
| <pre class="methodSignature">@Deprecated |
| public static java.sql.Timestamp parseTimestamp​(java.lang.String s)</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="deprecationComment">this method is not localized for Farrago standards</div> |
| </div> |
| </li> |
| </ul> |
| <a id="parseDateLiteral(java.lang.String,org.apache.calcite.sql.parser.SqlParserPos)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>parseDateLiteral</h4> |
| <pre class="methodSignature">public static <a href="../SqlDateLiteral.html" title="class in org.apache.calcite.sql">SqlDateLiteral</a> parseDateLiteral​(java.lang.String s, |
| <a href="SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</pre> |
| </li> |
| </ul> |
| <a id="parseTimeLiteral(java.lang.String,org.apache.calcite.sql.parser.SqlParserPos)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>parseTimeLiteral</h4> |
| <pre class="methodSignature">public static <a href="../SqlTimeLiteral.html" title="class in org.apache.calcite.sql">SqlTimeLiteral</a> parseTimeLiteral​(java.lang.String s, |
| <a href="SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</pre> |
| </li> |
| </ul> |
| <a id="parseTimestampLiteral(java.lang.String,org.apache.calcite.sql.parser.SqlParserPos)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>parseTimestampLiteral</h4> |
| <pre class="methodSignature">public static <a href="../SqlTimestampLiteral.html" title="class in org.apache.calcite.sql">SqlTimestampLiteral</a> parseTimestampLiteral​(java.lang.String s, |
| <a href="SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos)</pre> |
| </li> |
| </ul> |
| <a id="parseIntervalLiteral(org.apache.calcite.sql.parser.SqlParserPos,int,java.lang.String,org.apache.calcite.sql.SqlIntervalQualifier)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>parseIntervalLiteral</h4> |
| <pre class="methodSignature">public static <a href="../SqlIntervalLiteral.html" title="class in org.apache.calcite.sql">SqlIntervalLiteral</a> parseIntervalLiteral​(<a href="SqlParserPos.html" title="class in org.apache.calcite.sql.parser">SqlParserPos</a> pos, |
| int sign, |
| java.lang.String s, |
| <a href="../SqlIntervalQualifier.html" title="class in org.apache.calcite.sql">SqlIntervalQualifier</a> intervalQualifier)</pre> |
| </li> |
| </ul> |
| <a id="checkDateFormat(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>checkDateFormat</h4> |
| <pre class="methodSignature">public static void checkDateFormat​(java.lang.String pattern)</pre> |
| <div class="block">Checks if the date/time format is valid</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>pattern</code> - <code>SimpleDateFormat</code> pattern</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="intervalToMillis(org.apache.calcite.sql.SqlIntervalLiteral.IntervalValue)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>intervalToMillis</h4> |
| <pre class="methodSignature">public static long intervalToMillis​(<a href="../SqlIntervalLiteral.IntervalValue.html" title="class in org.apache.calcite.sql">SqlIntervalLiteral.IntervalValue</a> interval)</pre> |
| <div class="block">Converts the interval value into a millisecond representation.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>interval</code> - Interval</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a long value that represents millisecond equivalent of the |
| interval value.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="intervalToMillis(java.lang.String,org.apache.calcite.sql.SqlIntervalQualifier)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>intervalToMillis</h4> |
| <pre class="methodSignature">public static long intervalToMillis​(java.lang.String literal, |
| <a href="../SqlIntervalQualifier.html" title="class in org.apache.calcite.sql">SqlIntervalQualifier</a> intervalQualifier)</pre> |
| </li> |
| </ul> |
| <a id="intervalToMonths(org.apache.calcite.sql.SqlIntervalLiteral.IntervalValue)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>intervalToMonths</h4> |
| <pre class="methodSignature">public static long intervalToMonths​(<a href="../SqlIntervalLiteral.IntervalValue.html" title="class in org.apache.calcite.sql">SqlIntervalLiteral.IntervalValue</a> interval)</pre> |
| <div class="block">Converts the interval value into a months representation.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>interval</code> - Interval</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a long value that represents months equivalent of the interval |
| value.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="intervalToMonths(java.lang.String,org.apache.calcite.sql.SqlIntervalQualifier)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>intervalToMonths</h4> |
| <pre class="methodSignature">public static long intervalToMonths​(java.lang.String literal, |
| <a href="../SqlIntervalQualifier.html" title="class in org.apache.calcite.sql">SqlIntervalQualifier</a> intervalQualifier)</pre> |
| </li> |
| </ul> |
| <a id="parsePositiveInt(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>parsePositiveInt</h4> |
| <pre class="methodSignature">public static int parsePositiveInt​(java.lang.String value)</pre> |
| <div class="block">Parses a positive int. All characters have to be digits.</div> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.NumberFormatException</code> - if invalid number or leading '-'</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><code>Integer.parseInt(String)</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="parseBinaryString(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>parseBinaryString</h4> |
| <pre class="methodSignature">@Deprecated |
| public static byte[] parseBinaryString​(java.lang.String s)</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> |
| <div class="block">Parses a Binary string. SQL:99 defines a binary string as a hexstring |
| with EVEN nbr of hex digits.</div> |
| </li> |
| </ul> |
| <a id="strip(java.lang.String,java.lang.String,java.lang.String,java.lang.String,org.apache.calcite.avatica.util.Casing)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>strip</h4> |
| <pre class="methodSignature">public static java.lang.String strip​(java.lang.String s, |
| java.lang.String startQuote, |
| java.lang.String endQuote, |
| java.lang.String escape, |
| org.apache.calcite.avatica.util.Casing casing)</pre> |
| <div class="block">Unquotes a quoted string, using different quotes for beginning and end.</div> |
| </li> |
| </ul> |
| <a id="trim(java.lang.String,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>trim</h4> |
| <pre class="methodSignature">public static java.lang.String trim​(java.lang.String s, |
| java.lang.String chars)</pre> |
| <div class="block">Trims a string for given characters from left and right. E.g. |
| <code>trim("aBaac123AabC","abBcC")</code> returns <code>"123A"</code>.</div> |
| </li> |
| </ul> |
| <a id="findPos(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>findPos</h4> |
| <pre class="methodSignature">public static <a href="SqlParserUtil.StringAndPos.html" title="class in org.apache.calcite.sql.parser">SqlParserUtil.StringAndPos</a> findPos​(java.lang.String sql)</pre> |
| <div class="block">Looks for one or two carets in a SQL string, and if present, converts |
| them into a parser position. |
| |
| <p>Examples: |
| |
| <ul> |
| <li>findPos("xxx^yyy") yields {"xxxyyy", position 3, line 1 column 4} |
| <li>findPos("xxxyyy") yields {"xxxyyy", null} |
| <li>findPos("xxx^yy^y") yields {"xxxyyy", position 3, line 4 column 4 |
| through line 1 column 6} |
| </ul></div> |
| </li> |
| </ul> |
| <a id="indexToLineCol(java.lang.String,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>indexToLineCol</h4> |
| <pre class="methodSignature">public static int[] indexToLineCol​(java.lang.String sql, |
| int i)</pre> |
| <div class="block">Returns the (1-based) line and column corresponding to a particular |
| (0-based) offset in a string. |
| |
| <p>Converse of <a href="#lineColToIndex(java.lang.String,int,int)"><code>lineColToIndex(String, int, int)</code></a>.</div> |
| </li> |
| </ul> |
| <a id="nextLine(java.lang.String,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>nextLine</h4> |
| <pre class="methodSignature">public static int nextLine​(java.lang.String sql, |
| int j)</pre> |
| </li> |
| </ul> |
| <a id="lineColToIndex(java.lang.String,int,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>lineColToIndex</h4> |
| <pre class="methodSignature">public static int lineColToIndex​(java.lang.String sql, |
| int line, |
| int column)</pre> |
| <div class="block">Finds the position (0-based) in a string which corresponds to a given |
| line and column (1-based). |
| |
| <p>Converse of <a href="#indexToLineCol(java.lang.String,int)"><code>indexToLineCol(String, int)</code></a>.</div> |
| </li> |
| </ul> |
| <a id="addCarets(java.lang.String,int,int,int,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addCarets</h4> |
| <pre class="methodSignature">public static java.lang.String addCarets​(java.lang.String sql, |
| int line, |
| int col, |
| int endLine, |
| int endCol)</pre> |
| <div class="block">Converts a string to a string with one or two carets in it. For example, |
| <code>addCarets("values (foo)", 1, 9, 1, 12)</code> yields "values |
| (^foo^)".</div> |
| </li> |
| </ul> |
| <a id="getTokenVal(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getTokenVal</h4> |
| <pre class="methodSignature">public static java.lang.String getTokenVal​(java.lang.String token)</pre> |
| </li> |
| </ul> |
| <a id="parseCollation(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>parseCollation</h4> |
| <pre class="methodSignature">public static <a href="SqlParserUtil.ParsedCollation.html" title="class in org.apache.calcite.sql.parser">SqlParserUtil.ParsedCollation</a> parseCollation​(java.lang.String in)</pre> |
| <div class="block">Extracts the values from a collation name. |
| |
| <p>Collation names are on the form <i>charset$locale$strength</i>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>in</code> - The collation name</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>A <a href="SqlParserUtil.ParsedCollation.html" title="class in org.apache.calcite.sql.parser"><code>SqlParserUtil.ParsedCollation</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="toStringArray(java.util.List)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toStringArray</h4> |
| <pre class="methodSignature">@Deprecated |
| public static java.lang.String[] toStringArray​(java.util.List<java.lang.String> list)</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> |
| </li> |
| </ul> |
| <a id="toNodeArray(java.util.List)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toNodeArray</h4> |
| <pre class="methodSignature">public static <a href="../SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>[] toNodeArray​(java.util.List<<a href="../SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>> list)</pre> |
| </li> |
| </ul> |
| <a id="toNodeArray(org.apache.calcite.sql.SqlNodeList)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toNodeArray</h4> |
| <pre class="methodSignature">public static <a href="../SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a>[] toNodeArray​(<a href="../SqlNodeList.html" title="class in org.apache.calcite.sql">SqlNodeList</a> list)</pre> |
| </li> |
| </ul> |
| <a id="rightTrim(java.lang.String,char)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>rightTrim</h4> |
| <pre class="methodSignature">@Deprecated |
| public static java.lang.String rightTrim​(java.lang.String s, |
| char c)</pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> |
| </li> |
| </ul> |
| <a id="replaceSublist(java.util.List,int,int,java.lang.Object)"> |
| <!-- --> |
| </a><a id="replaceSublist(java.util.List,int,int,T)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>replaceSublist</h4> |
| <pre class="methodSignature">public static <T> void replaceSublist​(java.util.List<T> list, |
| int start, |
| int end, |
| T o)</pre> |
| <div class="block">Replaces a range of elements in a list with a single element. For |
| example, if list contains <code>{A, B, C, D, E}</code> then <code> |
| replaceSublist(list, X, 1, 4)</code> returns <code>{A, X, E}</code>.</div> |
| </li> |
| </ul> |
| <a id="toTree(java.util.List)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toTree</h4> |
| <pre class="methodSignature">public static <a href="../SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a> toTree​(java.util.List<java.lang.Object> list)</pre> |
| <div class="block">Converts a list of {expression, operator, expression, ...} into a tree, |
| taking operator precedence and associativity into account.</div> |
| </li> |
| </ul> |
| <a id="toTreeEx(org.apache.calcite.sql.SqlSpecialOperator.TokenSequence,int,int,org.apache.calcite.sql.SqlKind)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toTreeEx</h4> |
| <pre class="methodSignature">public static <a href="../SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a> toTreeEx​(<a href="../SqlSpecialOperator.TokenSequence.html" title="interface in org.apache.calcite.sql">SqlSpecialOperator.TokenSequence</a> list, |
| int start, |
| int minPrec, |
| <a href="../SqlKind.html" title="enum in org.apache.calcite.sql">SqlKind</a> stopperKind)</pre> |
| <div class="block">Converts a list of {expression, operator, expression, ...} into a tree, |
| taking operator precedence and associativity into account.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>list</code> - List of operands and operators. This list is modified as |
| expressions are reduced.</dd> |
| <dd><code>start</code> - Position of first operand in the list. Anything to the |
| left of this (besides the immediately preceding operand) |
| is ignored. Generally use value 1.</dd> |
| <dd><code>minPrec</code> - Minimum precedence to consider. If the method encounters |
| an operator of lower precedence, it doesn't reduce any |
| further.</dd> |
| <dd><code>stopperKind</code> - If not <a href="../SqlKind.html#OTHER"><code>SqlKind.OTHER</code></a>, stop reading the list if |
| we encounter a token of this kind.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the root node of the tree which the list condenses into</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="convert(org.apache.calcite.util.PrecedenceClimbingParser.Token)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>convert</h4> |
| <pre class="methodSignature">private static <a href="../SqlNode.html" title="class in org.apache.calcite.sql">SqlNode</a> convert​(<a href="../../util/PrecedenceClimbingParser.Token.html" title="class in org.apache.calcite.util">PrecedenceClimbingParser.Token</a> token)</pre> |
| </li> |
| </ul> |
| <a id="checkUnicodeEscapeChar(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>checkUnicodeEscapeChar</h4> |
| <pre class="methodSignature">public static char checkUnicodeEscapeChar​(java.lang.String s)</pre> |
| <div class="block">Checks a UESCAPE string for validity, and returns the escape character if |
| no exception is thrown.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>s</code> - UESCAPE string to check</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>validated escape character</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/SqlParserUtil.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> |