STRING ENCODING: This is a simple compact round-trippable string encoding. It's used for sequence IDs in the public REST API. Note: Making incompatible changes to the format of these strings will potentially invalidate the saved checkpoint of every pull replication of every client in the world. This
()
| 334 | // Encodes a TimedSet as a string (as sent in the public _changes feed.) |
| 335 | // This string can later be turned back into a TimedSet by calling TimedSetFromString(). |
| 336 | func (set TimedSet) String() string { |
| 337 | // setting to false is necessary to preserve the round trip compatbility. |
| 338 | items := set.asStrings(false, nil) |
| 339 | return strings.Join(items, ",") |
| 340 | } |
| 341 | |
| 342 | // asStrings returns a sorted list of items in the list, appropriate for logging or serialization. show_zero_sequence is the preferred format unless the string needs to be backward compatible. Passing a redactorFunc is optional. |
| 343 | func (set TimedSet) asStrings(show_zero_sequence bool, redactorFunc func(any) base.RedactorFunc) []string { |