public abstract class QueryClient extends BaseClient
QueryClient
is used to execute queries using different protcols, like: WMI, SQL, and SNMP.
Create a client and use the executeQuery
method.
client = Framework.getClientFactory(ClientsConsts.SQL_PROTOCOL_NAME).createClient()
query = 'select * from dba_users'
resultSet = client.executeQuery(query)
# Now looping over result and fetching data
while resultSet.next():
username = resultSet.getString(1)
tablespace = resultSet.getString(7)
The credential ID is not specified when creating the client creating because it is in the trigger CI data. See the examples in ClientFactory
ResultSet
,
ClientFactory
BaseClient.FilteredMethodsHandler
CREDENTIALS_ID, ENCODING
Modifier and Type | Method and Description |
---|---|
ResultSet |
executeQuery(java.lang.String query)
Submits a query and returns the result set.
|
addDeniedPackage, close, getClientType, getCredentialId, getIpAddress, getProperty, getShellCmdSeperator, getSudoCommands, getSudoPaths, getTimeout, getUserName, isConnected, setAttributeEncrypted, supportsSudo
Documentation Feedback
Copyright 2012 Micro Focus or one of its affiliates.