query

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LineRange added in v0.1.0

type LineRange struct {
	Rsc  string
	From int
	To   int
}

type LineRangeList added in v0.1.0

type LineRangeList []LineRange

func CalculatePartialRanges

func CalculatePartialRanges(rscList []string, offset, limit int) LineRangeList

CalculatePartialRanges calculates ranges for individual resources (corpora) in case we know that:

  1. we need global offset and limit
  2. we create result by round robin selection from individual records.

Please note that the offset is zero-based! Also, the order of resulting ranges may differ from the `rscList` so the iteration always starts from the correct resource. The order is changed only by rotating the resource list.

E.g. for two corpora and offset 100, we set offset 50 for each corpus. But because we don't know whether each of the corpora will be able to provide enough records, we have to set the global limit for each individual resource so in case all but one corpora results are empty, we can still provide the required number of items.

func (LineRangeList) PIDList added in v0.1.7

func (lrlist LineRangeList) PIDList() []string

func (LineRangeList) Resources added in v0.1.0

func (lrlist LineRangeList) Resources() []string

Directories

Path Synopsis
parser

Jump to

Keyboard shortcuts

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