public class SQLQueryTester
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
SQLQueryTester.Result
Result object that encapsulates information about the result from when the query was last tested against a db.
|
Constructor and Description |
---|
SQLQueryTester(Database db) |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.Object> |
getBindVariables()
Gets the bind variable Map that this tester has.
|
static void |
registerComponent(java.lang.Class<? extends TesterComponent> clz)
Deprecated.
use the trigger hook <database-hook>, specifically the <sql-tester-components> element.
|
void |
setBindVariables(java.util.Map<java.lang.String,?> bindVariables)
Sets values for the bind variables that are present in the query.
|
void |
setContext(Context ideContext)
Sets the current IDE Context.
|
void |
setShowConnectionPicker(boolean showPicker)
By default the tester shows a connection picker that allows the user to choose and change the connection that the query is tested against.
|
void |
setSQLText(java.lang.String txt)
Deprecated.
|
SQLQueryTester.Result |
showDialog(java.awt.Component owner, java.lang.String sqlText)
Shows the tester dialog with the given owner component, to test the given query.
|
public SQLQueryTester(Database db)
public void setBindVariables(java.util.Map<java.lang.String,?> bindVariables)
The contents of the Map is used, not the Map instance itself. When the dialog has finished, if the values the user entered when prompted are required use getBindVariables()
.
public java.util.Map<java.lang.String,java.lang.Object> getBindVariables()
setBindVariables(Map)
, as well as any values the user has entered themselves when prompted in the course of testing the query.public void setContext(Context ideContext)
public void setShowConnectionPicker(boolean showPicker)
showPicker
- whether to show or hide the connection picker in the tester.public SQLQueryTester.Result showDialog(java.awt.Component owner, java.lang.String sqlText)
owner
- the component (e.g. Button) that is firing the testersqlText
- the query to test@Deprecated public void setSQLText(java.lang.String txt)
txt
- the new query text@Deprecated public static void registerComponent(java.lang.Class<? extends TesterComponent> clz)