Class PutOptions
Represent options for the Put operation.
Namespace: Oracle.NoSQL.SDK
Assembly: Oracle.NoSQL.SDK.dll
Syntax
public class PutOptions : Object
Remarks
These options are passed to APIs PutAsync(String, MapValue, PutOptions, CancellationToken),
PutIfAbsentAsync(String, MapValue, PutOptions, CancellationToken),
PutIfPresentAsync(String, MapValue, PutOptions, CancellationToken) and
PutIfVersionAsync(String, MapValue, RowVersion, PutOptions, CancellationToken).
For properties not specified or
null
,
appropriate defaults will be used as indicated below.
Examples
Executing Put operation with provided PutOptions.var result = await client.PutAsync("myTable",
new MapValue
{
["id"] = 1000,
["name"] = "John"
},
new PutOptions
{
Timeout = TimeSpan.FromSeconds(10),
IfAbsent = true,
TTL = TimeToLive.OfDays(5)
});
Constructors
Name | Description |
---|---|
PutOptions() |
Properties
Name | Description |
---|---|
Compartment | Cloud service only. Gets or sets the compartment id or name for the operation. |
Durability | On-premise only. Gets or sets Durability value to use for the operation. |
ExactMatch | Gets or sets a value that determines whether the provided row value must be an exact match for the table schema. |
IdentityCacheSize | Gets or sets the number of generated identity values that are requested from the server during the Put operation. |
IfAbsent | Gets or sets a value that determines whether to perform the Put operation only if there is no existing row that matches the primary key. |
IfPresent | Gets or sets a value that determines whether to perform the Put operation only if there is an existing row that matches the primary key. |
MatchVersion | Gets or sets a value that determines whether to perform the Put operation only if there is an existing row that matches the primary key and its RowVersion matches the value provided. |
Namespace | On-premises only. Gets or sets the optional namespace. |
ReturnExisting | Gets or sets a value that determines whether to return existing row and its RowVersion if the conditional Put operation fails. |
Timeout | Gets or sets the timeout for the request. |
TTL | Gets or sets TimeToLive value of the row. |
UpdateTTLToDefault | Gets or sets a value that determines whether to update the time to live (TTL) value of the existing row to the table's default TTL if there is an existing row and the Put operation is successful. |