Tcl API
This table describes the Tcl API commands:
Command | Description | Parameters | Returns |
---|---|---|---|
smatdbopen | Creates or opens a SMAT database named SmatdbName . |
smatdbName ?-e
msgEncoding?
|
SMAT database handle
A
duplicate If
|
smatdbinsert | Stores a message into the SMAT database. | smatdbHandle msgID
?saveContext?
|
Error code. 0 indicates insert success; otherwise, failure.
It cannot be
inbound or outbound. If inbound or outbound is used, then the
default For the default
For external script, default context is empty. When an error code is returned, there are two ways to find the error detail. You can view the engine log, or locate detail according to the error code, since the return code stays consistent with the sqlite error return. If attempting to insert a message into the traditional IB/OB SMAT database, then an error is reported. If tracing is supported, then this function also inserts the record there. |
smatdbcount | Gets the message total count that meets the search condition. |
|
Message count. 1 means failure. If |
smatdbsearch | Gets messages from the SMAT database. |
|
Message object handle list. If no search-related parameters are specified, then this returns all the messages in the SMAT database. The table name of the
SMAT database is For information on how to define If a column is not searched, then its value is empty. |
smatdbdelete | Deletes messages from the SMAT database. | smatdbHandle
?deleteCondition?
|
Message number deleted. -1 means failure. If no optional parameters are specified, then all the messages are deleted in the SMAT database. If attempting to delete a message from the traditional IB/OB SMAT database, then an error is reported. |
smatdbcycle | Cycles the SMAT database. | smatdbHandle
|
0 indicates cycle success; otherwise, failure. |
smatdbclose | Closes a SMAT database. | smatdbHandle
|
Error code. 0 indicates close success;
otherwise, failure. The SMAT database handle must be removed when the SMAT database is closed. |