Ejemplo n.º 1
0
 private AkCollator collator(
     ComparisonCondition cond, TPreparedExpression left, TPreparedExpression right) {
   TInstance leftInstance = left.resultType();
   TInstance rightInstance = right.resultType();
   TClass tClass = leftInstance.typeClass();
   assert tClass.compatibleForCompare(rightInstance.typeClass())
       : tClass + " != " + rightInstance.typeClass();
   if (tClass.underlyingType() != UnderlyingType.STRING) return null;
   CharacterTypeAttributes leftAttributes = StringAttribute.characterTypeAttributes(leftInstance);
   CharacterTypeAttributes rightAttributes =
       StringAttribute.characterTypeAttributes(rightInstance);
   return TString.mergeAkCollators(leftAttributes, rightAttributes);
 }