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

Function nextChannelViewEntry

db/changes_view.go:34–52  ·  view source on GitHub ↗
(ctx context.Context, results sgbucket.QueryResultIterator, collectionID uint32)

Source from the content-addressed store, hash-verified

32}
33
34func nextChannelViewEntry(ctx context.Context, results sgbucket.QueryResultIterator, collectionID uint32) (*LogEntry, bool) {
35
36 var viewRow channelsViewRow
37 found := results.Next(ctx, &viewRow)
38 if !found {
39 return nil, false
40 }
41
42 // Channels view uses composite Key of the form [channelName, sequence]
43 entry := &LogEntry{
44 Sequence: uint64(viewRow.Key[1].(float64)),
45 DocID: viewRow.ID,
46 Flags: viewRow.Value.Flags,
47 TimeReceived: channels.NewFeedTimestampFromNow(),
48 CollectionID: collectionID,
49 }
50 entry.SetRevAndVersion(viewRow.Value.Rev)
51 return entry, true
52}
53
54func nextChannelQueryEntry(ctx context.Context, results sgbucket.QueryResultIterator, collectionID uint32) (*LogEntry, bool) {
55

Callers 1

Calls 3

SetRevAndVersionMethod · 0.95
NewFeedTimestampFromNowFunction · 0.92
NextMethod · 0.45

Tested by

no test coverage detected