LCOV - code coverage report
Current view: top level - pebble - error_iter.go (source / functions) Hit Total Coverage
Test: 2024-07-03 08:16Z 4981bd0e - tests + meta.lcov Lines: 36 47 76.6 %
Date: 2024-07-03 08:17:17 Functions: 0 0 -

          Line data    Source code
       1             : // Copyright 2018 The LevelDB-Go and Pebble Authors. All rights reserved. Use
       2             : // of this source code is governed by a BSD-style license that can be found in
       3             : // the LICENSE file.
       4             : 
       5             : package pebble
       6             : 
       7             : import (
       8             :         "context"
       9             : 
      10             :         "github.com/cockroachdb/pebble/internal/base"
      11             :         "github.com/cockroachdb/pebble/internal/keyspan"
      12             : )
      13             : 
      14             : type errorIter struct {
      15             :         err error
      16             : }
      17             : 
      18             : // errorIter implements the base.InternalIterator interface.
      19             : var _ internalIterator = (*errorIter)(nil)
      20             : 
      21           2 : func (c *errorIter) SeekGE(key []byte, flags base.SeekGEFlags) *base.InternalKV {
      22           2 :         return nil
      23           2 : }
      24             : 
      25           2 : func (c *errorIter) SeekPrefixGE(prefix, key []byte, flags base.SeekGEFlags) *base.InternalKV {
      26           2 :         return c.SeekPrefixGEStrict(prefix, key, flags)
      27           2 : }
      28             : 
      29             : func (c *errorIter) SeekPrefixGEStrict(
      30             :         prefix, key []byte, flags base.SeekGEFlags,
      31           2 : ) *base.InternalKV {
      32           2 :         return nil
      33           2 : }
      34             : 
      35           2 : func (c *errorIter) SeekLT(key []byte, flags base.SeekLTFlags) *base.InternalKV {
      36           2 :         return nil
      37           2 : }
      38             : 
      39           2 : func (c *errorIter) First() *base.InternalKV {
      40           2 :         return nil
      41           2 : }
      42             : 
      43           2 : func (c *errorIter) Last() *base.InternalKV {
      44           2 :         return nil
      45           2 : }
      46             : 
      47           2 : func (c *errorIter) Next() *base.InternalKV {
      48           2 :         return nil
      49           2 : }
      50             : 
      51           2 : func (c *errorIter) Prev() *base.InternalKV {
      52           2 :         return nil
      53           2 : }
      54             : 
      55           0 : func (c *errorIter) NextPrefix([]byte) *base.InternalKV {
      56           0 :         return nil
      57           0 : }
      58             : 
      59           2 : func (c *errorIter) Error() error {
      60           2 :         return c.err
      61           2 : }
      62             : 
      63           2 : func (c *errorIter) Close() error {
      64           2 :         return c.err
      65           2 : }
      66             : 
      67           0 : func (c *errorIter) String() string {
      68           0 :         return "error"
      69           0 : }
      70             : 
      71           2 : func (c *errorIter) SetBounds(lower, upper []byte) {}
      72             : 
      73           0 : func (c *errorIter) SetContext(_ context.Context) {}
      74             : 
      75             : type errorKeyspanIter struct {
      76             :         err error
      77             : }
      78             : 
      79             : // errorKeyspanIter implements the keyspan.FragmentIterator interface.
      80             : var _ keyspan.FragmentIterator = (*errorKeyspanIter)(nil)
      81             : 
      82           2 : func (i *errorKeyspanIter) SeekGE(key []byte) (*keyspan.Span, error) { return nil, i.err }
      83           2 : func (i *errorKeyspanIter) SeekLT(key []byte) (*keyspan.Span, error) { return nil, i.err }
      84           2 : func (i *errorKeyspanIter) First() (*keyspan.Span, error)            { return nil, i.err }
      85           2 : func (i *errorKeyspanIter) Last() (*keyspan.Span, error)             { return nil, i.err }
      86           0 : func (i *errorKeyspanIter) Next() (*keyspan.Span, error)             { return nil, i.err }
      87           0 : func (i *errorKeyspanIter) Prev() (*keyspan.Span, error)             { return nil, i.err }
      88           2 : func (i *errorKeyspanIter) Close()                                   {}
      89           0 : func (*errorKeyspanIter) String() string                             { return "error" }
      90           0 : func (*errorKeyspanIter) WrapChildren(wrap keyspan.WrapFn)           {}

Generated by: LCOV version 1.14