Apama 10.15.0 | Connecting Apama Applications to External Components | Standard IAF Plug-ins | The Database Connector IAF Adapter (ADBC) | The ADBCHelper application programming interface | Issuing and stopping SQL queries
 
Issuing and stopping SQL queries
The following actions execute SQL queries. The actions expect a response and a handleResult action needs to be defined to handle each row returned.
action doSQLQuery(
    string queryString,
    action<dictionary<string, string>> handleResult )

action doSQLQueryOnError(
    string queryString,
    action<dictionary<string, string>> handleResult)

action doSQLQueryAck(
    string queryString,
    action <dictionary<string, string>> handleResult,
    integer ackNum,
    boolean onError )
The following query action allows you to specify a callback action for when the query completes. The parameters are (1) the query string, (2) the handler action for each row returned and (3) the handler for when the query completes. The handler for when the query completes has two parameters, an error string and an integer that specifies the number of rows returned by the query.
action doSQLQueryWithCallback(
string queryString,
action<dictionary<string, string>> handleResult,
action <string, integer> handleDone )
The following actions are similar to the above query actions except they return Apama events instead of results sets.
action doSQLEventQuery(
string queryString,
string eventType )

action doSQLEventQueryWithCallback(
string queryString,
string eventType,
action <string, integer> handleDone )

action doSQLEventQueryOnError(
string queryString,
string eventType )

action doSQLEventQueryAck(
string queryString,
string eventType,
integer ackNum,
boolean onError )
The following action cancels all outstanding queries in the queue.
action stopAll()
For more information on creating a handleResult action, see Handling query results for row data.