![]() |
|
BladeSmith allows you to add custom SQL commands to the scripts that describe a DataBlade module and its objects. You can include SQL commands to create tables, indexes, or SPL procedures your DataBlade module requires. For example, if your DataBlade module uses smart large objects, you can include a statement to test for the required sbspace when you register the DataBlade module. For information, see Appendix C, Testing for an Sbspace.
Use the three-character new object prefix assigned to your project in the name of every custom SQL object you create. The maximum size of an SQL file is 20 KB.
If you create any objects for your DataBlade module, add corresponding SQL DROP statements so that the objects are dropped when your DataBlade module is unregistered.
To add custom SQL, start the wizard by choosing Edit Insert
SQL Files. Enter SQL commands directly into the BladeSmith edit window, or import a disk file into the BladeSmith project. When you import a file, copy the contents of the file at the time you import, or import the file by reference so that its contents are copied whenever you generate SQL scripts.
The following table lists the properties you specify when you include custom SQL statements.
The following sections describe properties of custom SQL files.
If you import SQL statements from a text file, separate the CREATE and DROP statements with a line of 40 hyphens ( - ). To import a file by reference, click Browse and select a file from the Open dialog box. If you import by reference, BladeSmith stores the full path and filename.
You can specify whether an SQL command depends upon a DataBlade module object or upon your SQL. These dependencies determine the sequence of SQL commands in the generated objects.sql script. BladeSmith generates SQL in the following sequence:
The generated SQL scripts register dependencies when the DataBlade module is registered in a database.