MySQL 8.0.39
Source Code Documentation
|
Public Member Functions | |
uca_scanner_900 (const Mb_wc mb_wc, const CHARSET_INFO *cs_arg, const uchar *str, size_t length) | |
int | next () |
template<class T , class U > | |
void | for_each_weight (T func, U preaccept_data) |
For each weight in sequence, call "func", which should have a function signature of "bool func(int weight, bool is_level_separator)". More... | |
template<class T , class U > | |
ALWAYS_INLINE void | for_each_weight (T func, U preaccept_data) |
Public Member Functions inherited from my_uca_scanner | |
uint | get_weight_level () const |
Get the level the scanner is currently working on. More... | |
Private Member Functions | |
int | next_raw () |
int | more_weight () |
uint16 | apply_case_first (uint16 weight) |
uint16 | apply_reorder_param (uint16 weight) |
Change a weight according to the reorder parameters. More... | |
int | next_implicit (my_wc_t ch) |
void | my_put_jamo_weights (my_wc_t *hangul_jamo, int jamo_cnt) |
int | handle_ja_contraction_quat_wt () |
Return quaternary weight when running for that level. More... | |
int | handle_ja_common_quat_wt (my_wc_t wc) |
Check whether quaternary weight is needed for character with Japanese kana-sensitive collation. More... | |
Private Attributes | |
const Mb_wc | mb_wc |
bool | return_origin_weight {true} |
bool | has_quaternary_weight {false} |
Additional Inherited Members | |
Protected Member Functions inherited from my_uca_scanner | |
my_uca_scanner (const CHARSET_INFO *cs_arg, const uchar *str, size_t length) | |
const uint16 * | contraction_find (my_wc_t wc0, size_t *chars_skipped) |
Find a contraction in the input stream and return its weight array. More... | |
const uint16 * | previous_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 inherited from my_uca_scanner | |
uint | weight_lv {0} |
const uint16 * | wbeg |
uint | wbeg_stride {0} |
const uchar * | sbeg |
const uchar * | send |
const MY_UCA_INFO * | uca |
uint16 | implicit [10] |
my_wc_t | prev_char {0} |
const CHARSET_INFO * | cs |
uint | num_of_ce_left {0} |
const uchar * | sbeg_dup |
|
inline |
|
private |
|
private |
Change a weight according to the reorder parameters.
weight | The weight to change |
reordered | weight |
|
inline |
For each weight in sequence, call "func", which should have a function signature of "bool func(int weight, bool is_level_separator)".
Stops the iteration early if "func" returns false.
This is morally equivalent to
int weight; while ((weight= next()) >= 0) { if (!func(weight, weight == 0)) break; }
except that it might employ optimizations internally to speed up the process. These optimizations will not modify the number of calls to func() (or their order), but might affect the internal scanner state during the calls, so func() should not try to read from the scanner except by calling public member functions.
As a special optimization, if "bool preaccept_data(int num_weights)" returns true, the next "num_weights" calls to func() must return true. This is so that bounds checking costs can be amortized over fewer calls.
ALWAYS_INLINE void uca_scanner_900< Mb_wc, LEVELS_FOR_COMPARE >::for_each_weight | ( | T | func, |
U | preaccept_data | ||
) |
|
private |
Check whether quaternary weight is needed for character with Japanese kana-sensitive collation.
If it is, return quaternary weight when running for that level.
0 | - Quaternary weight check is done. |
-1 | - There is no quaternary weight for this character. |
others | - Quaternary weight for this character. |
|
private |
Return quaternary weight when running for that level.
0 | - Do not return quaternary weight. |
others | - Quaternary weight for this character. |
|
inlineprivate |
|
private |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
private |
|
private |
|
private |