bsi

package
v0.22.17 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(m *roaring.Bitmap, id uint64, svalue int64)

func Compare

func Compare(
	c *rbf.Cursor,
	shard uint64, op Operation,
	valueOrStart int64, end int64,
	columns *rows.Row) (*rows.Row, error)

Compare compares value. Values should be in the range of the BSI (max, min). If the value is outside the range, the result might erroneous. The operation parameter indicates the type of comparison to be made. For all operations with the exception of RANGE, the value to be compared is specified by valueOrStart. For the RANGE parameter the comparison criteria is >= valueOrStart and <= end.

Returns column ID's satisfying the operation.

func Extract

func Extract(c *rbf.Cursor, shard uint64, columns *rows.Row, f func(column uint64, value int64) error) error

Extract finds all values set in exists columns and calls f with the found column and value.

func SumCount

func SumCount(txn *tx.Tx, field string, o *roaring64.Bitmap, filters *rows.Row) (count int32, sum int64, err error)

Types

type Match

type Match struct {
	// contains filtered or unexported fields
}

func Filter

func Filter(field string, op Operation, valueOrStart int64, end int64) *Match

func (*Match) Apply

func (m *Match) Apply(tx *tx.Tx, columns *rows.Row) (*rows.Row, error)

type Operation

type Operation int

Operation identifier

const (
	// LT less than
	LT Operation = 1 + iota
	// LE less than or equal
	LE
	// EQ equal
	EQ
	NEQ
	// GE greater than or equal
	GE
	// GT greater than
	GT
	// RANGE range
	RANGE
)

type RowIterator

type RowIterator struct {
	// contains filtered or unexported fields
}

func NewRowIterator

func NewRowIterator(c *rbf.Cursor, shard uint64, wrap bool, filters ...roaring.BitmapFilter) (*RowIterator, error)

func (*RowIterator) Next

func (it *RowIterator) Next() (r *rows.Row, rowID uint64, value *int64, wrapped bool, err error)

func (*RowIterator) Seek

func (it *RowIterator) Seek(offset int64, whence int) (int64, error)

Jump to

Keyboard shortcuts

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