github.com/cockroachdb/cockroachdb-parser@v0.23.3-0.20240213214944-911057d40c9a/pkg/util/timeutil/pgdate/field_string.go (about)

     1  // Code generated by "stringer"; DO NOT EDIT.
     2  
     3  package pgdate
     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[fieldYear-0]
    12  	_ = x[fieldMonth-1]
    13  	_ = x[fieldDay-2]
    14  	_ = x[fieldEra-3]
    15  	_ = x[fieldHour-4]
    16  	_ = x[fieldMinute-5]
    17  	_ = x[fieldSecond-6]
    18  	_ = x[fieldNanos-7]
    19  	_ = x[fieldMeridian-8]
    20  	_ = x[fieldTZHour-9]
    21  	_ = x[fieldTZMinute-10]
    22  	_ = x[fieldTZSecond-11]
    23  	_ = x[fieldMinimum-0]
    24  	_ = x[fieldMaximum-11]
    25  }
    26  
    27  func (i field) String() string {
    28  	switch i {
    29  	case fieldYear:
    30  		return "fieldYear"
    31  	case fieldMonth:
    32  		return "fieldMonth"
    33  	case fieldDay:
    34  		return "fieldDay"
    35  	case fieldEra:
    36  		return "fieldEra"
    37  	case fieldHour:
    38  		return "fieldHour"
    39  	case fieldMinute:
    40  		return "fieldMinute"
    41  	case fieldSecond:
    42  		return "fieldSecond"
    43  	case fieldNanos:
    44  		return "fieldNanos"
    45  	case fieldMeridian:
    46  		return "fieldMeridian"
    47  	case fieldTZHour:
    48  		return "fieldTZHour"
    49  	case fieldTZMinute:
    50  		return "fieldTZMinute"
    51  	case fieldTZSecond:
    52  		return "fieldTZSecond"
    53  	default:
    54  		return "field(" + strconv.FormatInt(int64(i), 10) + ")"
    55  	}
    56  }