public class SqlCollation
extends java.lang.Object
implements java.io.Serializable
SqlCollation
is an object representing a Collate
statement. It is immutable.Modifier and Type | Class and Description |
---|---|
static class |
SqlCollation.Coercibility
A <character value expression> consisting of a column
reference has the coercibility characteristic Implicit, with collating
sequence as defined when the column was created.
|
Modifier and Type | Field and Description |
---|---|
private SqlCollation.Coercibility |
coercibility |
static SqlCollation |
COERCIBLE |
protected java.lang.String |
collationName |
static SqlCollation |
IMPLICIT |
protected java.util.Locale |
locale |
protected java.lang.String |
strength |
protected SerializableCharset |
wrappedCharset |
Constructor and Description |
---|
SqlCollation(SqlCollation.Coercibility coercibility)
Creates a SqlCollation with the default collation name and the given
coercibility.
|
SqlCollation(java.lang.String collation,
SqlCollation.Coercibility coercibility)
Creates a Collation by its name and its coercibility
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.nio.charset.Charset |
getCharset() |
SqlCollation.Coercibility |
getCoercibility() |
protected static SqlCollation |
getCoercibilityDyadic(SqlCollation col1,
SqlCollation col2)
|
static java.lang.String |
getCoercibilityDyadicComparison(SqlCollation col1,
SqlCollation col2)
Returns the collating sequence (the collation name) to use for the
resulting value of a comparison.
|
static SqlCollation |
getCoercibilityDyadicOperator(SqlCollation col1,
SqlCollation col2)
Returns the collating sequence (the collation name) and the coercibility
for the resulting value of a dyadic operator.
|
static SqlCollation |
getCoercibilityDyadicOperatorThrows(SqlCollation col1,
SqlCollation col2)
Returns the collating sequence (the collation name) and the coercibility
for the resulting value of a dyadic operator.
|
java.lang.String |
getCollationName() |
int |
hashCode() |
java.lang.String |
toString() |
void |
unparse(SqlWriter writer) |
public static final SqlCollation COERCIBLE
public static final SqlCollation IMPLICIT
protected final java.lang.String collationName
protected final SerializableCharset wrappedCharset
protected final java.util.Locale locale
protected final java.lang.String strength
private final SqlCollation.Coercibility coercibility
public SqlCollation(java.lang.String collation, SqlCollation.Coercibility coercibility)
collation
- Collation specificationcoercibility
- Coercibilitypublic SqlCollation(SqlCollation.Coercibility coercibility)
coercibility
- Coercibilitypublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public static SqlCollation getCoercibilityDyadicOperator(SqlCollation col1, SqlCollation col2)
col1
- first operand for the dyadic operationcol2
- second operand for the dyadic operationSQL:1999 Part 2 Section 4.2.3 Table 2
public static SqlCollation getCoercibilityDyadicOperatorThrows(SqlCollation col1, SqlCollation col2)
col1
- first operand for the dyadic operationcol2
- second operand for the dyadic operationCalciteException
- from
CalciteResource.invalidCompare(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
or
CalciteResource.differentCollations(java.lang.String, java.lang.String)
if no collating sequence can be deducedSQL:1999 Part 2 Section 4.2.3 Table 2
public static java.lang.String getCoercibilityDyadicComparison(SqlCollation col1, SqlCollation col2)
col1
- first operand for the dyadic operationcol2
- second operand for the dyadic operationCalciteResource.invalidCompare(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
SQL:1999 Part 2 Section 4.2.3 Table 3
protected static SqlCollation getCoercibilityDyadic(SqlCollation col1, SqlCollation col2)
public java.lang.String toString()
toString
in class java.lang.Object
public void unparse(SqlWriter writer)
public java.nio.charset.Charset getCharset()
public final java.lang.String getCollationName()
public final SqlCollation.Coercibility getCoercibility()
Copyright © 2012–2019 The Apache Software Foundation. All rights reserved.