public class RawTwinQuery extends Object
| Constructor and Description |
|---|
RawTwinQuery(String connectionString)
Constructor to create instance from connection string
|
RawTwinQuery(String hostName,
com.azure.core.credential.AzureSasCredential azureSasCredential)
Constructor to create instance from connection string
|
RawTwinQuery(String hostName,
com.azure.core.credential.TokenCredential credential)
Constructor to create instance from connection string
|
| Modifier and Type | Method and Description |
|---|---|
static RawTwinQuery |
createFromConnectionString(String connectionString)
Deprecated.
because this method declares a thrown IOException even though it never throws an IOException. Users
are recommended to use
RawTwinQuery(String) instead
since it does not declare this exception even though it constructs the same RawTwinQuery. |
boolean |
hasNext(Query query)
Returns the availability of next element in response.
|
String |
next(Query query)
Returns the next json element available in response
|
Query |
query(String sqlQuery)
Creates a query object for this query using default page size
|
Query |
query(String sqlQuery,
Integer pageSize)
Creates a query object for this query
|
public RawTwinQuery(String connectionString)
connectionString - The iot hub connection stringpublic RawTwinQuery(String hostName, com.azure.core.credential.TokenCredential credential)
hostName - The hostname of your IoT Hub instance (For instance, "your-iot-hub.azure-devices.net")credential - The custom TokenCredential that will provide authentication tokens to
this library when they are needed. The provided tokens must be Json Web Tokens.public RawTwinQuery(String hostName, com.azure.core.credential.AzureSasCredential azureSasCredential)
hostName - The hostname of your IoT Hub instance (For instance, "your-iot-hub.azure-devices.net")azureSasCredential - The custom TokenCredential that will provide authentication tokens to
this library when they are needed.@Deprecated public static RawTwinQuery createFromConnectionString(String connectionString) throws IOException
RawTwinQuery(String) instead
since it does not declare this exception even though it constructs the same RawTwinQuery.connectionString - The iot hub connection stringIOException - This exception is never thrown.public Query query(String sqlQuery, Integer pageSize) throws IotHubException, IOException
sqlQuery - Sql style query for Raw data over twinpageSize - Size to restrict response of query byIotHubException - If IotHub did not respond successfully to the queryIOException - If any of the input parameters are incorrectpublic Query query(String sqlQuery) throws IotHubException, IOException
sqlQuery - Sql style query for Raw data over twinIotHubException - If IotHub did not respond successfully to the queryIOException - If any of the input parameters are incorrectpublic boolean hasNext(Query query) throws IotHubException, IOException
query - Object corresponding to the queryIotHubException - If IotHub could not respond successfully to the query requestIOException - If any of the input parameters are incorrectpublic String next(Query query) throws IOException, IotHubException, NoSuchElementException
query - Object corresponding for this queryIOException - If any of input parameters are incorrectIotHubException - If IotHub could not respond successfully to the query requestNoSuchElementException - If no other element is foundCopyright © 2022. All rights reserved.