Interface IBeforeEditorPluginInterface
-
- All Superinterfaces:
IPlugin
public interface IBeforeEditorPluginInterface extends IPlugin
This plugin-interface is being called before and while executing sql.
The checkBeforeEditorExecution-method is only called once a time before starting to loop over each statement.
So the sql is the whole sql with all statements and can prevent the whole execution.
The checkWhileEditorExecution-method is called for each sql-statement and can prevent only the current statement to be executed!
For example: this plugin is used for the Legitimacy-plugin which can for example prevent exeuting DROP/DELETE or whatever statements on productive databases by mistake.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RunnableFuture<Boolean>
checkBeforeEditorExecution(SQLDatabase db, String sql, IEditor editor)
Returns if the whole sql-query should be stoped.
It is only called once a time before starting to loop over each statement so it can prevent the whole execution!RunnableFuture<Boolean>
checkWhileEditorExecution(SQLDatabase db, String sql, IEditor editor)
Returns if the current sql-statement should be stoped.
It is called for each sql-statement and can prevent only the current statement to be executed-
Methods inherited from interface org.teichert.databaseexplorer.pluginInterfaces.IPlugin
getPluginName, getPluginVersion
-
-
-
-
Method Detail
-
checkBeforeEditorExecution
RunnableFuture<Boolean> checkBeforeEditorExecution(SQLDatabase db, String sql, IEditor editor) throws Exception
Returns if the whole sql-query should be stoped.
It is only called once a time before starting to loop over each statement so it can prevent the whole execution!- Parameters:
db
-sql
-editor
-- Returns:
- Throws:
Exception
-
checkWhileEditorExecution
RunnableFuture<Boolean> checkWhileEditorExecution(SQLDatabase db, String sql, IEditor editor) throws Exception
Returns if the current sql-statement should be stoped.
It is called for each sql-statement and can prevent only the current statement to be executed- Parameters:
db
-sql
-editor
-- Returns:
- Throws:
Exception
-
-