Class ListTablesOptions
Represents options passed to
ListTablesAsync(ListTablesOptions, CancellationToken)
and
GetListTablesAsyncEnumerable(ListTablesOptions, CancellationToken)
APIs.
Namespace: Oracle.NoSQL.SDK
Assembly: Oracle.NoSQL.SDK.dll
Syntax
public class ListTablesOptions : Object
Remarks
For properties not specified or
null
,
appropriate defaults will be used as indicated below.
If you expect the number of tables to be very large, you may page the returned list of table names over multiple calls to ListTablesAsync(ListTablesOptions, CancellationToken) using FromIndex and Limit properties as shown in the example below. However, the recommended way is to call GetListTablesAsyncEnumerable and iterate over its result, in which case you only need to use the Limit property.
Examples
Asynchronously paging and printing table names using ListTablesAsync(ListTablesOptions, CancellationToken) and FromIndex and Limit properties. We iterate until the number of returned table names becomes less than the limit (and possibly 0), which means that the last partial result has been received.var options = new ListTablesOptions
{
Timeout = TimeSpan.FromSeconds(10)
Limit = 100
};
do
{
var result = await client.ListTablesAsync(options);
foreach(var tableName in result.TableNames)
{
Console.WriteLine(tableName);
}
options.FromIndex = result.NextIndex;
} while(result.TableNames.Count == options.Limit);
Constructors
Name | Description |
---|---|
ListTablesOptions() |
Properties
Name | Description |
---|---|
Compartment | Cloud service only. Gets or sets the compartment id or name for the operation. |
FromIndex | Gets or sets the index to use to start returning table names. |
Limit | Gets or sets the maximum number of tables to return. |
Namespace | On-premise NoSQL database only. Gets or sets the namespace to use for the operation. |
Timeout | Gets or sets the timeout for the request. |