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)
Creates a Tester that includes all tester component panels that are
registered by extension in the product.
|
SQLQueryTester(Database db,
boolean dbOnly)
Creates a Tester that optionally contains only db specific tester
components.
|
| 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.
|
Context |
getContext()
Gets the IDE Context for the tester (can be null).
|
java.lang.String |
getDefaultConnectionStore()
Gets the default connection store to use in the tester (if set).
|
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 |
setDefaultConnectionStore(java.lang.String storeName)
Sets a default connection store that should be used when dealing with
connection names.
|
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)
db - the db to test again ( can be null ).public SQLQueryTester(Database db, boolean dbOnly)
db - the db to test again ( can be null ).dbOnly - if true only the "Query Results" and "Exaplin Plan"
components will be included.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 Context getContext()
public void setContext(Context ideContext)
public void setShowConnectionPicker(boolean showPicker)
showPicker - whether to show or hide the connection picker in the
tester.public java.lang.String getDefaultConnectionStore()
public void setDefaultConnectionStore(java.lang.String storeName)
storeName - the default store name.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)