PutResult¶
-
class
borneo.
PutResult
[source]¶ Bases:
borneo.operations.WriteResult
Represents the result of a
NoSQLHandle.put()
operation.On a successful operation the value returned by
get_version()
is non-none. On failure that value is None. Information about the existing row on failure may be available usingget_existing_value()
andget_existing_version()
, depending on the use ofPutRequest.set_return_row()
and whether the put had an option set usingPutRequest.set_option()
.Methods Summary
get_existing_modification_time
()Returns the existing row modification time if available. get_existing_value
()Returns the existing row value if available. get_existing_version
()Returns the existing row Version
if available.get_generated_value
()Returns the value generated if the operation created a new value. get_read_kb
()Returns the read throughput consumed by this operation, in KBytes. get_read_units
()Returns the read throughput consumed by this operation, in read units. get_version
()Returns the Version
of the new row if the operation was successful.get_write_kb
()Returns the write throughput consumed by this operation, in KBytes. get_write_units
()Returns the write throughput consumed by this operation, in write units. Methods Documentation
-
get_existing_modification_time
()[source]¶ Returns the existing row modification time if available. It will be available if the conditional put operation failed and the request specified that return information be returned using
PutRequest.set_return_row()
. A value of -1 indicates this feature is not available at the connected server.Returns: the modification time in milliseconds since January 1, 1970 Return type: int Versionadded: 5.3.0
-
get_existing_value
()[source]¶ Returns the existing row value if available. This value will only be available if the conditional put operation failed and the request specified that return information be returned using
PutRequest.set_return_row()
.Returns: the value. Return type: dict
-
get_existing_version
()[source]¶ Returns the existing row
Version
if available. This value will only be available if the conditional put operation failed and the request specified that return information be returned usingPutRequest.set_return_row()
.Returns: the Version
.Return type: Version
-
get_generated_value
()[source]¶ Returns the value generated if the operation created a new value. This can happen if the table contains an identity column or string column declared as a generated UUID. If the table has no such columns this value is None. If a value was generated for the operation, it is non-None.
Returns: the generated value.
-
get_read_kb
()[source]¶ Returns the read throughput consumed by this operation, in KBytes. This is the actual amount of data read by the operation. The number of read units consumed is returned by
get_read_units()
which may be a larger number because this was an update operation.Returns: the read KBytes consumed. Return type: int
-
get_read_units
()[source]¶ Returns the read throughput consumed by this operation, in read units. This number may be larger than that returned by
get_read_kb()
because it was an update operation.Returns: the read units consumed. Return type: int
-
get_version
()[source]¶ Returns the
Version
of the new row if the operation was successful. If the operation failed None is returned.Returns: the Version
on success, None on failure.Return type: Version
-