Package com.mckoi.database.interpret
Class SQLQueryExecutor
java.lang.Object
com.mckoi.database.interpret.SQLQueryExecutor
An object used to execute SQL queries against a given DatabaseConnection
object. The object maintains an SQL parser object as state which is
reused as necessary.
This object is a convenient way to execute SQL queries.
- Author:
- Tobias Downer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute
(DatabaseConnection connection, SQLQuery query) Executes the given SQLQuery object on the given DatabaseConnection object.
-
Constructor Details
-
SQLQueryExecutor
public SQLQueryExecutor()Constructs the executor.
-
-
Method Details
-
execute
public Table execute(DatabaseConnection connection, SQLQuery query) throws SQLException, DatabaseException, TransactionException, ParseException Executes the given SQLQuery object on the given DatabaseConnection object. Returns a Table object that contains the result of the execution.Note that this method does not perform any locking. Any locking must have happened before this method is called.
Also note that the returned Table object is onld valid within the life-time of the lock unless the root lock requirements are satisified.
-