Class SQLQueryEvaluator
java.lang.Object
fr.inria.rules.integraal.storage.external.evaluator.SQLQueryEvaluator
- All Implemented Interfaces:
NativeQueryEvaluator<String, List<Object[]>>
public class SQLQueryEvaluator
extends Object
implements NativeQueryEvaluator<String, List<Object[]>>
Evaluates a SQL query using the associated driver.
This evaluator uses Apache's
This evaluator also provides additional methods for inserting data on the database.
QueryRunner to execute the query on the database
The result is a List<Object[]> which represents the list of all resulting tuples.
This evaluator also provides additional methods for inserting data on the database.
-
Constructor Summary
ConstructorsConstructorDescriptionSQLQueryEvaluator(RDBMSDriver driver) Construct a new evaluator over the database represented by the given driver -
Method Summary
-
Constructor Details
-
SQLQueryEvaluator
Construct a new evaluator over the database represented by the given driver- Parameters:
driver- representing the database to connect to- Throws:
SQLException- if the initial connection to the database cannot be performed
-
-
Method Details
-
evaluate
Description copied from interface:NativeQueryEvaluatorEvaluate the given query and returns the result This should not do anymore work- Specified by:
evaluatein interfaceNativeQueryEvaluator<String, List<Object[]>>- Parameters:
query- to evaluate- Returns:
- an optional which contains the results of the query if everything went right, an empty optional otherwise
-