MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / String

Method String

channels/timed_set.go:336–340  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

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().
336func (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.
343func (set TimedSet) asStrings(show_zero_sequence bool, redactorFunc func(any) base.RedactorFunc) []string {

Callers 1

TestEncodeSequenceIDFunction · 0.95

Calls 1

asStringsMethod · 0.95

Tested by 1

TestEncodeSequenceIDFunction · 0.76