Package io.milvus.response
Class QueryResultsWrapper
- java.lang.Object
-
- io.milvus.response.QueryResultsWrapper
-
public class QueryResultsWrapper extends Object
Utility class to wrap response ofqueryinterface.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classQueryResultsWrapper.RowRecordInternal-use class to wrap response ofqueryinterface.
-
Constructor Summary
Constructors Constructor Description QueryResultsWrapper(@NonNull QueryResults results)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FieldDataWrappergetDynamicWrapper()Get the dynamic field.FieldDataWrappergetFieldWrapper(@NonNull String fieldName)GetsFieldDataWrapperfor a field.longgetRowCount()Gets the row count of a query result.QueryResultsWrapper.RowRecordgetRowRecord(long index)Gets a row record from query result.List<QueryResultsWrapper.RowRecord>getRowRecords()Gets row records list from query result.
-
-
-
Constructor Detail
-
QueryResultsWrapper
public QueryResultsWrapper(@NonNull @NonNull QueryResults results)
-
-
Method Detail
-
getFieldWrapper
public FieldDataWrapper getFieldWrapper(@NonNull @NonNull String fieldName) throws ParamException
GetsFieldDataWrapperfor a field. ThrowsParamExceptionif the field doesn't exist.- Parameters:
fieldName- field name to get output data- Returns:
FieldDataWrapper- Throws:
ParamException
-
getDynamicWrapper
public FieldDataWrapper getDynamicWrapper() throws ParamException
Get the dynamic field. Only available when a collection's dynamic field is enabled. ThrowsParamExceptionif the dynamic field doesn't exist.- Returns:
FieldDataWrapper- Throws:
ParamException
-
getRowCount
public long getRowCount()
Gets the row count of a query result.- Returns:
longrow count of the query result
-
getRowRecord
public QueryResultsWrapper.RowRecord getRowRecord(long index) throws ParamException
Gets a row record from query result. ThrowsParamExceptionif the index is illegal.- Returns:
RowRecorda row record of the query result- Throws:
ParamException
-
getRowRecords
public List<QueryResultsWrapper.RowRecord> getRowRecords()
Gets row records list from query result.- Returns:
Lista row records list of the query result
-
-