package
9.0.0-alpha+incompatible
Repository: https://github.com/pingcap/tidb.git
Documentation: pkg.go.dev

# Packages

# Functions

CanUseRawMemAsKey returns true if current collator can use the original raw memory as the key only return true for binCollator and derivedBinCollator.
CollationID2Name return the collation name by the given id.
CollationName2ID return the collation id by the given name.
CollationToProto converts collation from string to int32(used by protocol).
CompatibleCollate checks whether the two collate are the same.
ConvertAndGetBinCollation converts collation to binary collation.
ConvertAndGetBinCollator converts collation to binary collator.
GetBinaryCollator gets the binary collator, it is often used when we want to apply binary compare.
GetBinaryCollatorSlice gets the binary collator slice with len n.
GetCollationByName wraps charset.GetCollationByName, it checks the collation.
GetCollator get the collator according to collate, it will return the binary collator if the corresponding collator doesn't exist.
GetCollatorByID get the collator according to id, it will return the binary collator if the corresponding collator doesn't exist.
GetSupportedCollations gets information for all collations supported so far.
IsBinCollation returns if the collation is 'xx_bin' or 'bin'.
IsCICollation returns if the collation is case-insensitive.
IsDefaultCollationForUTF8MB4 returns if the collation is DefaultCollationForUTF8MB4.
IsPadSpaceCollation returns whether the collation is a PAD SPACE collation.
NewCollationEnabled returns if the new collations are enabled.
ProtoToCollation converts collation from int32(used by protocol) to string.
RestoreCollationIDIfNeeded restores a collation id if the new collations are enabled.
RewriteNewCollationIDIfNeeded rewrites a collation id if the new collations are enabled.
SetNewCollationEnabledForTest sets if the new collation are enabled in test.
SubstituteMissingCollationToDefault will switch to the default collation if new collations are enabled and the specified collation is not supported.

# Constants

DefaultLen is set for datum if the string datum don't know its length.

# Variables

ErrIllegalMix2Collation is returned when illegal mix of 2 collations.
ErrIllegalMix3Collation is returned when illegal mix of 3 collations.
ErrIllegalMixCollation is returned when illegal mix of collations.
ErrUnsupportedCollation is returned when an unsupported collation is specified.

# Interfaces

Collator provides functionality for comparing strings for a given collation order.
WildcardPattern is the interface used for wildcard pattern match.