(ctx context.Context, results sgbucket.QueryResultIterator, collectionID uint32)
| 32 | } |
| 33 | |
| 34 | func 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 | |
| 54 | func nextChannelQueryEntry(ctx context.Context, results sgbucket.QueryResultIterator, collectionID uint32) (*LogEntry, bool) { |
| 55 |
no test coverage detected