Package io.milvus.response
Class QueryResultsWrapper
- java.lang.Object
-
- io.milvus.response.basic.RowRecordWrapper
-
- io.milvus.response.QueryResultsWrapper
-
public class QueryResultsWrapper extends RowRecordWrapper
Utility class to wrap response ofquery
interface.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
QueryResultsWrapper.RowRecord
Internal-use class to wrap response ofquery
interface.
-
Constructor Summary
Constructors Constructor Description QueryResultsWrapper(@NonNull QueryResults results)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected QueryResultsWrapper.RowRecord
buildRowRecord(long index)
Gets a row record from result.protected List<FieldData>
getFieldDataList()
FieldDataWrapper
getFieldWrapper(@NonNull String fieldName)
GetsFieldDataWrapper
for a field.protected List<String>
getOutputFields()
long
getRowCount()
Gets the row count of the result.List<QueryResultsWrapper.RowRecord>
getRowRecords()
Gets row records list from query result.-
Methods inherited from class io.milvus.response.basic.RowRecordWrapper
buildRowRecord, getDynamicWrapper
-
-
-
-
Constructor Detail
-
QueryResultsWrapper
public QueryResultsWrapper(@NonNull @NonNull QueryResults results)
-
-
Method Detail
-
getFieldWrapper
public FieldDataWrapper getFieldWrapper(@NonNull @NonNull String fieldName) throws ParamException
GetsFieldDataWrapper
for a field. ThrowsParamException
if the field doesn't exist.- Parameters:
fieldName
- field name to get output data- Returns:
FieldDataWrapper
- Throws:
ParamException
-
getRowRecords
public List<QueryResultsWrapper.RowRecord> getRowRecords()
Gets row records list from query result.- Specified by:
getRowRecords
in classRowRecordWrapper
- Returns:
List
a row records list of the query result
-
buildRowRecord
protected QueryResultsWrapper.RowRecord buildRowRecord(long index)
Gets a row record from result. ThrowsParamException
if the index is illegal.- Returns:
RowRecord
a row record of the result
-
getRowCount
public long getRowCount()
Gets the row count of the result.- Returns:
long
row count of the result
-
getFieldDataList
protected List<FieldData> getFieldDataList()
- Specified by:
getFieldDataList
in classRowRecordWrapper
-
getOutputFields
protected List<String> getOutputFields()
- Specified by:
getOutputFields
in classRowRecordWrapper
-
-