Executes the statements of creation of structure (DDL) over one or several databases. In the creation of the structure you can differentiate different objects to create.
- Table: Just the creation of the table with its columns.
- Index: Index, primary keys, foreign keys, etc.
- Check: Checks.
- Data upload: There are tables in which you want that when the table is created the system automatically loads records on this table.
|Atype||string||Types of objects you want to create. It is possible to use the option all to indicate that you create all the objects (tables + checks + index+ data upload).|
|Adict||string||Dictionary where the object is found. If the attribute is left blank, the system search the objects in all the dictionarys of the database taht is running.|
|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 objects of this type.|
|Adebug||string||If you want that the system amit a debug informing of the operations that he is making.|
|Vtable||Returns a vtable with the result. Retunrs the result for each processed object.|
Executes the creation of tables in the database dbtest of the wic_icon dictionary.
<xsql-script name='model_create1'> <body> <println> <connection.schema.model.create type='table' dict='wic_icon' pattern='%' debug='false' /> </println> </body> </xsql-script>
To execute it from the console it should be written:
bin\ws-dbscript -dbms dbtest -file test.xml -user mlg
El xsql-script imprime el resultado.
| 782|dbtest |dbsrv3| |wic_icon|taptpres |1/1 |SUCCEED|TABLE taptpres altered, operation is LOCK MODE ROW | 783|dbtest |dbsrv3| |wic_icon|tcalsaba |1/1 |SUCCEED|TABLE tcalsaba created. | 784|dbtest |dbsrv3| |wic_icon|tcalsaba |1/1 |SUCCEED|TABLE tcalsaba altered, operation is LOCK MODE ROW | 785|dbtest |dbsrv3| |wic_icon|tconcili |1/1 |SUCCEED|TABLE tconcili created. | 786|dbtest |dbsrv3| |wic_icon|tconcili |1/1 |SUCCEED|TABLE tconcili altered, operation is LOCK MODE ROW | 787|dbtest |dbsrv3| |wic_icon|tconcomu |1/1 |SUCCEED|TABLE tconcomu created.
The system returns a vtable with the result. The columns of the vtable inform of the processed objects and their result.
Process sequencer Database Server Dictionary Table Result Statements