github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/sql/txnevent_string.go (about)

     1  // Code generated by "stringer -type=txnEvent"; DO NOT EDIT.
     2  
     3  package sql
     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[noEvent-0]
    12  	_ = x[txnStart-1]
    13  	_ = x[txnCommit-2]
    14  	_ = x[txnRollback-3]
    15  	_ = x[txnRestart-4]
    16  }
    17  
    18  const _txnEvent_name = "noEventtxnStarttxnCommittxnRollbacktxnRestart"
    19  
    20  var _txnEvent_index = [...]uint8{0, 7, 15, 24, 35, 45}
    21  
    22  func (i txnEvent) String() string {
    23  	if i < 0 || i >= txnEvent(len(_txnEvent_index)-1) {
    24  		return "txnEvent(" + strconv.FormatInt(int64(i), 10) + ")"
    25  	}
    26  	return _txnEvent_name[_txnEvent_index[i]:_txnEvent_index[i+1]]
    27  }