OperationResult Class
OperationResult.
The result of an Entity operation.
Instantiate an OperationResult.
Constructor
OperationResult(is_error: bool, duration: int, result: str | None = None)
Parameters
| Name | Description |
|---|---|
|
is_error
Required
|
Whether or not the operation resulted in an exception. |
|
duration
Required
|
How long the operation took, in milliseconds. |
|
result
|
<xref:Optional>[str]
The operation result. Defaults to None. Default value: None
|
Methods
| to_json |
Represent OperationResult as a JSON-serializable Dict. |
to_json
Attributes
duration
Get the duration of this operation.
Returns
| Type | Description |
|---|---|
|
The duration of this operation, in milliseconds |
is_error
Determine if the operation resulted in an error.
Returns
| Type | Description |
|---|---|
|
True if the operation resulted in error. Otherwise False. |