Method rawCmd

Use

rawCmd is a method of the class DBM.

You use this method to send a DBM command to the DBM server. Errors returned by the DBM Server do not trigger an exception.

By contrast, errors that occur during execution of the method cmd do trigger exceptions.

Features

rawCmd (cmd_string)

cmd_string

DBM command

Result:

?     Successful execution:

OK

Result of the DBM command

?     if an error occurs:

ERR

Error message

Example

?     You query the operational state of the database instance with the DBM command db_state:

result = session.rawCmd ('db_state')

print repr (result)

'OK\nState\nOFFLINE\n'

?     You enter an invalid DBM command:

result = session.rawCmd ('invalid command')

print repr (result)

'ERR\n-24977,ERR_COMMAND: unknown command "invalid"\n'