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