Remove one or several objects (Procedures, Functions or Triggers) of the database.
1 connection.schema.code.drop
<connection.schema.code.drop
debug='debug'
type='type'
dict='dict'
pattern='pattern'
drop-all='drop-all'
/>
Attributes | |||||
---|---|---|---|---|---|
Name | Type | Required | Default | Description | |
Adebug | boolean | ||||
Atype | string | Type of object (trig|proc|func). | |||
Adict | string | Dictionary where the object is found. This attribute is optional, if the object is reported it is taken from this dictionary. If it is not reported, the system search it in all the dictionarys of the application and it will execute the one that is defined in the wic_dbms_dicts before. | |||
Apattern | string | Objects to create, a object code or a style pattern capuntes%, all that begins by capuntes. This attribute is optional, if the system is not informed, it will take all the records of this type. | |||
Adrop-all | boolean |
Returns | |
---|---|
Type | Description |
Vtable | Returns a vtable with the result. Returns the result for each processed object. |
Example
Remove the triggers which meet with the pattern capuntes_%
Copy
<xsql-script name='compile_trigger'> <body> <println> <connection.schema.code.drop type='trig' dict='wic_misc' pattern='capuntes_%' /> </println> </body> </xsql-script>
The xsql-script prints the result:
Copy
+--------------+------+--------+-------+------------+-----+------+-----------------------------+-------+ |dbms |schema|dict |type |code |group|error |message |warning| +--------------+------+--------+-------+------------+-----+------+-----------------------------+-------+ |demo_formacion| |wic_misc|trigger|capuntes_del| |false |TRIGGER capuntes_del dropped.| | |demo_formacion| |wic_misc|trigger|capuntes_ins| |false |TRIGGER capuntes_ins dropped.| | +--------------+------+--------+-------+------------+-----+------+-----------------------------+-------+