github.com/dolthub/go-mysql-server@v0.18.0/sql/encodings/cp1257_lithuanian_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 // Cp1257_lithuanian_ci_RuneWeight returns the weight of a given rune based on its relational sort order from 18 // the `cp1257_lithuanian_ci` collation. 19 func Cp1257_lithuanian_ci_RuneWeight(r rune) int32 { 20 weight, ok := cp1257_lithuanian_ci_Weights[r] 21 if ok { 22 return weight 23 } else { 24 return 2147483647 25 } 26 } 27 28 // cp1257_lithuanian_ci_Weights contain a map from rune to weight for the `cp1257_lithuanian_ci` collation. The 29 // map primarily contains mappings that have a random order. Mappings that fit into a sequential range (and are long 30 // enough) are defined in the calling function to save space. 31 var cp1257_lithuanian_ci_Weights = map[rune]int32{ 32 0: 0, 33 1: 1, 34 2: 2, 35 3: 3, 36 4: 4, 37 5: 5, 38 6: 6, 39 7: 7, 40 8: 8, 41 9: 9, 42 10: 10, 43 11: 11, 44 12: 12, 45 13: 13, 46 14: 14, 47 15: 15, 48 16: 16, 49 17: 17, 50 18: 18, 51 19: 19, 52 20: 20, 53 21: 21, 54 22: 22, 55 23: 23, 56 24: 24, 57 25: 25, 58 26: 26, 59 27: 27, 60 28: 28, 61 29: 29, 62 30: 30, 63 31: 31, 64 32: 32, 65 33: 33, 66 34: 34, 67 35: 35, 68 36: 36, 69 37: 37, 70 38: 38, 71 39: 39, 72 40: 40, 73 41: 41, 74 42: 42, 75 43: 43, 76 44: 44, 77 45: 45, 78 46: 46, 79 47: 47, 80 48: 48, 81 49: 49, 82 50: 50, 83 51: 51, 84 52: 52, 85 53: 53, 86 54: 54, 87 55: 55, 88 56: 56, 89 57: 57, 90 58: 58, 91 59: 59, 92 60: 60, 93 61: 61, 94 62: 62, 95 63: 63, 96 64: 64, 97 65: 65, 98 97: 65, 99 260: 66, 100 66: 67, 101 98: 67, 102 67: 68, 103 99: 68, 104 268: 69, 105 269: 69, 106 68: 70, 107 100: 70, 108 69: 71, 109 101: 71, 110 280: 72, 111 281: 72, 112 278: 73, 113 279: 73, 114 70: 74, 115 102: 74, 116 71: 75, 117 103: 75, 118 72: 76, 119 104: 76, 120 73: 77, 121 105: 77, 122 89: 78, 123 121: 78, 124 302: 79, 125 303: 79, 126 74: 80, 127 106: 80, 128 75: 81, 129 107: 81, 130 76: 82, 131 108: 82, 132 77: 83, 133 109: 83, 134 78: 84, 135 110: 84, 136 79: 85, 137 111: 85, 138 80: 86, 139 112: 86, 140 81: 87, 141 113: 87, 142 82: 88, 143 114: 88, 144 83: 89, 145 115: 89, 146 352: 90, 147 353: 90, 148 84: 91, 149 116: 91, 150 85: 92, 151 117: 92, 152 362: 93, 153 363: 93, 154 370: 94, 155 371: 94, 156 86: 95, 157 118: 95, 158 87: 96, 159 119: 96, 160 88: 97, 161 120: 97, 162 91: 98, 163 92: 99, 164 93: 100, 165 94: 101, 166 95: 102, 167 96: 103, 168 123: 104, 169 124: 105, 170 125: 106, 171 126: 107, 172 90: 108, 173 122: 108, 174 127: 108, 175 160: 108, 176 162: 108, 177 163: 108, 178 164: 108, 179 166: 108, 180 167: 108, 181 168: 108, 182 169: 108, 183 171: 108, 184 172: 108, 185 173: 108, 186 174: 108, 187 175: 108, 188 176: 108, 189 177: 108, 190 178: 108, 191 179: 108, 192 180: 108, 193 181: 108, 194 182: 108, 195 183: 108, 196 184: 108, 197 185: 108, 198 187: 108, 199 188: 108, 200 189: 108, 201 190: 108, 202 196: 108, 203 197: 108, 204 198: 108, 205 201: 108, 206 211: 108, 207 213: 108, 208 214: 108, 209 215: 108, 210 216: 108, 211 220: 108, 212 223: 108, 213 228: 108, 214 229: 108, 215 230: 108, 216 233: 108, 217 243: 108, 218 245: 108, 219 246: 108, 220 247: 108, 221 248: 108, 222 252: 108, 223 256: 108, 224 257: 108, 225 261: 108, 226 262: 108, 227 263: 108, 228 274: 108, 229 275: 108, 230 290: 108, 231 291: 108, 232 298: 108, 233 299: 108, 234 310: 108, 235 311: 108, 236 315: 108, 237 316: 108, 238 321: 108, 239 322: 108, 240 323: 108, 241 324: 108, 242 325: 108, 243 326: 108, 244 332: 108, 245 333: 108, 246 342: 108, 247 343: 108, 248 346: 108, 249 347: 108, 250 377: 108, 251 378: 108, 252 379: 108, 253 380: 108, 254 381: 108, 255 382: 108, 256 711: 108, 257 729: 108, 258 731: 108, 259 8211: 108, 260 8212: 108, 261 8216: 108, 262 8217: 108, 263 8218: 108, 264 8220: 108, 265 8221: 108, 266 8222: 108, 267 8224: 108, 268 8225: 108, 269 8226: 108, 270 8230: 108, 271 8240: 108, 272 8249: 108, 273 8250: 108, 274 8364: 108, 275 8482: 108, 276 }