private async Task CreateIndexAsync()

in Amazon.QLDB.DMVSample.LedgerSetup/CreateIndexes.cs [63:74]


        private async Task CreateIndexAsync(string tableName, string field) 
        {
            if (!await CheckIndexExistsAsync(tableName, field))
            {
                Console.WriteLine($"Index does not exist, creating index on {tableName} for {field}.");
                await qldbDriver.Execute(async transactionExecutor => await transactionExecutor.Execute($"CREATE INDEX ON {tableName}({field})"));
            }
            else
            {
                Console.WriteLine($"Index already exists for {tableName} and {field}.");
            }   
        }