MySQL 9.1.0
Source Code Documentation
|
Public Member Functions | |
uca_scanner_900 (const Mb_wc mb_wc, const CHARSET_INFO *cs_arg, const uint8_t *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 | |
unsigned | get_weight_level () const |
Get the level the scanner is currently working on. More... | |
Private Member Functions | |
int | next_raw () |
int | more_weight () |
uint16_t | apply_case_first (uint16_t weight) |
uint16_t | apply_reorder_param (uint16_t 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 uint8_t *str, size_t length) | |
const uint16_t * | 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_t * | 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 | |
unsigned | weight_lv {0} |
const uint16_t * | wbeg |
unsigned | wbeg_stride {0} |
const uint8_t * | sbeg |
const uint8_t * | send |
const MY_UCA_INFO * | uca {nullptr} |
uint16_t | implicit [10] {} |
my_wc_t | prev_char {0} |
const CHARSET_INFO * | cs |
unsigned | num_of_ce_left {0} |
const uint8_t * | 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 |