PutResult

class borneo.PutResult[source]

Bases: 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 may be available if PutRequest.set_return_row() is set to true and one of the following occurs:

PutOption.IF_ABSENT is used and the operation fails because the row already exists.

PutOption.IF_VERSION is used and the operation fails because the row exists and its version does not match.

PutOption.IF_PRESENT is used and the operation succeeds provided that the server supports providing the existing row.

PutOption is not used and put operation replaces the existing row provided that the server supports providing the existing row.

Methods Summary

get_existing_modification_time()

Returns the existing row modification timeif 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 timeif available. See PutRequest.set_return_row() for conditions under which the information is available.

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. See PutRequest.set_return_row() for conditions under which the information is available.

Returns:

the value.

Return type:

dict

get_existing_version()[source]

Returns the existing row Version if available. See PutRequest.set_return_row() for conditions under which the information is available.

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

get_write_kb()[source]

Returns the write throughput consumed by this operation, in KBytes.

Returns:

the write KBytes consumed.

Return type:

int

get_write_units()[source]

Returns the write throughput consumed by this operation, in write units.

Returns:

the write units consumed.

Return type:

int