# QueryResultsWrapper

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 of `query` interface.

### Nested Class Summary

Nested Classes
`static class` `QueryResultsWrapper.RowRecord` Internal-use class to wrap response of `query` interface.

### Constructor Summary

Constructors
`QueryResultsWrapper​(@NonNull io.milvus.grpc.QueryResults results)`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected QueryResultsWrapper.RowRecord` `buildRowRecord​(long index)` Gets a row record from result.
`protected java.util.List<io.milvus.grpc.FieldData>` `getFieldDataList()`
`FieldDataWrapper` `getFieldWrapper​(@NonNull java.lang.String fieldName)` Gets `FieldDataWrapper` for a field.
`protected java.util.List<java.lang.String>` `getOutputFields()`
`long` `getRowCount()` Gets the row count of the result.
`java.util.List<QueryResultsWrapper.RowRecord>` `getRowRecords()` Gets row records list from query result.

### Methods inherited from class io.milvus.response.basic.RowRecordWrapper

`buildRowRecord, getDynamicWrapper`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### QueryResultsWrapper

    public QueryResultsWrapper​(@NonNull
                               @NonNull io.milvus.grpc.QueryResults results)

### Method Detail

#### getFieldWrapper

    public FieldDataWrapper getFieldWrapper​(@NonNull
                                            @NonNull java.lang.String fieldName)
                                     throws ParamException

Gets `FieldDataWrapper` for a field. Throws `ParamException` if the field doesn't exist.

Parameters:
  `fieldName` - field name to get output data
Returns:
  `FieldDataWrapper`
Throws:
  `ParamException`

#### getRowRecords

    public java.util.List<QueryResultsWrapper.RowRecord> getRowRecords()

Gets row records list from query result.

Specified by:
  `getRowRecords` in class `RowRecordWrapper`
Returns:
  `List<RowRecord>` a row records list of the query result

#### buildRowRecord

    protected QueryResultsWrapper.RowRecord buildRowRecord​(long index)

Gets a row record from result. Throws `ParamException` 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 java.util.List<io.milvus.grpc.FieldData> getFieldDataList()

Specified by:
  `getFieldDataList` in class `RowRecordWrapper`

#### getOutputFields

    protected java.util.List<java.lang.String> getOutputFields()

Specified by:
  `getOutputFields` in class `RowRecordWrapper`