github.com/cockroachdb/cockroachdb-parser@v0.23.3-0.20240213214944-911057d40c9a/pkg/util/encoding/type_string.go (about)

     1  // Code generated by "stringer"; DO NOT EDIT.
     2  
     3  package encoding
     4  
     5  import "strconv"
     6  
     7  func _() {
     8  	// An "invalid array index" compiler error signifies that the constant values have changed.
     9  	// Re-run the stringer command to generate them again.
    10  	var x [1]struct{}
    11  	_ = x[Unknown-0]
    12  	_ = x[Null-1]
    13  	_ = x[NotNull-2]
    14  	_ = x[Int-3]
    15  	_ = x[Float-4]
    16  	_ = x[Decimal-5]
    17  	_ = x[Bytes-6]
    18  	_ = x[BytesDesc-7]
    19  	_ = x[Time-8]
    20  	_ = x[Duration-9]
    21  	_ = x[True-10]
    22  	_ = x[False-11]
    23  	_ = x[UUID-12]
    24  	_ = x[Array-13]
    25  	_ = x[IPAddr-14]
    26  	_ = x[SentinelType-15]
    27  	_ = x[JSON-15]
    28  	_ = x[Tuple-16]
    29  	_ = x[BitArray-17]
    30  	_ = x[BitArrayDesc-18]
    31  	_ = x[TimeTZ-19]
    32  	_ = x[Geo-20]
    33  	_ = x[GeoDesc-21]
    34  	_ = x[ArrayKeyAsc-22]
    35  	_ = x[ArrayKeyDesc-23]
    36  	_ = x[Box2D-24]
    37  	_ = x[Void-25]
    38  	_ = x[TSQuery-26]
    39  	_ = x[TSVector-27]
    40  	_ = x[JSONNull-28]
    41  	_ = x[JSONNullDesc-29]
    42  	_ = x[JSONString-30]
    43  	_ = x[JSONStringDesc-31]
    44  	_ = x[JSONNumber-32]
    45  	_ = x[JSONNumberDesc-33]
    46  	_ = x[JSONFalse-34]
    47  	_ = x[JSONFalseDesc-35]
    48  	_ = x[JSONTrue-36]
    49  	_ = x[JSONTrueDesc-37]
    50  	_ = x[JSONArray-38]
    51  	_ = x[JSONArrayDesc-39]
    52  	_ = x[JSONObject-40]
    53  	_ = x[JSONObjectDesc-41]
    54  	_ = x[JsonEmptyArray-42]
    55  	_ = x[JsonEmptyArrayDesc-43]
    56  }
    57  
    58  func (i Type) String() string {
    59  	switch i {
    60  	case Unknown:
    61  		return "Unknown"
    62  	case Null:
    63  		return "Null"
    64  	case NotNull:
    65  		return "NotNull"
    66  	case Int:
    67  		return "Int"
    68  	case Float:
    69  		return "Float"
    70  	case Decimal:
    71  		return "Decimal"
    72  	case Bytes:
    73  		return "Bytes"
    74  	case BytesDesc:
    75  		return "BytesDesc"
    76  	case Time:
    77  		return "Time"
    78  	case Duration:
    79  		return "Duration"
    80  	case True:
    81  		return "True"
    82  	case False:
    83  		return "False"
    84  	case UUID:
    85  		return "UUID"
    86  	case Array:
    87  		return "Array"
    88  	case IPAddr:
    89  		return "IPAddr"
    90  	case SentinelType:
    91  		return "SentinelType"
    92  	case Tuple:
    93  		return "Tuple"
    94  	case BitArray:
    95  		return "BitArray"
    96  	case BitArrayDesc:
    97  		return "BitArrayDesc"
    98  	case TimeTZ:
    99  		return "TimeTZ"
   100  	case Geo:
   101  		return "Geo"
   102  	case GeoDesc:
   103  		return "GeoDesc"
   104  	case ArrayKeyAsc:
   105  		return "ArrayKeyAsc"
   106  	case ArrayKeyDesc:
   107  		return "ArrayKeyDesc"
   108  	case Box2D:
   109  		return "Box2D"
   110  	case Void:
   111  		return "Void"
   112  	case TSQuery:
   113  		return "TSQuery"
   114  	case TSVector:
   115  		return "TSVector"
   116  	case JSONNull:
   117  		return "JSONNull"
   118  	case JSONNullDesc:
   119  		return "JSONNullDesc"
   120  	case JSONString:
   121  		return "JSONString"
   122  	case JSONStringDesc:
   123  		return "JSONStringDesc"
   124  	case JSONNumber:
   125  		return "JSONNumber"
   126  	case JSONNumberDesc:
   127  		return "JSONNumberDesc"
   128  	case JSONFalse:
   129  		return "JSONFalse"
   130  	case JSONFalseDesc:
   131  		return "JSONFalseDesc"
   132  	case JSONTrue:
   133  		return "JSONTrue"
   134  	case JSONTrueDesc:
   135  		return "JSONTrueDesc"
   136  	case JSONArray:
   137  		return "JSONArray"
   138  	case JSONArrayDesc:
   139  		return "JSONArrayDesc"
   140  	case JSONObject:
   141  		return "JSONObject"
   142  	case JSONObjectDesc:
   143  		return "JSONObjectDesc"
   144  	case JsonEmptyArray:
   145  		return "JsonEmptyArray"
   146  	case JsonEmptyArrayDesc:
   147  		return "JsonEmptyArrayDesc"
   148  	default:
   149  		return "Type(" + strconv.FormatInt(int64(i), 10) + ")"
   150  	}
   151  }