Class ExpressionCollation
java.lang.Object
dev.frostlake.executor.expressions.ExpressionCollation
The collation an expression carries into a comparison, with the level it holds it at — see
CollationLevel. The specification is kept lower-cased, as live reports and compares it:
'EN-CI' and 'en-ci' are one collation.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ExpressionCollationThe collation of an expression that carries none. -
Method Summary
Modifier and TypeMethodDescriptionstatic ExpressionCollationA column's declared collation, or none for a column declared without one.static ExpressionCollationcombine(ExpressionCollation first, ExpressionCollation second) The collation two operands settle on: the higher level's, or the shared one when both stand at the same level.static ExpressionCollationA collation named in the statement.getLevel()The level the collation is held at.getSpec()The lower-cased specification, or null when there is none.toRules()The rules a comparison under this collation runs by, or null for a binary comparison.
-
Field Details
-
NONE
The collation of an expression that carries none.
-
-
Method Details
-
explicit
A collation named in the statement. The empty specification is no collation at all: COLLATE '' takes a column's collation AWAY, so the other operand's decides (live-verified).- Parameters:
spec- the specification as written- Returns:
- the collation it names
-
column
A column's declared collation, or none for a column declared without one.- Parameters:
spec- the column's specification, or null- Returns:
- the collation it carries
-
getSpec
The lower-cased specification, or null when there is none. -
getLevel
The level the collation is held at. -
toRules
The rules a comparison under this collation runs by, or null for a binary comparison. -
combine
The collation two operands settle on: the higher level's, or the shared one when both stand at the same level. Two DIFFERENT specifications at one level are a compilation error that namesfirstand thensecond— which operand counts as first is the caller's to know, because live's order depends on the construct: a comparison names its right side first, a concatenation and LIKE their left.- Parameters:
first- the collation named first in a refusalsecond- the collation named second- Returns:
- the collation both compare under
-