github.com/dolthub/go-mysql-server@v0.18.0/sql/encodings/utf16_polish_ci.go (about) 1 // Copyright 2023 Dolthub, Inc. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 package encodings 16 17 // Utf16_polish_ci_RuneWeight returns the weight of a given rune based on its relational sort order from 18 // the `utf16_polish_ci` collation. 19 func Utf16_polish_ci_RuneWeight(r rune) int32 { 20 weight, ok := common_utf_polish_ci_Weights()[r] 21 if ok { 22 return weight 23 } else if r >= 9003 && r <= 9168 { 24 return r - 8070 25 } else if r >= 9475 && r <= 9632 { 26 return r - 8323 27 } else if r >= 10496 && r <= 10626 { 28 return r - 8775 29 } else if r >= 10765 && r <= 10867 { 30 return r - 8800 31 } else if r >= 10872 && r <= 10971 { 32 return r - 8803 33 } else if r >= 10240 && r <= 10495 { 34 return r - 8022 35 } else if r >= 5121 && r <= 5499 { 36 return r + 555 37 } else if r >= 5543 && r <= 5740 { 38 return r + 563 39 } else if r >= 40960 && r <= 42124 { 40 return r - 34146 41 } else if r >= 20241 && r <= 20358 { 42 return r - 11989 43 } else if r >= 20416 && r <= 20523 { 44 return r - 11989 45 } else if r >= 20524 && r <= 20698 { 46 return r - 11989 47 } else if r >= 21571 && r <= 21693 { 48 return r - 11989 49 } else if r >= 21694 && r <= 21895 { 50 return r - 11989 51 } else if r >= 22121 && r <= 22230 { 52 return r - 11989 53 } else if r >= 22320 && r <= 22592 { 54 return r - 11989 55 } else if r >= 22900 && r <= 23375 { 56 return r - 11988 57 } else if r >= 23665 && r <= 23833 { 58 return r - 11988 59 } else if r >= 23889 && r <= 23994 { 60 return r - 11988 61 } else if r >= 24062 && r <= 24177 { 62 return r - 11988 63 } else if r >= 24605 && r <= 24724 { 64 return r - 11987 65 } else if r >= 25164 && r <= 25289 { 66 return r - 11987 67 } else if r >= 25343 && r <= 25467 { 68 return r - 11987 69 } else if r >= 25505 && r <= 25754 { 70 return r - 11987 71 } else if r >= 25797 && r <= 25902 { 72 return r - 11987 73 } else if r >= 26793 && r <= 27138 { 74 return r - 11984 75 } else if r >= 27156 && r <= 27347 { 76 return r - 11984 77 } else if r >= 28187 && r <= 28316 { 78 return r - 11984 79 } else if r >= 28452 && r <= 28651 { 80 return r - 11984 81 } else if r >= 28671 && r <= 28778 { 82 return r - 11984 83 } else if r >= 28890 && r <= 29001 { 84 return r - 11984 85 } else if r >= 30466 && r <= 30682 { 86 return r - 11984 87 } else if r >= 30707 && r <= 30827 { 88 return r - 11984 89 } else if r >= 31521 && r <= 31680 { 90 return r - 11984 91 } else if r >= 31681 && r <= 31806 { 92 return r - 11984 93 } else if r >= 32048 && r <= 32160 { 94 return r - 11984 95 } else if r >= 32415 && r <= 32565 { 96 return r - 11984 97 } else if r >= 32908 && r <= 33240 { 98 return r - 11984 99 } else if r >= 33402 && r <= 33509 { 100 return r - 11984 101 } else if r >= 33591 && r <= 33737 { 102 return r - 11984 103 } else if r >= 33880 && r <= 34030 { 104 return r - 11984 105 } else if r >= 34045 && r <= 34253 { 106 return r - 11984 107 } else if r >= 34411 && r <= 34746 { 108 return r - 11984 109 } else if r >= 34747 && r <= 34847 { 110 return r - 11984 111 } else if r >= 35328 && r <= 35498 { 112 return r - 11984 113 } else if r >= 35744 && r <= 35894 { 114 return r - 11984 115 } else if r >= 36336 && r <= 36522 { 116 return r - 11984 117 } else if r >= 36791 && r <= 36899 { 118 return r - 11984 119 } else if r >= 37429 && r <= 37636 { 120 return r - 11984 121 } else if r >= 37707 && r <= 38020 { 122 return r - 11984 123 } else if r >= 38021 && r <= 38262 { 124 return r - 11984 125 } else if r >= 39410 && r <= 39530 { 126 return r - 11984 127 } else if r >= 39792 && r <= 40023 { 128 return r - 11984 129 } else if r >= 40060 && r <= 40164 { 130 return r - 11984 131 } else if r >= 40165 && r <= 40372 { 132 return r - 11984 133 } else if r >= 13312 && r <= 19893 { 134 return r + 15586 135 } else if r >= 1970 && r <= 2304 { 136 return r + 33726 137 } else if r >= 6517 && r <= 6623 { 138 return r + 30537 139 } else if r >= 6657 && r <= 7423 { 140 return r + 30505 141 } else if r >= 7533 && r <= 7679 { 142 return r + 30397 143 } else if r >= 11022 && r <= 11903 { 144 return r + 27435 145 } else if r >= 42183 && r <= 55295 { 146 return r - 2614 147 } else if r >= 57345 && r <= 63743 { 148 return r - 4662 149 } else if r >= 64107 && r <= 64255 { 150 return r - 5023 151 } else if r >= 65536 && r <= 1114111 { 152 return 59412 153 } else { 154 return 2147483647 155 } 156 }