mdbx

package
v0.14.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2024 License: Unlicense Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DB_VERSION byte = 'v'
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MDBXBackend

type MDBXBackend struct {
	Path               string
	MaxLimit           int
	MaxLimitNegentropy int
	MapSize            int64

	EnableHLLCacheFor func(kind int) (useCache bool, skipSavingActualEvent bool)
	// contains filtered or unexported fields
}

func (*MDBXBackend) Close

func (b *MDBXBackend) Close()

func (*MDBXBackend) CountEvents

func (b *MDBXBackend) CountEvents(ctx context.Context, filter nostr.Filter) (int64, error)

func (*MDBXBackend) CountEventsHLL

func (b *MDBXBackend) CountEventsHLL(ctx context.Context, filter nostr.Filter, offset int) (int64, *hyperloglog.HyperLogLog, error)

CountEventsHLL is like CountEvents, but it will build a hyperloglog value while iterating through results, following NIP-45

func (*MDBXBackend) DeleteEvent

func (b *MDBXBackend) DeleteEvent(ctx context.Context, evt *nostr.Event) error

func (*MDBXBackend) Init

func (b *MDBXBackend) Init() error

func (*MDBXBackend) QueryEvents

func (b *MDBXBackend) QueryEvents(ctx context.Context, filter nostr.Filter) (chan *nostr.Event, error)

func (*MDBXBackend) ReplaceEvent

func (b *MDBXBackend) ReplaceEvent(ctx context.Context, evt *nostr.Event) error

func (*MDBXBackend) SaveEvent

func (b *MDBXBackend) SaveEvent(ctx context.Context, evt *nostr.Event) error

func (*MDBXBackend) Serial

func (b *MDBXBackend) Serial() []byte

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL