blob: 68d89fd52c46f3f753e0be4146e064a6cdc12ece [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>BasicSqlType (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="BasicSqlType (Apache Calcite API)";
}
}
catch(err) {
}
//-->
var data = {"i0":9,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete 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/BasicSqlType.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&nbsp;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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</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">&nbsp;</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>&nbsp;<a href="package-summary.html">org.apache.calcite.sql.type</a></div>
<h2 title="Class BasicSqlType" class="title">Class BasicSqlType</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li><a href="../../rel/type/RelDataTypeImpl.html" title="class in org.apache.calcite.rel.type">org.apache.calcite.rel.type.RelDataTypeImpl</a></li>
<li>
<ul class="inheritance">
<li><a href="AbstractSqlType.html" title="class in org.apache.calcite.sql.type">org.apache.calcite.sql.type.AbstractSqlType</a></li>
<li>
<ul class="inheritance">
<li>org.apache.calcite.sql.type.BasicSqlType</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><code>java.io.Serializable</code>, <code>java.lang.Cloneable</code>, <code><a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></code>, <code><a href="../../rel/type/RelDataTypeFamily.html" title="interface in org.apache.calcite.rel.type">RelDataTypeFamily</a></code></dd>
</dl>
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><code><a href="SqlTypeFactoryImpl.UnknownSqlType.html" title="class in org.apache.calcite.sql.type">SqlTypeFactoryImpl.UnknownSqlType</a></code></dd>
</dl>
<hr>
<pre>public class <span class="typeNameLabel">BasicSqlType</span>
extends <a href="AbstractSqlType.html" title="class in org.apache.calcite.sql.type">AbstractSqlType</a></pre>
<div class="block">BasicSqlType represents a standard atomic SQL type (excluding interval
types).
<p>Instances of this class are immutable.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../serialized-form.html#org.apache.calcite.sql.type.BasicSqlType">Serialized Form</a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== 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">&nbsp;</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="../SqlCollation.html" title="class in org.apache.calcite.sql">SqlCollation</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#collation">collation</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#precision">precision</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#scale">scale</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private <a href="../../rel/type/RelDataTypeSystem.html" title="interface in org.apache.calcite.rel.type">RelDataTypeSystem</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#typeSystem">typeSystem</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private <a href="../../util/SerializableCharset.html" title="class in org.apache.calcite.util">SerializableCharset</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#wrappedCharset">wrappedCharset</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="fields.inherited.from.class.org.apache.calcite.sql.type.AbstractSqlType">
<!-- -->
</a>
<h3>Fields inherited from class&nbsp;org.apache.calcite.sql.type.<a href="AbstractSqlType.html" title="class in org.apache.calcite.sql.type">AbstractSqlType</a></h3>
<code><a href="AbstractSqlType.html#isNullable">isNullable</a>, <a href="AbstractSqlType.html#typeName">typeName</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="fields.inherited.from.class.org.apache.calcite.rel.type.RelDataTypeImpl">
<!-- -->
</a>
<h3>Fields inherited from class&nbsp;org.apache.calcite.rel.type.<a href="../../rel/type/RelDataTypeImpl.html" title="class in org.apache.calcite.rel.type">RelDataTypeImpl</a></h3>
<code><a href="../../rel/type/RelDataTypeImpl.html#digest">digest</a>, <a href="../../rel/type/RelDataTypeImpl.html#fieldList">fieldList</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="fields.inherited.from.class.org.apache.calcite.rel.type.RelDataType">
<!-- -->
</a>
<h3>Fields inherited from interface&nbsp;org.apache.calcite.rel.type.<a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></h3>
<code><a href="../../rel/type/RelDataType.html#PRECISION_NOT_SPECIFIED">PRECISION_NOT_SPECIFIED</a>, <a href="../../rel/type/RelDataType.html#SCALE_NOT_SPECIFIED">SCALE_NOT_SPECIFIED</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">&nbsp;</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>&nbsp;</code></td>
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.apache.calcite.rel.type.RelDataTypeSystem,org.apache.calcite.sql.type.SqlTypeName)">BasicSqlType</a></span>&#8203;(<a href="../../rel/type/RelDataTypeSystem.html" title="interface in org.apache.calcite.rel.type">RelDataTypeSystem</a>&nbsp;typeSystem,
<a href="SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName)</code></th>
<td class="colLast">
<div class="block">Constructs a type with no parameters.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private </code></td>
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.apache.calcite.rel.type.RelDataTypeSystem,org.apache.calcite.sql.type.SqlTypeName,boolean,int,int,org.apache.calcite.sql.SqlCollation,org.apache.calcite.util.SerializableCharset)">BasicSqlType</a></span>&#8203;(<a href="../../rel/type/RelDataTypeSystem.html" title="interface in org.apache.calcite.rel.type">RelDataTypeSystem</a>&nbsp;typeSystem,
<a href="SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName,
boolean&nbsp;nullable,
int&nbsp;precision,
int&nbsp;scale,
<a href="../SqlCollation.html" title="class in org.apache.calcite.sql">SqlCollation</a>&nbsp;collation,
<a href="../../util/SerializableCharset.html" title="class in org.apache.calcite.util">SerializableCharset</a>&nbsp;wrappedCharset)</code></th>
<td class="colLast">
<div class="block">Internal constructor.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>&nbsp;</code></td>
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.apache.calcite.rel.type.RelDataTypeSystem,org.apache.calcite.sql.type.SqlTypeName,int)">BasicSqlType</a></span>&#8203;(<a href="../../rel/type/RelDataTypeSystem.html" title="interface in org.apache.calcite.rel.type">RelDataTypeSystem</a>&nbsp;typeSystem,
<a href="SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName,
int&nbsp;precision)</code></th>
<td class="colLast">
<div class="block">Constructs a type with precision/length but no scale.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>&nbsp;</code></td>
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.apache.calcite.rel.type.RelDataTypeSystem,org.apache.calcite.sql.type.SqlTypeName,int,int)">BasicSqlType</a></span>&#8203;(<a href="../../rel/type/RelDataTypeSystem.html" title="interface in org.apache.calcite.rel.type">RelDataTypeSystem</a>&nbsp;typeSystem,
<a href="SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName,
int&nbsp;precision,
int&nbsp;scale)</code></th>
<td class="colLast">
<div class="block">Constructs a type with precision/length and scale.</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">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</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>protected static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#checkPrecScale(org.apache.calcite.sql.type.SqlTypeName,boolean,boolean)">checkPrecScale</a></span>&#8203;(<a href="SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName,
boolean&nbsp;precisionSpecified,
boolean&nbsp;scaleSpecified)</code></th>
<td class="colLast">
<div class="block">Throws if <code>typeName</code> does not allow the given combination of
precision and scale.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>(package private) <a href="BasicSqlType.html" title="class in org.apache.calcite.sql.type">BasicSqlType</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createWithCharsetAndCollation(java.nio.charset.Charset,org.apache.calcite.sql.SqlCollation)">createWithCharsetAndCollation</a></span>&#8203;(java.nio.charset.Charset&nbsp;charset,
<a href="../SqlCollation.html" title="class in org.apache.calcite.sql">SqlCollation</a>&nbsp;collation)</code></th>
<td class="colLast">
<div class="block">Constructs a type with charset and collation.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>(package private) <a href="BasicSqlType.html" title="class in org.apache.calcite.sql.type">BasicSqlType</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createWithNullability(boolean)">createWithNullability</a></span>&#8203;(boolean&nbsp;nullable)</code></th>
<td class="colLast">
<div class="block">Constructs a type with nullablity.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#generateTypeString(java.lang.StringBuilder,boolean)">generateTypeString</a></span>&#8203;(java.lang.StringBuilder&nbsp;sb,
boolean&nbsp;withDetail)</code></th>
<td class="colLast">
<div class="block">Generates a string representation of this type.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>java.nio.charset.Charset</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCharset()">getCharset</a></span>()</code></th>
<td class="colLast">
<div class="block">Gets this type's character set, or null if this type cannot carry a
character set or has no character set defined.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="../SqlCollation.html" title="class in org.apache.calcite.sql">SqlCollation</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCollation()">getCollation</a></span>()</code></th>
<td class="colLast">
<div class="block">Gets this type's collation, or null if this type cannot carry a collation
or has no collation defined.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>java.lang.Object</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getLimit(boolean,org.apache.calcite.sql.type.SqlTypeName.Limit,boolean)">getLimit</a></span>&#8203;(boolean&nbsp;sign,
<a href="SqlTypeName.Limit.html" title="enum in org.apache.calcite.sql.type">SqlTypeName.Limit</a>&nbsp;limit,
boolean&nbsp;beyond)</code></th>
<td class="colLast">
<div class="block">Returns a value which is a limit for this type.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPrecision()">getPrecision</a></span>()</code></th>
<td class="colLast">
<div class="block">Gets the JDBC-defined precision for values of this type.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getScale()">getScale</a></span>()</code></th>
<td class="colLast">
<div class="block">Gets the scale of this type.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.org.apache.calcite.sql.type.AbstractSqlType">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.calcite.sql.type.<a href="AbstractSqlType.html" title="class in org.apache.calcite.sql.type">AbstractSqlType</a></h3>
<code><a href="AbstractSqlType.html#getFamily()">getFamily</a>, <a href="AbstractSqlType.html#getPrecedenceList()">getPrecedenceList</a>, <a href="AbstractSqlType.html#getSqlTypeName()">getSqlTypeName</a>, <a href="AbstractSqlType.html#isNullable()">isNullable</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.org.apache.calcite.rel.type.RelDataTypeImpl">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.calcite.rel.type.<a href="../../rel/type/RelDataTypeImpl.html" title="class in org.apache.calcite.rel.type">RelDataTypeImpl</a></h3>
<code><a href="../../rel/type/RelDataTypeImpl.html#computeDigest()">computeDigest</a>, <a href="../../rel/type/RelDataTypeImpl.html#equals(java.lang.Object)">equals</a>, <a href="../../rel/type/RelDataTypeImpl.html#extra(org.apache.calcite.rel.type.RelDataType)">extra</a>, <a href="../../rel/type/RelDataTypeImpl.html#getComparability()">getComparability</a>, <a href="../../rel/type/RelDataTypeImpl.html#getComponentType()">getComponentType</a>, <a href="../../rel/type/RelDataTypeImpl.html#getField(java.lang.String,boolean,boolean)">getField</a>, <a href="../../rel/type/RelDataTypeImpl.html#getFieldCount()">getFieldCount</a>, <a href="../../rel/type/RelDataTypeImpl.html#getFieldList()">getFieldList</a>, <a href="../../rel/type/RelDataTypeImpl.html#getFieldNames()">getFieldNames</a>, <a href="../../rel/type/RelDataTypeImpl.html#getFullTypeString()">getFullTypeString</a>, <a href="../../rel/type/RelDataTypeImpl.html#getIntervalQualifier()">getIntervalQualifier</a>, <a href="../../rel/type/RelDataTypeImpl.html#getKeyType()">getKeyType</a>, <a href="../../rel/type/RelDataTypeImpl.html#getSqlIdentifier()">getSqlIdentifier</a>, <a href="../../rel/type/RelDataTypeImpl.html#getStructKind()">getStructKind</a>, <a href="../../rel/type/RelDataTypeImpl.html#getValueType()">getValueType</a>, <a href="../../rel/type/RelDataTypeImpl.html#hashCode()">hashCode</a>, <a href="../../rel/type/RelDataTypeImpl.html#isDynamicStruct()">isDynamicStruct</a>, <a href="../../rel/type/RelDataTypeImpl.html#isStruct()">isStruct</a>, <a href="../../rel/type/RelDataTypeImpl.html#proto(org.apache.calcite.rel.type.RelDataType)">proto</a>, <a href="../../rel/type/RelDataTypeImpl.html#proto(org.apache.calcite.sql.type.SqlTypeName,boolean)">proto</a>, <a href="../../rel/type/RelDataTypeImpl.html#proto(org.apache.calcite.sql.type.SqlTypeName,int,boolean)">proto</a>, <a href="../../rel/type/RelDataTypeImpl.html#proto(org.apache.calcite.sql.type.SqlTypeName,int,int,boolean)">proto</a>, <a href="../../rel/type/RelDataTypeImpl.html#toString()">toString</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&nbsp;java.lang.Object</h3>
<code>clone, 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="precision">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>precision</h4>
<pre>private final&nbsp;int precision</pre>
</li>
</ul>
<a id="scale">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>scale</h4>
<pre>private final&nbsp;int scale</pre>
</li>
</ul>
<a id="typeSystem">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>typeSystem</h4>
<pre>private final&nbsp;<a href="../../rel/type/RelDataTypeSystem.html" title="interface in org.apache.calcite.rel.type">RelDataTypeSystem</a> typeSystem</pre>
</li>
</ul>
<a id="collation">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>collation</h4>
<pre>private final&nbsp;<a href="../SqlCollation.html" title="class in org.apache.calcite.sql">SqlCollation</a> collation</pre>
</li>
</ul>
<a id="wrappedCharset">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>wrappedCharset</h4>
<pre>private final&nbsp;<a href="../../util/SerializableCharset.html" title="class in org.apache.calcite.util">SerializableCharset</a> wrappedCharset</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="&lt;init&gt;(org.apache.calcite.rel.type.RelDataTypeSystem,org.apache.calcite.sql.type.SqlTypeName)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BasicSqlType</h4>
<pre>public&nbsp;BasicSqlType&#8203;(<a href="../../rel/type/RelDataTypeSystem.html" title="interface in org.apache.calcite.rel.type">RelDataTypeSystem</a>&nbsp;typeSystem,
<a href="SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName)</pre>
<div class="block">Constructs a type with no parameters. This should only be called from a
factory method.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>typeSystem</code> - Type system</dd>
<dd><code>typeName</code> - Type name</dd>
</dl>
</li>
</ul>
<a id="&lt;init&gt;(org.apache.calcite.rel.type.RelDataTypeSystem,org.apache.calcite.sql.type.SqlTypeName,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BasicSqlType</h4>
<pre>public&nbsp;BasicSqlType&#8203;(<a href="../../rel/type/RelDataTypeSystem.html" title="interface in org.apache.calcite.rel.type">RelDataTypeSystem</a>&nbsp;typeSystem,
<a href="SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName,
int&nbsp;precision)</pre>
<div class="block">Constructs a type with precision/length but no scale.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>typeSystem</code> - Type system</dd>
<dd><code>typeName</code> - Type name</dd>
<dd><code>precision</code> - Precision (called length for some types)</dd>
</dl>
</li>
</ul>
<a id="&lt;init&gt;(org.apache.calcite.rel.type.RelDataTypeSystem,org.apache.calcite.sql.type.SqlTypeName,int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BasicSqlType</h4>
<pre>public&nbsp;BasicSqlType&#8203;(<a href="../../rel/type/RelDataTypeSystem.html" title="interface in org.apache.calcite.rel.type">RelDataTypeSystem</a>&nbsp;typeSystem,
<a href="SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName,
int&nbsp;precision,
int&nbsp;scale)</pre>
<div class="block">Constructs a type with precision/length and scale.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>typeSystem</code> - Type system</dd>
<dd><code>typeName</code> - Type name</dd>
<dd><code>precision</code> - Precision (called length for some types)</dd>
<dd><code>scale</code> - Scale</dd>
</dl>
</li>
</ul>
<a id="&lt;init&gt;(org.apache.calcite.rel.type.RelDataTypeSystem,org.apache.calcite.sql.type.SqlTypeName,boolean,int,int,org.apache.calcite.sql.SqlCollation,org.apache.calcite.util.SerializableCharset)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>BasicSqlType</h4>
<pre>private&nbsp;BasicSqlType&#8203;(<a href="../../rel/type/RelDataTypeSystem.html" title="interface in org.apache.calcite.rel.type">RelDataTypeSystem</a>&nbsp;typeSystem,
<a href="SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName,
boolean&nbsp;nullable,
int&nbsp;precision,
int&nbsp;scale,
<a href="../SqlCollation.html" title="class in org.apache.calcite.sql">SqlCollation</a>&nbsp;collation,
<a href="../../util/SerializableCharset.html" title="class in org.apache.calcite.util">SerializableCharset</a>&nbsp;wrappedCharset)</pre>
<div class="block">Internal constructor.</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="checkPrecScale(org.apache.calcite.sql.type.SqlTypeName,boolean,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkPrecScale</h4>
<pre class="methodSignature">protected static&nbsp;void&nbsp;checkPrecScale&#8203;(<a href="SqlTypeName.html" title="enum in org.apache.calcite.sql.type">SqlTypeName</a>&nbsp;typeName,
boolean&nbsp;precisionSpecified,
boolean&nbsp;scaleSpecified)</pre>
<div class="block">Throws if <code>typeName</code> does not allow the given combination of
precision and scale.</div>
</li>
</ul>
<a id="createWithNullability(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createWithNullability</h4>
<pre class="methodSignature"><a href="BasicSqlType.html" title="class in org.apache.calcite.sql.type">BasicSqlType</a>&nbsp;createWithNullability&#8203;(boolean&nbsp;nullable)</pre>
<div class="block">Constructs a type with nullablity.</div>
</li>
</ul>
<a id="createWithCharsetAndCollation(java.nio.charset.Charset,org.apache.calcite.sql.SqlCollation)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createWithCharsetAndCollation</h4>
<pre class="methodSignature"><a href="BasicSqlType.html" title="class in org.apache.calcite.sql.type">BasicSqlType</a>&nbsp;createWithCharsetAndCollation&#8203;(java.nio.charset.Charset&nbsp;charset,
<a href="../SqlCollation.html" title="class in org.apache.calcite.sql">SqlCollation</a>&nbsp;collation)</pre>
<div class="block">Constructs a type with charset and collation.
<p>This must be a character type.</div>
</li>
</ul>
<a id="getPrecision()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPrecision</h4>
<pre class="methodSignature">public&nbsp;int&nbsp;getPrecision()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../rel/type/RelDataType.html#getPrecision()">RelDataType</a></code></span></div>
<div class="block">Gets the JDBC-defined precision for values of this type. Note that this
is not always the same as the user-specified precision. For example, the
type INTEGER has no user-specified precision, but this method returns 10
for an INTEGER type.
<p>Returns <a href="../../rel/type/RelDataType.html#PRECISION_NOT_SPECIFIED"><code>RelDataType.PRECISION_NOT_SPECIFIED</code></a> (-1) if precision is not
applicable for this type.</p></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../rel/type/RelDataType.html#getPrecision()">getPrecision</a></code>&nbsp;in interface&nbsp;<code><a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../rel/type/RelDataTypeImpl.html#getPrecision()">getPrecision</a></code>&nbsp;in class&nbsp;<code><a href="../../rel/type/RelDataTypeImpl.html" title="class in org.apache.calcite.rel.type">RelDataTypeImpl</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>number of decimal digits for exact numeric types; number of
decimal digits in mantissa for approximate numeric types; number of
decimal digits for fractional seconds of datetime types; length in
characters for character types; length in bytes for binary types; length
in bits for bit types; 1 for BOOLEAN; -1 if precision is not valid for
this type</dd>
</dl>
</li>
</ul>
<a id="getScale()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getScale</h4>
<pre class="methodSignature">public&nbsp;int&nbsp;getScale()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../rel/type/RelDataType.html#getScale()">RelDataType</a></code></span></div>
<div class="block">Gets the scale of this type. Returns <a href="../../rel/type/RelDataType.html#SCALE_NOT_SPECIFIED"><code>RelDataType.SCALE_NOT_SPECIFIED</code></a> (-1) if
scale is not valid for this type.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../rel/type/RelDataType.html#getScale()">getScale</a></code>&nbsp;in interface&nbsp;<code><a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../rel/type/RelDataTypeImpl.html#getScale()">getScale</a></code>&nbsp;in class&nbsp;<code><a href="../../rel/type/RelDataTypeImpl.html" title="class in org.apache.calcite.rel.type">RelDataTypeImpl</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>number of digits of scale</dd>
</dl>
</li>
</ul>
<a id="getCharset()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCharset</h4>
<pre class="methodSignature">public&nbsp;java.nio.charset.Charset&nbsp;getCharset()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../rel/type/RelDataType.html#getCharset()">RelDataType</a></code></span></div>
<div class="block">Gets this type's character set, or null if this type cannot carry a
character set or has no character set defined.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../rel/type/RelDataType.html#getCharset()">getCharset</a></code>&nbsp;in interface&nbsp;<code><a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../rel/type/RelDataTypeImpl.html#getCharset()">getCharset</a></code>&nbsp;in class&nbsp;<code><a href="../../rel/type/RelDataTypeImpl.html" title="class in org.apache.calcite.rel.type">RelDataTypeImpl</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>charset of type</dd>
</dl>
</li>
</ul>
<a id="getCollation()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCollation</h4>
<pre class="methodSignature">public&nbsp;<a href="../SqlCollation.html" title="class in org.apache.calcite.sql">SqlCollation</a>&nbsp;getCollation()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../rel/type/RelDataType.html#getCollation()">RelDataType</a></code></span></div>
<div class="block">Gets this type's collation, or null if this type cannot carry a collation
or has no collation defined.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../rel/type/RelDataType.html#getCollation()">getCollation</a></code>&nbsp;in interface&nbsp;<code><a href="../../rel/type/RelDataType.html" title="interface in org.apache.calcite.rel.type">RelDataType</a></code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../rel/type/RelDataTypeImpl.html#getCollation()">getCollation</a></code>&nbsp;in class&nbsp;<code><a href="../../rel/type/RelDataTypeImpl.html" title="class in org.apache.calcite.rel.type">RelDataTypeImpl</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>collation of type</dd>
</dl>
</li>
</ul>
<a id="generateTypeString(java.lang.StringBuilder,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>generateTypeString</h4>
<pre class="methodSignature">protected&nbsp;void&nbsp;generateTypeString&#8203;(java.lang.StringBuilder&nbsp;sb,
boolean&nbsp;withDetail)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../rel/type/RelDataTypeImpl.html#generateTypeString(java.lang.StringBuilder,boolean)">RelDataTypeImpl</a></code></span></div>
<div class="block">Generates a string representation of this type.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../rel/type/RelDataTypeImpl.html#generateTypeString(java.lang.StringBuilder,boolean)">generateTypeString</a></code>&nbsp;in class&nbsp;<code><a href="../../rel/type/RelDataTypeImpl.html" title="class in org.apache.calcite.rel.type">RelDataTypeImpl</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>sb</code> - StringBuilder into which to generate the string</dd>
<dd><code>withDetail</code> - when true, all detail information needed to compute a
unique digest (and return from getFullTypeString) should
be included;</dd>
</dl>
</li>
</ul>
<a id="getLimit(boolean,org.apache.calcite.sql.type.SqlTypeName.Limit,boolean)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getLimit</h4>
<pre class="methodSignature">public&nbsp;java.lang.Object&nbsp;getLimit&#8203;(boolean&nbsp;sign,
<a href="SqlTypeName.Limit.html" title="enum in org.apache.calcite.sql.type">SqlTypeName.Limit</a>&nbsp;limit,
boolean&nbsp;beyond)</pre>
<div class="block">Returns a value which is a limit for this type.
<p>For example,
<table border="1">
<caption>Limits</caption>
<tr>
<th>Datatype</th>
<th>sign</th>
<th>limit</th>
<th>beyond</th>
<th>precision</th>
<th>scale</th>
<th>Returns</th>
</tr>
<tr>
<td>Integer</td>
<td>true</td>
<td>true</td>
<td>false</td>
<td>-1</td>
<td>-1</td>
<td>2147483647 (2 ^ 31 -1 = MAXINT)</td>
</tr>
<tr>
<td>Integer</td>
<td>true</td>
<td>true</td>
<td>true</td>
<td>-1</td>
<td>-1</td>
<td>2147483648 (2 ^ 31 = MAXINT + 1)</td>
</tr>
<tr>
<td>Integer</td>
<td>false</td>
<td>true</td>
<td>false</td>
<td>-1</td>
<td>-1</td>
<td>-2147483648 (-2 ^ 31 = MININT)</td>
</tr>
<tr>
<td>Boolean</td>
<td>true</td>
<td>true</td>
<td>false</td>
<td>-1</td>
<td>-1</td>
<td>TRUE</td>
</tr>
<tr>
<td>Varchar</td>
<td>true</td>
<td>true</td>
<td>false</td>
<td>10</td>
<td>-1</td>
<td>'ZZZZZZZZZZ'</td>
</tr>
</table></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>sign</code> - If true, returns upper limit, otherwise lower limit</dd>
<dd><code>limit</code> - If true, returns value at or near to overflow; otherwise
value at or near to underflow</dd>
<dd><code>beyond</code> - If true, returns the value just beyond the limit, otherwise
the value at the limit</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Limit value</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/BasicSqlType.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&nbsp;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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</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 &#169; 2012&#x2013;2019 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</body>
</html>