All Products
Search
Document Center

Manage triggers

Last Updated: May 23, 2022

Log on to OceanBase Developer Center (ODC) and click the name of the target connection to go to the corresponding connection management page. You can click Trigger in the left-side navigation pane to get a list of triggers. The trigger list displays the trigger objects in the current database. You can right-click the target object to perform some management actions on the object. You can also double-click the name of the target trigger in the trigger list to go to the trigger management page.

Image 647

Management actions

Right-click the target object in the list. A shortcut menu appears, displaying some management options provided by ODC for you to conveniently manage the target object.

The following table describes the management options.

Option

Description

View Trigger

Click this option to go to the trigger management page, where you can view the basic information, parameters, and code of the trigger.

Create Trigger

Click this option to go to the Create Trigger page, where you can create a trigger as prompted.

Edit

Click this option to go to the trigger editing page, which displays the statements that define the trigger and where you can continue to edit the trigger.

Compile

Click this option to compile the trigger.

On

Click this option to enable the trigger.

Disable

Click this option to disable the trigger.

Delete

Click this option to delete the trigger.

Refresh

Click this option to refresh the list after you perform management actions on the trigger, so that the list displays the latest information.

Trigger management page

You can double-click the name of the target trigger in the trigger list to go to the trigger management page, which provides the following three tabs:

  • Basic Info: displays information such as Name, Owner, and the Trigger State of the trigger.
  • Base Object: displays information such as Name, Owner, and Type of the base object of the trigger.
  • DDL: displays the script that defines the trigger and provides the Edit, Find, and Refresh buttons. You can click Edit to go to the trigger editing page.

Trigger editing page

To go to the trigger editing page, right-click the target trigger in the trigger list and choose Edit from the shortcut menu that appears. You can also click the Edit button on the DDL tab of the trigger management page to go to this page. The code area on the editing page displays the statements that define the trigger. You can edit the statements. In addition, the toolbar provides the following buttons:

Button

Description

Format

Click this button to apply formatting, such as indentation, line break, and keyword highlighting, to the selected SQL statements or all the SQL statements in the current SQL window.

Find and Replace

You can specify search criteria in the search box to find specific content in the script and enter other content in the replacement box to replace the content found.

Undo

Click this button to undo the last operation.

Redo

Click this button to reverse an Undo operation.

Case Sensitivity

The system supports three configurations: All Caps, All Lowercase, and Capitalize the first letter. Click this button to convert the selected statements in the script to the corresponding capitalization format.

Indent

The Add Indents and Delete Indent options are provided, to allow you to add indents to or delete indents from the selected statements in the script.

Comment

The Add Comments and Delete Comment options are provided, which respectively allow you to convert the selected statements in the script to comments and convert comments to SQL statements.

Confirm Modification

Click this button to apply the current modification.