MySQL 8.0.39
Source Code Documentation
my_uca_scanner Class Reference

Unicode Collation Algorithm: Collation element (weight) scanner, for consequent scan of collations weights from a string. More...

Inheritance diagram for my_uca_scanner:
[legend]

Public Member Functions

uint get_weight_level () const
 Get the level the scanner is currently working on. More...
 

Protected Member Functions

 my_uca_scanner (const CHARSET_INFO *cs_arg, const uchar *str, size_t length)
 
const uint16contraction_find (my_wc_t wc0, size_t *chars_skipped)
 Find a contraction in the input stream and return its weight array. More...
 
const uint16previous_context_find (my_wc_t wc0, my_wc_t wc1)
 Find weight for contraction with previous context and return its weight array. More...
 

Protected Attributes

uint weight_lv {0}
 
const uint16wbeg
 
uint wbeg_stride {0}
 
const ucharsbeg
 
const ucharsend
 
const MY_UCA_INFOuca
 
uint16 implicit [10]
 
my_wc_t prev_char {0}
 
const CHARSET_INFOcs
 
uint num_of_ce_left {0}
 
const ucharsbeg_dup
 

Detailed Description

Unicode Collation Algorithm: Collation element (weight) scanner, for consequent scan of collations weights from a string.

Only meant as a base class; instantiate uca_scanner_any or uca_scanner_900 instead of this.

Constructor & Destructor Documentation

◆ my_uca_scanner()

my_uca_scanner::my_uca_scanner ( const CHARSET_INFO cs_arg,
const uchar str,
size_t  length 
)
inlineprotected

Member Function Documentation

◆ contraction_find()

const uint16 * my_uca_scanner::contraction_find ( my_wc_t  wc0,
size_t *  chars_skipped 
)
protected

Find a contraction in the input stream and return its weight array.

Scan input code points to find a longest path in contraction trie which contains all these code points. If the ending node of this path is end of contraction, return the weight array.

Parameters
wc0The first code point of the contraction (which should have the MY_UCA_CNT_HEAD flag).
[out]chars_skippedHow many code points where skipped in the contraction we found. Only makes sense if we actually found one.
Returns
Weight array
Return values
NULLno contraction found
ptrcontraction weight array

◆ get_weight_level()

uint my_uca_scanner::get_weight_level ( ) const
inline

Get the level the scanner is currently working on.

The string can be scanned multiple times (if the collation requires multi-level comparisons, e.g. for accent or case sensitivity); first to get primary weights, then from the start again for secondary, etc.

◆ previous_context_find()

ALWAYS_INLINE const uint16 * my_uca_scanner::previous_context_find ( my_wc_t  wc0,
my_wc_t  wc1 
)
inlineprotected

Find weight for contraction with previous context and return its weight array.

Parameters
wc0Previous code point
wc1Current code point
Returns
Weight array
Return values
NULL- no contraction with context found
ptr- contraction weight array

Member Data Documentation

◆ cs

const CHARSET_INFO* my_uca_scanner::cs
protected

◆ implicit

uint16 my_uca_scanner::implicit[10]
protected

◆ num_of_ce_left

uint my_uca_scanner::num_of_ce_left {0}
protected

◆ prev_char

my_wc_t my_uca_scanner::prev_char {0}
protected

◆ sbeg

const uchar* my_uca_scanner::sbeg
protected

◆ sbeg_dup

const uchar* my_uca_scanner::sbeg_dup
protected

◆ send

const uchar* my_uca_scanner::send
protected

◆ uca

const MY_UCA_INFO* my_uca_scanner::uca
protected

◆ wbeg

const uint16* my_uca_scanner::wbeg
protected

◆ wbeg_stride

uint my_uca_scanner::wbeg_stride {0}
protected

◆ weight_lv

uint my_uca_scanner::weight_lv {0}
protected

The documentation for this class was generated from the following file: