Method GetIndexesAsync
GetIndexesAsync(String, GetIndexOptions, CancellationToken)
Retrieves the information about indexes of the table.
Declaration
public Task<IReadOnlyList<IndexResult>> GetIndexesAsync(string tableName, GetIndexOptions options = null, CancellationToken cancellationToken = null)
Parameters
Type |
Name |
Description |
String |
tableName |
Name of the table. |
GetIndexOptions |
options |
(Optional) Options for this operation. If
not specified or null , appropriate defaults will
be used. |
CancellationToken |
cancellationToken |
(Optional) Cancellation token.
|
Returns
Examples
Displaying table indexes.
var results = await client.GetIndexesAsync("MyTable");
foreach(var result in results)
{
var fields = string.Join(", ", result.Fields);
Console.WriteLine($"{result.IndexName}({fields})");
}
Exceptions
See Also