Note
The system supports the SQL template function, through which the realization of some monitoring and other functions can be supported.
Default template
The system supports some default templates, currently supports:
-
•
getAllDatabaseAndTable
-
•
getAllDatabase
-
•
getAllTablesFromDatabase
Add template
Sql
submenu under the top
Settings
menu to go to the function configuration function


-
•
Name
: The name used to mark the function prompt, the suggestion is English -
•
Plugin
: The plugin this function applies to, multiple options can be selected -
•
Description
: Description of the function -
•
Template
: The SQL statement executed by the template
Submit
button at the bottom to save the operation, and you can use it in the editor later.
Warning
The default template does not carry any parameters and we can execute it directly.
Dynamic parameter template
default
database, the normal SQL is
sql
SHOW TABLES FROM default
sql
SHOW TABLES FROM ${database:String}
database=String
by collecting
{database:String}
expression, where
database
is the parameter name, and
String
is the type of parameter passing.
When we use the expression time, we only need to pass the
Map
type parameter, where key=parameter name, value=data value passed according to the type.
贡献者