 |
This table describes the basic keywords, variables, and
symbols that you can use in the transaction formats:
Item |
Explanation |
class |
Specifies the class of the object that is being
pointed to. Provide the associated database column name. |
class-name |
Indicates the database table name for the class to
which the given object(s) belongs. |
field |
Indicates a class property name. Provide the name of
the associated column in the database. |
key |
Indicates the beginning of a key or a primary key
statement. The primary key statement specifies the primary keys of
the object you want to select. It provides a search criterion for
finding the object in question.
This statement is required in all update, move, and delete
transactions. Provide the name of the associated column in the
database.
The key statement indicates keys other than the primary keys for
selecting multiple objects for export.
When specifying primary key values in a primary key statement, you
might not know all the primary key values. CES will try to search
for the object with the given primary key values. If you give a
partial primary key, the tool attempts to use that key to match a
single object. The tool generates an error if it does not find a
record or it finds more than one matching record. |
objectPtr |
Indicates the beginning of an object pointer
statement. The object pointer statement specifies the primary keys
and the owner class of a pointer. If the pointer is mapped to a
template object, which is different from having a template mapped to
an object, you must supply the template key as the primary key. |
objectPtr pointer-name {
class=class-name
}
To set an object pointer to null, leave the braces between the
braces in the objectPtr statement empty, as shown in this example:
objectPtr e_res_sup_ptr {}
|
pointer-name |
Indicates the corresponding database table name for
a pointer. |
fd |
Indicates the field delimiter character defined in
the options section of the data file or in the command-line options. |
str |
Indicates a character string specifying a data
value. To use the quotation mark within a quoted string, put a
backslash (\) in front of the quotation mark, and the parser will
not read it as the end of the string. |
Treating Several Transactions as Single Transaction
You can treat several DBLoad transactions as single transaction using the
beginTransaction and endTransaction commands. Use these commands to
ensure that no transaction gets committed to the database if any of the
instructions in the transaction block fails.
Command Usage
Guidelines
-
Do not nest the commands.
-
Do not provide an endTransaction command without a
beginTransaction command preceding it.
-
Do not include options statement between
beginTransaction and endTransaction.
-
Always complete the transaction block with a
beginTransaction and endTransaction command.
Results
-
Commits all previous transactions when the tool
encounters a beginTransaction command.
-
Does not issue any commit or rollback until the tool
encounters the endTransaction command.
-
Commits all transactions processed until an
endTransaction command.
-
Rolls back all previous transactions between a
beginTransaction and endTransaction block, if any transaction fails
to execute in the middle of the beginTransaction and endTransaction
command.
|