Class OIndexSearchResult
java.lang.Object
com.orientechnologies.orient.core.sql.OIndexSearchResult
Presents query subset in form of field1 = "field1 value" AND field2 = "field2 value" ... AND
fieldN anyOpetator "fieldN value"
Where pairs (field1, value1) ... (fieldn-1, valuen-1) are stored in fieldValuePairs
map but last pair is stored in lastField lastValue properties and their
operator will be stored in lastOperator property.
Such data structure is used because from composite index point of view any "field and value" pairs can be reordered to match keys order that is used in index in case all fields and values are related to each other using equals operator, but position of field - value pair that uses non equals operator cannot be changed. Actually only one non-equals operator can be used for composite index search and filed - value pair that uses this index should always be placed at last position.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionOIndexSearchResult(OQueryOperator lastOperator, OSQLFilterItemField.FieldChain field, Object value) -
Method Summary
Modifier and TypeMethodDescriptionbooleanfields()inthashCode()static booleanisIndexEqualityOperator(OQueryOperator queryOperator) merge(OIndexSearchResult searchResult) Combines two queries subset into one.
-
Field Details
-
fieldValuePairs
-
lastOperator
-
lastField
-
lastValue
-
containsNullValues
protected boolean containsNullValues
-
-
Constructor Details
-
OIndexSearchResult
public OIndexSearchResult(OQueryOperator lastOperator, OSQLFilterItemField.FieldChain field, Object value)
-
-
Method Details
-
isIndexEqualityOperator
-
merge
Combines two queries subset into one. This operation will be valid only ifcanBeMerged(OIndexSearchResult)method will returntruefor the same passed in parameter.- Parameters:
searchResult- Query subset to merge.- Returns:
- New instance that presents merged query.
-
fields
-
equals
-
hashCode
public int hashCode()
-