pub struct DeleteRequest { /* private fields */ }
Expand description
Struct used for deleting a single row from a table in the NoSQL Database.
This request can be used to perform unconditional and conditional deletes:
- Delete any existing row. This is the default.
- Succeed only if the row exists and its Version matches a specific Version. Use
if_version()
for this case.
Information about the existing row can be returned from a delete operation using
return_row(true)
. Requesting this information incurs
additional cost and may affect operation latency.
Implementations§
Source§impl DeleteRequest
impl DeleteRequest
Sourcepub fn new(table_name: &str, key: MapValue) -> DeleteRequest
pub fn new(table_name: &str, key: MapValue) -> DeleteRequest
Create a new DeleteRequest
.
table_name
and key
are required and must be non-empty.
key
must contain all fields required to construct the primary key for the table.
Sourcepub fn timeout(self, t: &Duration) -> Self
pub fn timeout(self, t: &Duration) -> Self
Specify the timeout value for the request.
This is optional.
If set, it must be greater than or equal to 1 millisecond, otherwise an
IllegalArgument error will be returned.
If not set, the default timeout value configured for the Handle
is used.
Sourcepub fn compartment_id(self, compartment_id: &str) -> Self
pub fn compartment_id(self, compartment_id: &str) -> Self
Cloud Service only: set the name or id of a compartment to be used for this operation.
The compartment may be specified as either a name (or path for nested compartments) or as an id (OCID).
A name (vs id) can only be used when authenticated using a specific user identity. It is not available if
the associated handle authenticated as an Instance Principal (which can be done when calling the service from
a compute instance in the Oracle Cloud Infrastructure: see HandleBuilder::cloud_auth_from_instance()
.)
If no compartment is given, the root compartment of the tenancy will be used.
Sourcepub fn if_version(self, version: &Version) -> DeleteRequest
pub fn if_version(self, version: &Version) -> DeleteRequest
Succeed only if the record already exists its version matches the given version.
Sourcepub fn return_row(self, val: bool) -> DeleteRequest
pub fn return_row(self, val: bool) -> DeleteRequest
Return information about the existing row. Requesting this information incurs additional cost and may affect operation latency.