github.com/dolthub/go-mysql-server@v0.18.0/sql/encodings/latin1_danish_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 // Latin1_danish_ci_RuneWeight returns the weight of a given rune based on its relational sort order from 18 // the `latin1_danish_ci` collation. 19 func Latin1_danish_ci_RuneWeight(r rune) int32 { 20 weight, ok := latin1_danish_ci_Weights[r] 21 if ok { 22 return weight 23 } else { 24 return 2147483647 25 } 26 } 27 28 // latin1_danish_ci_Weights contain a map from rune to weight for the `latin1_danish_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 latin1_danish_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 192: 65, 100 193: 65, 101 194: 65, 102 195: 65, 103 224: 65, 104 225: 65, 105 226: 65, 106 227: 65, 107 66: 66, 108 98: 66, 109 67: 67, 110 99: 67, 111 199: 67, 112 231: 67, 113 68: 68, 114 100: 68, 115 208: 68, 116 240: 68, 117 69: 69, 118 101: 69, 119 200: 69, 120 201: 69, 121 202: 69, 122 203: 69, 123 232: 69, 124 233: 69, 125 234: 69, 126 235: 69, 127 70: 70, 128 102: 70, 129 71: 71, 130 103: 71, 131 72: 72, 132 104: 72, 133 73: 73, 134 105: 73, 135 204: 73, 136 205: 73, 137 206: 73, 138 207: 73, 139 236: 73, 140 237: 73, 141 238: 73, 142 239: 73, 143 74: 74, 144 106: 74, 145 75: 75, 146 107: 75, 147 76: 76, 148 108: 76, 149 77: 77, 150 109: 77, 151 78: 78, 152 110: 78, 153 209: 78, 154 241: 78, 155 79: 79, 156 111: 79, 157 210: 79, 158 211: 79, 159 212: 79, 160 213: 79, 161 242: 79, 162 243: 79, 163 244: 79, 164 245: 79, 165 80: 80, 166 112: 80, 167 81: 81, 168 113: 81, 169 82: 82, 170 114: 82, 171 83: 83, 172 115: 83, 173 84: 84, 174 116: 84, 175 85: 85, 176 117: 85, 177 217: 85, 178 218: 85, 179 219: 85, 180 249: 85, 181 250: 85, 182 251: 85, 183 86: 86, 184 118: 86, 185 87: 87, 186 119: 87, 187 88: 88, 188 120: 88, 189 89: 89, 190 121: 89, 191 220: 89, 192 221: 89, 193 252: 89, 194 253: 89, 195 90: 90, 196 122: 90, 197 91: 91, 198 196: 91, 199 198: 91, 200 228: 91, 201 230: 91, 202 92: 92, 203 214: 92, 204 216: 92, 205 246: 92, 206 248: 92, 207 93: 93, 208 197: 93, 209 229: 93, 210 94: 94, 211 95: 95, 212 96: 96, 213 123: 97, 214 124: 98, 215 125: 99, 216 126: 100, 217 127: 101, 218 8364: 102, 219 129: 103, 220 8218: 104, 221 402: 105, 222 8222: 106, 223 8230: 107, 224 8224: 108, 225 8225: 109, 226 710: 110, 227 8240: 111, 228 352: 112, 229 8249: 113, 230 338: 114, 231 141: 115, 232 381: 116, 233 143: 117, 234 144: 118, 235 8216: 119, 236 8217: 120, 237 8220: 121, 238 8221: 122, 239 8226: 123, 240 8211: 124, 241 8212: 125, 242 732: 126, 243 8482: 127, 244 353: 128, 245 8250: 129, 246 339: 130, 247 157: 131, 248 382: 132, 249 376: 133, 250 160: 134, 251 161: 135, 252 162: 136, 253 163: 137, 254 164: 138, 255 165: 139, 256 166: 140, 257 167: 141, 258 168: 142, 259 169: 143, 260 170: 144, 261 171: 145, 262 172: 146, 263 173: 147, 264 174: 148, 265 175: 149, 266 176: 150, 267 177: 151, 268 178: 152, 269 179: 153, 270 180: 154, 271 181: 155, 272 182: 156, 273 183: 157, 274 184: 158, 275 185: 159, 276 186: 160, 277 187: 161, 278 188: 162, 279 189: 163, 280 190: 164, 281 191: 165, 282 215: 166, 283 222: 167, 284 254: 167, 285 223: 168, 286 247: 169, 287 255: 170, 288 }