DbVisualizer 9.5.7 Crack With License Key Download

0 views
Skip to first unread message

Fatjon Travers

unread,
Jun 28, 2024, 5:35:50 PM6/28/24
to writinadrid

Objects actions (ObjectsActionDef) define what operations are available for the object types defined in the ObjectsTreeDef. Object actions are powerful, as they offer an extensive number of features to define actions for almost any type of object operation.

All of the operations for the current Table object in the figure above are expressed in the ObjectsActionDef section in the database profile. The implementation for these actions are either declared entirely in XML via standard definitions, or via custom definitions. (The Java API for action handlers is not yet documented). The following screenshot shows the dialog appearing when executing an action via a standard XML definition:

The first field in the dialog, Database Connection, is always present and shows the alias of the database connection the current object is associated with. At the bottom, there is a Show SQL control that, when checked, displays the final SQL for the action. The bottom right buttons are used to run the action (the label of the button may be Execute or Script based on the action mode), or to Cancel the action completely.

Variables are used to reference data for the object for which the action was launched, and the data for all its parent objects in the objects tree. Variables are also used to reference input data specified by the user in the actions dialog. Variables are typically used in the Command, Confirm, Result and SetVar elements.

The following is an example for a Rename Table action. It first shows the name of the database connection (which is always present) with information about the table being renamed. The last two input fields should be entered by the user and identify the new name of the table. The New Database component is a list from which the user should select the name of the new database. The new table name should be entered in the New Table Name field.

First, there is the Action element with some attributes specifying the label of the action, icon and whether the objects tree (and the current object view) should be reloaded after the action has been executed.

The next block of elements are Input fields defining the data for the action. As you can see in the example, there is a $catalog variable in the Default element for the Database input and an $objectname variable in the Default element for the Table input. The values for these variables are fetched from the current object in the objects tree (GroupNode or DataNode). Variables are evaluated by first checking if the variable is in the scope of the action dialog (i.e., another input field), then if the variable is defined for the object for which the action was launched, and then if it is defined for any of the parent objects until the root object in the tree (Connections node) is reached. If a variable is not found, its value is set to (null).

The New Database input field is a list component showing a list of databases based on the result set of the specified SQL command. The Default setting for the database will be the database in which the table is currently stored based on the $catalog variable.

Both the New Database and New Table Name fields are editable and should be specified by the user. This data is then available via the variables specified in the name attribute, i.e., newCatalog and newTable.

The ActionGroup element is a container and groups a collection of ActionGroup, Action and Separator elements. It is used to define what actions should be present for a particular object type. It also define in what order the actions should appear in the menu and where any separators should be located. ActionGroup elements can be nested and these will be displayed as sub menus in DbVisualizer.

An Input element specifies the characteristics of a field component in the actions dialog. The label attribute is recommended and is presented to the left of input field. If a label is not specified, the input field will occupy the complete width of the action dialog. All input fields are editable by default. The name attribute is required for editable fields and should specify the name of the variable in which the user input is stored.

Any input element may contain the tip attribute. It is used to briefly document the purpose of the input field and is displayed as a tooltip when the user hover the mouse pointer over it.

The hideif attribute is useful to limit what input fields should appear for an action. The condition specified in the hideif attribute have the same syntax as described in the section. Example:

Input fields can be aligned on a single row with the linebreak attribute. The default behavior is that every input field is displayed on a single row. Use the linebreak="false" attribute to define that the next input field will be arranged on the same line. To re-start the automatic line breaking feature you must use the linebreak="true" attribute.

The Default definition above will execute a SQL statement, it will automatically pick the value in the first row's first column and present it as the default value for the input component. SQL may be specified in the Default element for all styles while SQL in Values and the Labels elements are valid only for list, radio, and check styles. In some rare situations it may not be possible to express a SQL statement that will return a single column that should be displayed for Values, Labels and Default. An example is when data is collected via a stored procedure. To solve this problem specify the column attribute. Its value must be a column name or column index in the result set.

To produce a desirable output from the check-list it is possible to define how each choice should be generated in the final result. The output argument and its value attribute is used to define how each value should be generated. In the example each choice will be formatted as: jschours[22] = true. The newline argument defines any delimiter between each choice. If the user selects both Monday and Friday in the action window the following will be generated:

The sub elements for the grid style is different from the other input styles as it accepts nested Input elements. These input styles define what columns should appear in the grid and the first input style will appear to the leftmost and the last in the rightmost column.

This example doesn't specify the label attribute as we want the grid to extend the full width of the actions dialog. The grid style use the Arg elements to customize the appearance and function of the field. The following arguments are handled by the grid style:

The SetVar element in the context of a grid style is used to process the data that will appear as defined by the element. It is used to process the data for every row in the grid. Let's say that the output must contain the word " default " if the value in a column named Default is entered. SetVar is used to handle this:

The label style is useful when the standard left aligned label should not be displayed. The following example will show seven check boxes each labeled individually and all displayed in the same row.

The list style displays a list of choices in a drop-down component. Only one choice can be selected. The list can be editable, meaning that the field showing the selection may be editable by the user. Here is a sample XML for the list style.

It is also possible to use the Labels element. If present, this should list all choices as they will appear in the actions dialog. Consider the following example and the labels shown to the user, while Values in this case should list the choices that will go into the final SQL via the variable.

The separator style is not really an input element but is used to visually divide input components in the in the action dialog. If the label attribute is specified, it will be presented to the left of the separator line. If no label is specified, only the separator is displayed.

The figure shows the use of separators and two fields that extend to the full width of the action dialog. The separators for Parameters and SQL Mode are here used as alternatives to labels for the fields below them.

In this case it is quite easy to map the user field to an Input element for the action since it is a required field. The question arise for password which is optional. The identified by clause should only be part of the final SQL if the password is entered by the user. The solution for this scenario is to use the SetVar element. Here is the complete action definition:

The expression in the example above checks whether the password variable is empty. If it is empty, a blank value is being assigned to the _password variable. If it is not empty, the value for _password will be set to identified bytheEnteredPassword.

7fc3f7cf58
Reply all
Reply to author
Forward
0 new messages