field

package
v0.0.0-...-ad801e6 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package field is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseFieldIterator

type BaseFieldIterator interface {
	// Next returns true if there are more field values to be iterated over.
	Next() bool

	// DocID returns the current doc ID.
	DocID() int32

	// ValueUnion returns the current value as a value union.
	ValueUnion() field.ValueUnion

	// Err returns the error encountered if any.
	Err() error

	// Close closes the iterator.
	Close()
}

BaseFieldIterator is the base field iterator.

type BoolField

type BoolField interface {
	// DocIDSet returns the doc ID set for which the documents have bool values.
	DocIDSet() index.DocIDSet

	// Values return the collection of bool values. The values collection remains
	// valid until the field is closed.
	Values() values.BoolValues

	// Iter returns the field iterator.
	Iter() (BoolFieldIterator, error)

	// Filter applies the given filter against the field, returning a doc
	// ID set iterator that returns the documents matching the filter.
	Filter(
		op filter.Op,
		filterValue *field.ValueUnion,
		numTotalDocs int32,
	) (index.DocIDSetIterator, error)

	// Fetch fetches the field values from the set of documents given by
	// the doc ID set iterator passed in. If the field doesn't exist in
	// a document from the doc ID set iterator output, it is ignored.
	Fetch(it index.DocIDSetIterator) (MaskingBoolFieldIterator, error)
}

BoolField contains data in documents for which such field are bool values.

type BoolFieldIterator

type BoolFieldIterator interface {
	BaseFieldIterator

	// Value returns the current bool value.
	Value() bool
}

BoolFieldIterator iterates over (doc ID, bool value) pairs in a bool field.

type BytesField

type BytesField interface {
	// DocIDSet returns the doc ID set for which the documents have bytes values.
	DocIDSet() index.DocIDSet

	// Values return the collection of bytes values. The values collection remains
	// valid until the field is closed.
	Values() values.BytesValues

	// Iter returns the field iterator.
	Iter() (BytesFieldIterator, error)

	// Filter applies the given filter against the field, returning a doc
	// ID set iterator that returns the documents matching the filter.
	Filter(
		op filter.Op,
		filterValue *field.ValueUnion,
		numTotalDocs int32,
	) (index.DocIDSetIterator, error)

	// Fetch fetches the field values from the set of documents given by
	// the doc ID set iterator passed in. If the field doesn't exist in
	// a document from the doc ID set iterator output, it is ignored.
	Fetch(it index.DocIDSetIterator) (MaskingBytesFieldIterator, error)
}

BytesField contains data in documents for which such field are bytes values.

type BytesFieldIterator

type BytesFieldIterator interface {
	BaseFieldIterator

	// Value returns the current string value.
	Value() bytes.Bytes
}

BytesFieldIterator iterates over (doc ID, string value) pairs in a string field.

type CloseFn

type CloseFn func()

CloseFn closes a field.

type CloseableBoolField

type CloseableBoolField interface {
	BoolField

	// ShallowCopy returns a shallow copy of the field sharing access to the
	// underlying resources. As such the resources held will not be released until
	// there are no more references to the field.
	ShallowCopy() CloseableBoolField

	// Close closes the field to release the resources held for the collection.
	Close()
}

CloseableBoolField is a bool field that can be closed.

func NewCloseableBoolField

func NewCloseableBoolField(
	docIDSet index.DocIDSet,
	values values.CloseableBoolValues,
) CloseableBoolField

NewCloseableBoolField creates a bool field.

func NewCloseableBoolFieldWithCloseFn

func NewCloseableBoolFieldWithCloseFn(
	docIDSet index.DocIDSet,
	values values.CloseableBoolValues,
	closeFn CloseFn,
) CloseableBoolField

NewCloseableBoolFieldWithCloseFn creates a bool field with a close function.

type CloseableBytesField

type CloseableBytesField interface {
	BytesField

	// ShallowCopy returns a shallow copy of the field sharing access to the
	// underlying resources. As such the resources held will not be released until
	// there are no more references to the field.
	ShallowCopy() CloseableBytesField

	// Close closes the field to release the resources held for the collection.
	Close()
}

CloseableBytesField is a bytes field that can be closed.

func NewCloseableBytesField

func NewCloseableBytesField(
	docIDSet index.DocIDSet,
	values values.CloseableBytesValues,
) CloseableBytesField

NewCloseableBytesField creates a bytes field.

func NewCloseableBytesFieldWithCloseFn

func NewCloseableBytesFieldWithCloseFn(
	docIDSet index.DocIDSet,
	values values.CloseableBytesValues,
	closeFn CloseFn,
) CloseableBytesField

NewCloseableBytesFieldWithCloseFn creates a bytes field with a close function.

type CloseableDoubleField

type CloseableDoubleField interface {
	DoubleField

	// ShallowCopy returns a shallow copy of the field sharing access to the
	// underlying resources. As such the resources held will not be released until
	// there are no more references to the field.
	ShallowCopy() CloseableDoubleField

	// Close closes the field to release the resources held for the collection.
	Close()
}

CloseableDoubleField is a double field that can be closed.

func NewCloseableDoubleField

func NewCloseableDoubleField(
	docIDSet index.DocIDSet,
	values values.CloseableDoubleValues,
) CloseableDoubleField

NewCloseableDoubleField creates a double field.

func NewCloseableDoubleFieldWithCloseFn

func NewCloseableDoubleFieldWithCloseFn(
	docIDSet index.DocIDSet,
	values values.CloseableDoubleValues,
	closeFn CloseFn,
) CloseableDoubleField

NewCloseableDoubleFieldWithCloseFn creates a double field with a close function.

type CloseableIntField

type CloseableIntField interface {
	IntField

	// ShallowCopy returns a shallow copy of the field sharing access to the
	// underlying resources. As such the resources held will not be released until
	// there are no more references to the field.
	ShallowCopy() CloseableIntField

	// Close closes the field to release the resources held for the collection.
	Close()
}

CloseableIntField is a int field that can be closed.

func NewCloseableIntField

func NewCloseableIntField(
	docIDSet index.DocIDSet,
	values values.CloseableIntValues,
) CloseableIntField

NewCloseableIntField creates a int field.

func NewCloseableIntFieldWithCloseFn

func NewCloseableIntFieldWithCloseFn(
	docIDSet index.DocIDSet,
	values values.CloseableIntValues,
	closeFn CloseFn,
) CloseableIntField

NewCloseableIntFieldWithCloseFn creates a int field with a close function.

type CloseableNullField

type CloseableNullField interface {
	NullField

	// ShallowCopy returns a shallow copy of the field sharing access to the
	// underlying resources. As such the resources held will not be released until
	// there are no more references to the field.
	ShallowCopy() CloseableNullField

	// Close closes the field to release the resources held for the collection.
	Close()
}

CloseableNullField is a null field that can be closed.

func NewCloseableNullField

func NewCloseableNullField(
	docIDSet index.DocIDSet,
) CloseableNullField

NewCloseableNullField creates a null field.

func NewCloseableNullFieldWithCloseFn

func NewCloseableNullFieldWithCloseFn(
	docIDSet index.DocIDSet,
	closeFn CloseFn,
) CloseableNullField

NewCloseableNullFieldWithCloseFn creates a int field with a close function.

type CloseableTimeField

type CloseableTimeField interface {
	TimeField

	// ShallowCopy returns a shallow copy of the field sharing access to the
	// underlying resources. As such the resources held will not be released until
	// there are no more references to the field.
	ShallowCopy() CloseableTimeField

	// Close closes the field to release the resources held for the collection.
	Close()
}

CloseableTimeField is a time field that can be closed.

func NewCloseableTimeField

func NewCloseableTimeField(
	docIDSet index.DocIDSet,
	values values.CloseableTimeValues,
) CloseableTimeField

NewCloseableTimeField creates a time field.

func NewCloseableTimeFieldWithCloseFn

func NewCloseableTimeFieldWithCloseFn(
	docIDSet index.DocIDSet,
	values values.CloseableTimeValues,
	closeFn CloseFn,
) CloseableTimeField

NewCloseableTimeFieldWithCloseFn creates a time field with a close function.

type DocsField

type DocsField interface {
	// Metadata returns the field metadata.
	Metadata() DocsFieldMetadata

	// NullField returns the field subset that has null values, or false otherwise.
	// The null field remains valid until the docs field is closed.
	NullField() (NullField, bool)

	// BoolField returns the field subset that has bool values, or false otherwise.
	// The bool field remains valid until the docs field is closed.
	BoolField() (BoolField, bool)

	// IntField returns the field subset that has int values, or false otherwise.
	// The int field remains valid until the docs field is closed.
	IntField() (IntField, bool)

	// DoubleField returns the field subset that has double values, or false otherwise.
	// The double field remains valid until the docs field is closed.
	DoubleField() (DoubleField, bool)

	// BytesField returns the field subset that has bytes values, or false otherwise.
	// The bytes field remains valid until the docs field is closed.
	BytesField() (BytesField, bool)

	// TimeField returns the field subset that has time values, or false otherwise.
	// The time field remains valid until the docs field is closed.
	TimeField() (TimeField, bool)

	// FieldForType returns the typed field for a given type, or false otherwise.
	// The typed field remains valid until the docs field is closed.
	FieldForType(t field.ValueType) (Union, bool)

	// NewDocsFieldFor returns a new docs field containing a shallow copy of the typed
	// fields (sharing access to the underlying resources) specified in the given value
	// type set. If a given type does not exist in the current field, it is added to
	// the value type set returned. If a field type is invalid, an error is returned.
	NewDocsFieldFor(fieldTypes field.ValueTypeSet) (DocsField, field.ValueTypeSet, error)

	// ShallowCopy returns a shallow copy of the docs field sharing access to the
	// underlying resources and typed fields. As such the resources held will not
	// be released until both the shallow copy and the original owner are closed.
	ShallowCopy() DocsField

	// NewMergedDocsField creates a new merged docs field by merging the fields in the current
	// docs field and the other docs field, with the current docs field taking precedence for
	// a given field type if both the current docs field and the other docs field has the corresponding
	// field. Both the current docs field and the other docs field remains valid after the call.
	NewMergedDocsField(other DocsField) DocsField

	// Filter applies the given filter against the different types of fields in the docs field,
	// returning a doc ID set iterator that returns the documents matching the filter.
	Filter(
		op filter.Op,
		filterValue *field.ValueUnion,
		numTotalDocs int32,
	) (index.DocIDSetIterator, error)

	// Close closes the field. It will also releases any resources held iff there is
	// no one holding references to the field.
	Close()
	// contains filtered or unexported methods
}

DocsField is a field containing one or more types of field values and associated doc IDs across multiple documents for a given field.

var (
	// NilDocsField is a nil docs field that can only be used for filtering.
	NilDocsField DocsField = (*docsField)(nil)
)

func NewDocsField

NewDocsField creates a new docs field.

type DocsFieldBuilder

type DocsFieldBuilder interface {
	// Add adds a value with its document ID.
	Add(docID int32, v field.ValueUnion) error

	// Snapshot return an immutable snapshot of the typed fields for the given
	// value type set, returning the new docs field and any types remaining in
	// the given value type set that's not available in the builder.
	SnapshotFor(fieldTypes field.ValueTypeSet) (DocsField, field.ValueTypeSet, error)

	// Seal seals and closes the builder and returns an immutable docs field that contains (and
	// owns) all the doc IDs and the field values accummulated across `numTotalDocs`
	// documents for this field thus far. The resource ownership is transferred from the
	// builder to the immutable collection as a result. Adding more data to the builder
	// after the builder is sealed will result in an error.
	Seal(numTotalDocs int32) DocsField

	// Close closes the builder.
	Close()
}

DocsFieldBuilder builds a collection of field values.

func NewDocsFieldBuilder

func NewDocsFieldBuilder(fieldPath []string, opts *DocsFieldBuilderOptions) DocsFieldBuilder

NewDocsFieldBuilder creates a new docs field builder.

type DocsFieldBuilderOptions

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

DocsFieldBuilderOptions provide a set of options for the field builder.

func NewDocsFieldBuilderOptions

func NewDocsFieldBuilderOptions() *DocsFieldBuilderOptions

NewDocsFieldBuilderOptions creates a new set of field builder options.

func (*DocsFieldBuilderOptions) BoolArrayPool

BoolArrayPool returns the bool array pool.

func (*DocsFieldBuilderOptions) BytesArrayPool

BytesArrayPool returns the bytes array pool.

func (*DocsFieldBuilderOptions) BytesArrayResetFn

func (o *DocsFieldBuilderOptions) BytesArrayResetFn() bytes.ArrayFn

BytesArrayResetFn resets bytes array values before returning a bytes array back to the memory pool.

func (*DocsFieldBuilderOptions) DoubleArrayPool

DoubleArrayPool returns the double array pool.

func (*DocsFieldBuilderOptions) Int64ArrayPool

Int64ArrayPool returns the int64 array pool.

func (*DocsFieldBuilderOptions) IntArrayPool

IntArrayPool returns the int array pool.

func (*DocsFieldBuilderOptions) SetBoolArrayPool

SetBoolArrayPool sets the bool array pool.

func (*DocsFieldBuilderOptions) SetBytesArrayPool

SetBytesArrayPool sets the bytes array pool.

func (*DocsFieldBuilderOptions) SetBytesArrayResetFn

func (o *DocsFieldBuilderOptions) SetBytesArrayResetFn(fn bytes.ArrayFn) *DocsFieldBuilderOptions

SetBytesArrayResetFn sets a value reset function for bytes values.

func (*DocsFieldBuilderOptions) SetDoubleArrayPool

SetDoubleArrayPool sets the double array pool.

func (*DocsFieldBuilderOptions) SetInt64ArrayPool

SetInt64ArrayPool sets the int64 array pool.

func (*DocsFieldBuilderOptions) SetIntArrayPool

SetIntArrayPool sets the int array pool.

type DocsFieldMetadata

type DocsFieldMetadata struct {
	FieldPath  []string
	FieldTypes []field.ValueType
}

DocsFieldMetadata contains the documents field metadata.

type DoubleField

type DoubleField interface {
	// DocIDSet returns the doc ID set for which the documents have double values.
	DocIDSet() index.DocIDSet

	// Values return the collection of double values. The values collection remains
	// valid until the field is closed.
	Values() values.DoubleValues

	// Iter returns the field iterator.
	Iter() (DoubleFieldIterator, error)

	// Filter applies the given filter against the field, returning a doc
	// ID set iterator that returns the documents matching the filter.
	Filter(
		op filter.Op,
		filterValue *field.ValueUnion,
		numTotalDocs int32,
	) (index.DocIDSetIterator, error)

	// Fetch fetches the field values from the set of documents given by
	// the doc ID set iterator passed in. If the field doesn't exist in
	// a document from the doc ID set iterator output, it is ignored.
	Fetch(it index.DocIDSetIterator) (MaskingDoubleFieldIterator, error)
}

DoubleField contains data in documents for which such field are double values.

type DoubleFieldIterator

type DoubleFieldIterator interface {
	BaseFieldIterator

	// Value returns the current double value.
	Value() float64
}

DoubleFieldIterator iterates over (doc ID, double value) pairs in a double field.

type IntField

type IntField interface {
	// DocIDSet returns the doc ID set for which the documents have int values.
	DocIDSet() index.DocIDSet

	// Values return the collection of int values. The values collection remains
	// valid until the field is closed.
	Values() values.IntValues

	// Iter returns the field iterator.
	Iter() (IntFieldIterator, error)

	// Filter applies the given filter against the field, returning a doc
	// ID set iterator that returns the documents matching the filter.
	Filter(
		op filter.Op,
		filterValue *field.ValueUnion,
		numTotalDocs int32,
	) (index.DocIDSetIterator, error)

	// Fetch fetches the field values from the set of documents given by
	// the doc ID set iterator passed in. If the field doesn't exist in
	// a document from the doc ID set iterator output, it is ignored.
	Fetch(it index.DocIDSetIterator) (MaskingIntFieldIterator, error)
}

IntField contains data in documents for which such field are int values.

type IntFieldIterator

type IntFieldIterator interface {
	BaseFieldIterator

	// Value returns the current int value.
	Value() int
}

IntFieldIterator iterates over (doc ID, int value) pairs in an int field.

type MaskingBoolFieldIterator

type MaskingBoolFieldIterator interface {
	BoolFieldIterator
	MaskingFieldIterator
}

MaskingBoolFieldIterator iterates over (doc ID, bool value) pairs in a bool field.

type MaskingBytesFieldIterator

type MaskingBytesFieldIterator interface {
	BytesFieldIterator
	MaskingFieldIterator
}

MaskingBytesFieldIterator iterates over (doc ID, string value) pairs in a string field.

type MaskingDoubleFieldIterator

type MaskingDoubleFieldIterator interface {
	DoubleFieldIterator
	MaskingFieldIterator
}

MaskingDoubleFieldIterator iterates over (doc ID, double value) pairs in a double field.

type MaskingFieldIterator

type MaskingFieldIterator interface {
	// MaskingPosition returns the current position in the masking iterator.
	MaskingPosition() int
}

MaskingFieldIterator is a field iterator that is produced from a masking iterator applied on top of field data.

type MaskingIntFieldIterator

type MaskingIntFieldIterator interface {
	IntFieldIterator
	MaskingFieldIterator
}

MaskingIntFieldIterator iterates over (doc ID, int value) pairs in an int field.

type MaskingNullFieldIterator

type MaskingNullFieldIterator interface {
	NullFieldIterator
	MaskingFieldIterator
}

MaskingNullFieldIterator a field iterator that is produced from a masking iterator.

type MaskingTimeFieldIterator

type MaskingTimeFieldIterator interface {
	TimeFieldIterator
	MaskingFieldIterator
}

MaskingTimeFieldIterator iterates over (doc ID, time value) pairs in a time field.

type MockBaseFieldIterator

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

MockBaseFieldIterator is a mock of BaseFieldIterator interface

func NewMockBaseFieldIterator

func NewMockBaseFieldIterator(ctrl *gomock.Controller) *MockBaseFieldIterator

NewMockBaseFieldIterator creates a new mock instance

func (*MockBaseFieldIterator) Close

func (m *MockBaseFieldIterator) Close()

Close mocks base method

func (*MockBaseFieldIterator) DocID

func (m *MockBaseFieldIterator) DocID() int32

DocID mocks base method

func (*MockBaseFieldIterator) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockBaseFieldIterator) Err

func (m *MockBaseFieldIterator) Err() error

Err mocks base method

func (*MockBaseFieldIterator) Next

func (m *MockBaseFieldIterator) Next() bool

Next mocks base method

func (*MockBaseFieldIterator) ValueUnion

func (m *MockBaseFieldIterator) ValueUnion() field.ValueUnion

ValueUnion mocks base method

type MockBaseFieldIteratorMockRecorder

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

MockBaseFieldIteratorMockRecorder is the mock recorder for MockBaseFieldIterator

func (*MockBaseFieldIteratorMockRecorder) Close

Close indicates an expected call of Close

func (*MockBaseFieldIteratorMockRecorder) DocID

DocID indicates an expected call of DocID

func (*MockBaseFieldIteratorMockRecorder) Err

Err indicates an expected call of Err

func (*MockBaseFieldIteratorMockRecorder) Next

Next indicates an expected call of Next

func (*MockBaseFieldIteratorMockRecorder) ValueUnion

func (mr *MockBaseFieldIteratorMockRecorder) ValueUnion() *gomock.Call

ValueUnion indicates an expected call of ValueUnion

type MockCloseableBoolField

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

MockCloseableBoolField is a mock of CloseableBoolField interface

func NewMockCloseableBoolField

func NewMockCloseableBoolField(ctrl *gomock.Controller) *MockCloseableBoolField

NewMockCloseableBoolField creates a new mock instance

func (*MockCloseableBoolField) Close

func (m *MockCloseableBoolField) Close()

Close mocks base method

func (*MockCloseableBoolField) DocIDSet

func (m *MockCloseableBoolField) DocIDSet() index.DocIDSet

DocIDSet mocks base method

func (*MockCloseableBoolField) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockCloseableBoolField) Fetch

Fetch mocks base method

func (*MockCloseableBoolField) Filter

Filter mocks base method

func (*MockCloseableBoolField) Iter

Iter mocks base method

func (*MockCloseableBoolField) ShallowCopy

func (m *MockCloseableBoolField) ShallowCopy() CloseableBoolField

ShallowCopy mocks base method

func (*MockCloseableBoolField) Values

Values mocks base method

type MockCloseableBoolFieldMockRecorder

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

MockCloseableBoolFieldMockRecorder is the mock recorder for MockCloseableBoolField

func (*MockCloseableBoolFieldMockRecorder) Close

Close indicates an expected call of Close

func (*MockCloseableBoolFieldMockRecorder) DocIDSet

DocIDSet indicates an expected call of DocIDSet

func (*MockCloseableBoolFieldMockRecorder) Fetch

func (mr *MockCloseableBoolFieldMockRecorder) Fetch(arg0 interface{}) *gomock.Call

Fetch indicates an expected call of Fetch

func (*MockCloseableBoolFieldMockRecorder) Filter

func (mr *MockCloseableBoolFieldMockRecorder) Filter(arg0, arg1, arg2 interface{}) *gomock.Call

Filter indicates an expected call of Filter

func (*MockCloseableBoolFieldMockRecorder) Iter

Iter indicates an expected call of Iter

func (*MockCloseableBoolFieldMockRecorder) ShallowCopy

func (mr *MockCloseableBoolFieldMockRecorder) ShallowCopy() *gomock.Call

ShallowCopy indicates an expected call of ShallowCopy

func (*MockCloseableBoolFieldMockRecorder) Values

Values indicates an expected call of Values

type MockCloseableBytesField

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

MockCloseableBytesField is a mock of CloseableBytesField interface

func NewMockCloseableBytesField

func NewMockCloseableBytesField(ctrl *gomock.Controller) *MockCloseableBytesField

NewMockCloseableBytesField creates a new mock instance

func (*MockCloseableBytesField) Close

func (m *MockCloseableBytesField) Close()

Close mocks base method

func (*MockCloseableBytesField) DocIDSet

func (m *MockCloseableBytesField) DocIDSet() index.DocIDSet

DocIDSet mocks base method

func (*MockCloseableBytesField) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockCloseableBytesField) Fetch

Fetch mocks base method

func (*MockCloseableBytesField) Filter

Filter mocks base method

func (*MockCloseableBytesField) Iter

Iter mocks base method

func (*MockCloseableBytesField) ShallowCopy

ShallowCopy mocks base method

func (*MockCloseableBytesField) Values

Values mocks base method

type MockCloseableBytesFieldMockRecorder

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

MockCloseableBytesFieldMockRecorder is the mock recorder for MockCloseableBytesField

func (*MockCloseableBytesFieldMockRecorder) Close

Close indicates an expected call of Close

func (*MockCloseableBytesFieldMockRecorder) DocIDSet

DocIDSet indicates an expected call of DocIDSet

func (*MockCloseableBytesFieldMockRecorder) Fetch

func (mr *MockCloseableBytesFieldMockRecorder) Fetch(arg0 interface{}) *gomock.Call

Fetch indicates an expected call of Fetch

func (*MockCloseableBytesFieldMockRecorder) Filter

func (mr *MockCloseableBytesFieldMockRecorder) Filter(arg0, arg1, arg2 interface{}) *gomock.Call

Filter indicates an expected call of Filter

func (*MockCloseableBytesFieldMockRecorder) Iter

Iter indicates an expected call of Iter

func (*MockCloseableBytesFieldMockRecorder) ShallowCopy

func (mr *MockCloseableBytesFieldMockRecorder) ShallowCopy() *gomock.Call

ShallowCopy indicates an expected call of ShallowCopy

func (*MockCloseableBytesFieldMockRecorder) Values

Values indicates an expected call of Values

type MockCloseableDoubleField

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

MockCloseableDoubleField is a mock of CloseableDoubleField interface

func NewMockCloseableDoubleField

func NewMockCloseableDoubleField(ctrl *gomock.Controller) *MockCloseableDoubleField

NewMockCloseableDoubleField creates a new mock instance

func (*MockCloseableDoubleField) Close

func (m *MockCloseableDoubleField) Close()

Close mocks base method

func (*MockCloseableDoubleField) DocIDSet

func (m *MockCloseableDoubleField) DocIDSet() index.DocIDSet

DocIDSet mocks base method

func (*MockCloseableDoubleField) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockCloseableDoubleField) Fetch

Fetch mocks base method

func (*MockCloseableDoubleField) Filter

Filter mocks base method

func (*MockCloseableDoubleField) Iter

Iter mocks base method

func (*MockCloseableDoubleField) ShallowCopy

ShallowCopy mocks base method

func (*MockCloseableDoubleField) Values

Values mocks base method

type MockCloseableDoubleFieldMockRecorder

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

MockCloseableDoubleFieldMockRecorder is the mock recorder for MockCloseableDoubleField

func (*MockCloseableDoubleFieldMockRecorder) Close

Close indicates an expected call of Close

func (*MockCloseableDoubleFieldMockRecorder) DocIDSet

DocIDSet indicates an expected call of DocIDSet

func (*MockCloseableDoubleFieldMockRecorder) Fetch

func (mr *MockCloseableDoubleFieldMockRecorder) Fetch(arg0 interface{}) *gomock.Call

Fetch indicates an expected call of Fetch

func (*MockCloseableDoubleFieldMockRecorder) Filter

func (mr *MockCloseableDoubleFieldMockRecorder) Filter(arg0, arg1, arg2 interface{}) *gomock.Call

Filter indicates an expected call of Filter

func (*MockCloseableDoubleFieldMockRecorder) Iter

Iter indicates an expected call of Iter

func (*MockCloseableDoubleFieldMockRecorder) ShallowCopy

ShallowCopy indicates an expected call of ShallowCopy

func (*MockCloseableDoubleFieldMockRecorder) Values

Values indicates an expected call of Values

type MockCloseableIntField

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

MockCloseableIntField is a mock of CloseableIntField interface

func NewMockCloseableIntField

func NewMockCloseableIntField(ctrl *gomock.Controller) *MockCloseableIntField

NewMockCloseableIntField creates a new mock instance

func (*MockCloseableIntField) Close

func (m *MockCloseableIntField) Close()

Close mocks base method

func (*MockCloseableIntField) DocIDSet

func (m *MockCloseableIntField) DocIDSet() index.DocIDSet

DocIDSet mocks base method

func (*MockCloseableIntField) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockCloseableIntField) Fetch

Fetch mocks base method

func (*MockCloseableIntField) Filter

Filter mocks base method

func (*MockCloseableIntField) Iter

Iter mocks base method

func (*MockCloseableIntField) ShallowCopy

func (m *MockCloseableIntField) ShallowCopy() CloseableIntField

ShallowCopy mocks base method

func (*MockCloseableIntField) Values

Values mocks base method

type MockCloseableIntFieldMockRecorder

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

MockCloseableIntFieldMockRecorder is the mock recorder for MockCloseableIntField

func (*MockCloseableIntFieldMockRecorder) Close

Close indicates an expected call of Close

func (*MockCloseableIntFieldMockRecorder) DocIDSet

DocIDSet indicates an expected call of DocIDSet

func (*MockCloseableIntFieldMockRecorder) Fetch

func (mr *MockCloseableIntFieldMockRecorder) Fetch(arg0 interface{}) *gomock.Call

Fetch indicates an expected call of Fetch

func (*MockCloseableIntFieldMockRecorder) Filter

func (mr *MockCloseableIntFieldMockRecorder) Filter(arg0, arg1, arg2 interface{}) *gomock.Call

Filter indicates an expected call of Filter

func (*MockCloseableIntFieldMockRecorder) Iter

Iter indicates an expected call of Iter

func (*MockCloseableIntFieldMockRecorder) ShallowCopy

func (mr *MockCloseableIntFieldMockRecorder) ShallowCopy() *gomock.Call

ShallowCopy indicates an expected call of ShallowCopy

func (*MockCloseableIntFieldMockRecorder) Values

Values indicates an expected call of Values

type MockCloseableNullField

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

MockCloseableNullField is a mock of CloseableNullField interface

func NewMockCloseableNullField

func NewMockCloseableNullField(ctrl *gomock.Controller) *MockCloseableNullField

NewMockCloseableNullField creates a new mock instance

func (*MockCloseableNullField) Close

func (m *MockCloseableNullField) Close()

Close mocks base method

func (*MockCloseableNullField) DocIDSet

func (m *MockCloseableNullField) DocIDSet() index.DocIDSet

DocIDSet mocks base method

func (*MockCloseableNullField) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockCloseableNullField) Fetch

Fetch mocks base method

func (*MockCloseableNullField) Filter

Filter mocks base method

func (*MockCloseableNullField) Iter

Iter mocks base method

func (*MockCloseableNullField) ShallowCopy

func (m *MockCloseableNullField) ShallowCopy() CloseableNullField

ShallowCopy mocks base method

type MockCloseableNullFieldMockRecorder

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

MockCloseableNullFieldMockRecorder is the mock recorder for MockCloseableNullField

func (*MockCloseableNullFieldMockRecorder) Close

Close indicates an expected call of Close

func (*MockCloseableNullFieldMockRecorder) DocIDSet

DocIDSet indicates an expected call of DocIDSet

func (*MockCloseableNullFieldMockRecorder) Fetch

func (mr *MockCloseableNullFieldMockRecorder) Fetch(arg0 interface{}) *gomock.Call

Fetch indicates an expected call of Fetch

func (*MockCloseableNullFieldMockRecorder) Filter

func (mr *MockCloseableNullFieldMockRecorder) Filter(arg0, arg1, arg2 interface{}) *gomock.Call

Filter indicates an expected call of Filter

func (*MockCloseableNullFieldMockRecorder) Iter

Iter indicates an expected call of Iter

func (*MockCloseableNullFieldMockRecorder) ShallowCopy

func (mr *MockCloseableNullFieldMockRecorder) ShallowCopy() *gomock.Call

ShallowCopy indicates an expected call of ShallowCopy

type MockCloseableTimeField

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

MockCloseableTimeField is a mock of CloseableTimeField interface

func NewMockCloseableTimeField

func NewMockCloseableTimeField(ctrl *gomock.Controller) *MockCloseableTimeField

NewMockCloseableTimeField creates a new mock instance

func (*MockCloseableTimeField) Close

func (m *MockCloseableTimeField) Close()

Close mocks base method

func (*MockCloseableTimeField) DocIDSet

func (m *MockCloseableTimeField) DocIDSet() index.DocIDSet

DocIDSet mocks base method

func (*MockCloseableTimeField) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockCloseableTimeField) Fetch

Fetch mocks base method

func (*MockCloseableTimeField) Filter

Filter mocks base method

func (*MockCloseableTimeField) Iter

Iter mocks base method

func (*MockCloseableTimeField) ShallowCopy

func (m *MockCloseableTimeField) ShallowCopy() CloseableTimeField

ShallowCopy mocks base method

func (*MockCloseableTimeField) Values

Values mocks base method

type MockCloseableTimeFieldMockRecorder

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

MockCloseableTimeFieldMockRecorder is the mock recorder for MockCloseableTimeField

func (*MockCloseableTimeFieldMockRecorder) Close

Close indicates an expected call of Close

func (*MockCloseableTimeFieldMockRecorder) DocIDSet

DocIDSet indicates an expected call of DocIDSet

func (*MockCloseableTimeFieldMockRecorder) Fetch

func (mr *MockCloseableTimeFieldMockRecorder) Fetch(arg0 interface{}) *gomock.Call

Fetch indicates an expected call of Fetch

func (*MockCloseableTimeFieldMockRecorder) Filter

func (mr *MockCloseableTimeFieldMockRecorder) Filter(arg0, arg1, arg2 interface{}) *gomock.Call

Filter indicates an expected call of Filter

func (*MockCloseableTimeFieldMockRecorder) Iter

Iter indicates an expected call of Iter

func (*MockCloseableTimeFieldMockRecorder) ShallowCopy

func (mr *MockCloseableTimeFieldMockRecorder) ShallowCopy() *gomock.Call

ShallowCopy indicates an expected call of ShallowCopy

func (*MockCloseableTimeFieldMockRecorder) Values

Values indicates an expected call of Values

type MockDocsField

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

MockDocsField is a mock of DocsField interface

func NewMockDocsField

func NewMockDocsField(ctrl *gomock.Controller) *MockDocsField

NewMockDocsField creates a new mock instance

func (*MockDocsField) BoolField

func (m *MockDocsField) BoolField() (BoolField, bool)

BoolField mocks base method

func (*MockDocsField) BytesField

func (m *MockDocsField) BytesField() (BytesField, bool)

BytesField mocks base method

func (*MockDocsField) Close

func (m *MockDocsField) Close()

Close mocks base method

func (*MockDocsField) DoubleField

func (m *MockDocsField) DoubleField() (DoubleField, bool)

DoubleField mocks base method

func (*MockDocsField) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockDocsField) FieldForType

func (m *MockDocsField) FieldForType(arg0 field.ValueType) (Union, bool)

FieldForType mocks base method

func (*MockDocsField) Filter

func (m *MockDocsField) Filter(arg0 filter.Op, arg1 *field.ValueUnion, arg2 int32) (index.DocIDSetIterator, error)

Filter mocks base method

func (*MockDocsField) IntField

func (m *MockDocsField) IntField() (IntField, bool)

IntField mocks base method

func (*MockDocsField) Metadata

func (m *MockDocsField) Metadata() DocsFieldMetadata

Metadata mocks base method

func (*MockDocsField) NewDocsFieldFor

func (m *MockDocsField) NewDocsFieldFor(arg0 field.ValueTypeSet) (DocsField, field.ValueTypeSet, error)

NewDocsFieldFor mocks base method

func (*MockDocsField) NewMergedDocsField

func (m *MockDocsField) NewMergedDocsField(arg0 DocsField) DocsField

NewMergedDocsField mocks base method

func (*MockDocsField) NullField

func (m *MockDocsField) NullField() (NullField, bool)

NullField mocks base method

func (*MockDocsField) ShallowCopy

func (m *MockDocsField) ShallowCopy() DocsField

ShallowCopy mocks base method

func (*MockDocsField) TimeField

func (m *MockDocsField) TimeField() (TimeField, bool)

TimeField mocks base method

type MockDocsFieldMockRecorder

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

MockDocsFieldMockRecorder is the mock recorder for MockDocsField

func (*MockDocsFieldMockRecorder) BoolField

func (mr *MockDocsFieldMockRecorder) BoolField() *gomock.Call

BoolField indicates an expected call of BoolField

func (*MockDocsFieldMockRecorder) BytesField

func (mr *MockDocsFieldMockRecorder) BytesField() *gomock.Call

BytesField indicates an expected call of BytesField

func (*MockDocsFieldMockRecorder) Close

func (mr *MockDocsFieldMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close

func (*MockDocsFieldMockRecorder) DoubleField

func (mr *MockDocsFieldMockRecorder) DoubleField() *gomock.Call

DoubleField indicates an expected call of DoubleField

func (*MockDocsFieldMockRecorder) FieldForType

func (mr *MockDocsFieldMockRecorder) FieldForType(arg0 interface{}) *gomock.Call

FieldForType indicates an expected call of FieldForType

func (*MockDocsFieldMockRecorder) Filter

func (mr *MockDocsFieldMockRecorder) Filter(arg0, arg1, arg2 interface{}) *gomock.Call

Filter indicates an expected call of Filter

func (*MockDocsFieldMockRecorder) IntField

func (mr *MockDocsFieldMockRecorder) IntField() *gomock.Call

IntField indicates an expected call of IntField

func (*MockDocsFieldMockRecorder) Metadata

func (mr *MockDocsFieldMockRecorder) Metadata() *gomock.Call

Metadata indicates an expected call of Metadata

func (*MockDocsFieldMockRecorder) NewDocsFieldFor

func (mr *MockDocsFieldMockRecorder) NewDocsFieldFor(arg0 interface{}) *gomock.Call

NewDocsFieldFor indicates an expected call of NewDocsFieldFor

func (*MockDocsFieldMockRecorder) NewMergedDocsField

func (mr *MockDocsFieldMockRecorder) NewMergedDocsField(arg0 interface{}) *gomock.Call

NewMergedDocsField indicates an expected call of NewMergedDocsField

func (*MockDocsFieldMockRecorder) NullField

func (mr *MockDocsFieldMockRecorder) NullField() *gomock.Call

NullField indicates an expected call of NullField

func (*MockDocsFieldMockRecorder) ShallowCopy

func (mr *MockDocsFieldMockRecorder) ShallowCopy() *gomock.Call

ShallowCopy indicates an expected call of ShallowCopy

func (*MockDocsFieldMockRecorder) TimeField

func (mr *MockDocsFieldMockRecorder) TimeField() *gomock.Call

TimeField indicates an expected call of TimeField

type MultiFieldIntersectIterator

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

MultiFieldIntersectIterator is an iterator that iterates over multiple fields, which are intersected on their doc IDs. As a result, a document needs to contain all fields associated with the iterator in order for it to be included in the output of the multi-field iterator.

func NewMultiFieldIntersectIterator

func NewMultiFieldIntersectIterator(iters []BaseFieldIterator) *MultiFieldIntersectIterator

NewMultiFieldIntersectIterator creates a new multi-field intersecting iterator.

func (*MultiFieldIntersectIterator) Close

func (it *MultiFieldIntersectIterator) Close()

Close closes the iterator.

func (*MultiFieldIntersectIterator) DocID

func (it *MultiFieldIntersectIterator) DocID() int32

DocID returns the current doc ID, which remains valid until the next iteration.

func (*MultiFieldIntersectIterator) Err

Err returns any errors encountered.

func (*MultiFieldIntersectIterator) Next

func (it *MultiFieldIntersectIterator) Next() bool

Next returns true if there are more items to be iterated over.

func (*MultiFieldIntersectIterator) Values

Values returns the current list of field values, which remains valid until the next iteration. If the caller needs to retain a valid refence to the value array after `Next` is called again, the caller needs to make a copy of the value array.

type MultiFieldUnionIterator

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

MultiFieldUnionIterator is an iterator that iterates over multiple fields, which are unioned on their doc IDs. As a result, a document needs to contain any of the fields associated with the iterator in order for it to be included in the output of the multi-field iterator.

func NewMultiFieldUnionIterator

func NewMultiFieldUnionIterator(iters []BaseFieldIterator) *MultiFieldUnionIterator

NewMultiFieldUnionIterator creates a new multi-field union iterator.

func (*MultiFieldUnionIterator) Close

func (it *MultiFieldUnionIterator) Close()

Close closes the iterator.

func (*MultiFieldUnionIterator) DocID

func (it *MultiFieldUnionIterator) DocID() int32

DocID returns the current doc ID, which remains valid until the next iteration.

func (*MultiFieldUnionIterator) Err

func (it *MultiFieldUnionIterator) Err() error

Err returns any errors encountered.

func (*MultiFieldUnionIterator) Next

func (it *MultiFieldUnionIterator) Next() bool

Next returns true if there are more items to be iterated over.

func (*MultiFieldUnionIterator) Values

func (it *MultiFieldUnionIterator) Values() ([]field.ValueUnion, []bool)

Values returns the current list of field values, which remains valid until the next iteration. If the caller needs to retain a valid refence to the value array after `Next` is called again, the caller needs to make a copy of the value array. Caller should check the boolean array to see whether the corresponding slot in the value array is valid.

type NullField

type NullField interface {
	// DocIDSet returns the doc ID set for which the documents have null values.
	DocIDSet() index.DocIDSet

	// Iter returns the field iterator.
	Iter() NullFieldIterator

	// Filter applies the given filter against the field, returning a doc
	// ID set iterator that returns the documents matching the filter.
	Filter(
		op filter.Op,
		filterValue *field.ValueUnion,
		numTotalDocs int32,
	) (index.DocIDSetIterator, error)

	// Fetch fetches the field doc IDs from the set of documents given by
	// the doc ID set iterator passed in. If the field doesn't exist in
	// a document from the doc ID set iterator output, it is ignored.
	Fetch(it index.DocIDSetIterator) MaskingNullFieldIterator
}

NullField contains data in documents for which such field are null values.

type NullFieldIterator

type NullFieldIterator interface {
	BaseFieldIterator
}

NullFieldIterator iterates over (doc ID, null value) pairs in a null field.

type TimeField

type TimeField interface {
	// DocIDSet returns the doc ID set for which the documents have time values.
	DocIDSet() index.DocIDSet

	// Values return the collection of time values. The values collection remains
	// valid until the field is closed.
	Values() values.TimeValues

	// Iter returns the field iterator.
	Iter() (TimeFieldIterator, error)

	// Filter applies the given filter against the field, returning a doc
	// ID set iterator that returns the documents matching the filter.
	Filter(
		op filter.Op,
		filterValue *field.ValueUnion,
		numTotalDocs int32,
	) (index.DocIDSetIterator, error)

	// Fetch fetches the field values from the set of documents given by
	// the doc ID set iterator passed in. If the field doesn't exist in
	// a document from the doc ID set iterator output, it is ignored.
	Fetch(it index.DocIDSetIterator) (MaskingTimeFieldIterator, error)
}

TimeField contains data in documents for which such field are time values.

type TimeFieldIterator

type TimeFieldIterator interface {
	BaseFieldIterator

	// Value returns the current time value.
	Value() int64
}

TimeFieldIterator iterates over (doc ID, time value) pairs in a time field.

type Union

type Union struct {
	Type        field.ValueType
	NullField   NullField
	BoolField   BoolField
	IntField    IntField
	DoubleField DoubleField
	BytesField  BytesField
	TimeField   TimeField
}

Union is a union of different typed fields.

func (*Union) Iter

func (u *Union) Iter() (BaseFieldIterator, error)

Iter returns the corresponding iterator for the field represented by the union, or an error otherwise.

func (*Union) MustValuesMeta

func (u *Union) MustValuesMeta() values.MetaUnion

MustValuesMeta returns the values metadata for the field represented by the union, and panics if an error is encountered.

func (*Union) ValuesMeta

func (u *Union) ValuesMeta() (values.MetaUnion, error)

ValuesMeta returns the corresponding values metadata for the field represented by the union, or an error otherwise.

Jump to

Keyboard shortcuts

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