Method GetListTablesAsyncEnumerable
GetListTablesAsyncEnumerable(ListTablesOptions, CancellationToken)
Declaration
public IAsyncEnumerable<ListTablesResult> GetListTablesAsyncEnumerable(ListTablesOptions options, CancellationToken cancellationToken = null)
Parameters
Type |
Name |
Description |
ListTablesOptions |
options |
Options for this operation. Specify
Limit parameter to enable paging
as well as other options as needed. |
CancellationToken |
cancellationToken |
(Optional) Cancellation token.
You may also use
System.Threading.Tasks.TaskAsyncEnumerableExtensions.WithCancellation``1(System.Collections.Generic.IAsyncEnumerable{``0},System.Threading.CancellationToken)
extension to pass the cancellation token to the resulting
IAsyncEnumerable<T> instead of
cancellationToken parameter. |
Returns
Examples
Asynchronously paging and printing table names.
var options = new ListTablesOptions
{
Compartment = "my_compartment",
Limit = 100
};
await foreach(var result in client.GetListTablesAsyncEnumerable(options))
{
foreach(var tableName in result.TableNames)
{
Console.WriteLine(tableName);
}
}
Exceptions
See Also
GetListTablesAsyncEnumerable(Int32, String, CancellationToken)
Declaration
public IAsyncEnumerable<ListTablesResult> GetListTablesAsyncEnumerable(int limit, string compartmentOrNamespace = null, CancellationToken cancellationToken = null)
Parameters
Type |
Name |
Description |
Int32 |
limit |
Limit on number of tables in each partial
result. Equivalent to Limit.
Must be a positive value.
|
String |
compartmentOrNamespace |
(Optional) For Cloud Service,
pass either compartment id or compartment path (see remarks
section for NoSQLClient). For on-premise NoSQL
database, pass namespace name. |
CancellationToken |
cancellationToken |
(Optional) Cancellation token.
You may also use
System.Threading.Tasks.TaskAsyncEnumerableExtensions.WithCancellation``1(System.Collections.Generic.IAsyncEnumerable{``0},System.Threading.CancellationToken)
extension to pass the cancellation token to the resulting
IAsyncEnumerable<T> instead of
cancellationToken parameter. |
Returns
Examples
Asynchronously paging and printing table names.
await foreach(var result in client.GetListTablesAsyncEnumerable(100))
{
foreach(var tableName in result.TableNames)
{
Console.WriteLine(tableName);
}
}
Exceptions
See Also