This service carries out an SQL query on a database and returns the result of the query.
Input ports
- driver - The name of the driver to be used to access the databaseThe Syntax is: foo.bah.Driver. For example com.mysql.jdbc.Driver. The library (.jar file) containing the driver must be visible to Taverna, i.e. must be placed in Taverna's
lib
directory inside TAVERNA_HOME directory. This parameter is mandatory. The jar must be added as a dependency of the service and the Classloader persistence must be set to "System classloader"). - params - A list of parameters to be passed to the SQL Query. If the SQL Query does not have parameters, then the list may be empty or not specified.
- password - The password to be used to access the database for the specified user. If access is not limited to specific users, or if the user does not have a password, then the parameter can be empty or not specified.
- provideXml - If this parameter is specified and set to true, then the service produces an XML representation of the result of the query. The service still produces the resultList.
- sql - The SQL for the query. This parameter is mandatory. If parameters have been specified, then the SQL should include one "?" placeholder per parameter.
- url - The url of the database. This parameter is mandatory. The syntax is: specifiers://host:port/database. For example jdbc:mysql://localhost.3306/somedatabase
- userid - The user name to be used to access the database. If access is not restricted, then the userid can be left empty or not specified.
Output ports
- resultList - A list of lists of values returned by the query. This corresponds to a list for each matching row, which contains a list for each queried column.
- xmlresults - If provideXml is true, then this contains an XML representation of the complete results of the query.