public final class ApiResponse extends Object
A response will have more than one result when a query with more than one statement is executed. For instance, the following query will return a response with two results:
SELECT * FROM measurement_1; SELECT * FROM measurement_2
| Modifier and Type | Class and Description |
|---|---|
static class |
ApiResponse.Builder
Creates instances of
ApiResponse. |
| Modifier and Type | Method and Description |
|---|---|
String |
getErrorMessage()
Gets the error message for this response, if any.
|
ResponseMetadata |
getMetadata()
Gets the metadata for this response.
|
List<QueryResult> |
getResults() |
int |
getStatusCode()
Gets the status code of this response.
|
boolean |
hasError()
Gets a value indicating whether any of the results in this response returned an error.
|
String |
toString() |
public ResponseMetadata getMetadata()
public int getStatusCode()
public boolean hasError()
true if the response contains any errors, false otherwisepublic String getErrorMessage()
If this response contains multiple errors, this method returns the first one.
null if no errorpublic List<QueryResult> getResults()
Copyright © 2020. All rights reserved.