PutResult¶
- class borneo.PutResult[source]¶
Bases:
WriteResultRepresents 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 ifPutRequest.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
Returns the existing row modification timeif available.
Returns the existing row value if available.
Returns the existing row
Versionif available.Returns the value generated if the operation created a new value.
Returns the read throughput consumed by this operation, in KBytes.
Returns the read throughput consumed by this operation, in read units.
Returns the
Versionof the new row if the operation was successful.Returns the write throughput consumed by this operation, in KBytes.
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
Versionif available. SeePutRequest.set_return_row()for conditions under which the information is available.
- 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
Versionof the new row if the operation was successful. If the operation failed None is returned.