public static async Task<SchemaBuilder> FromTableInfosAsync(BigQueryContext context, DriverProperty property) { string[] datasets; if (property.ContextIsOnlyDataSet) { datasets = new[] { property.ContextDataSet }; } else { datasets = await context.GetAllDatasetsAsync(); } var list = new List<Schema>(); foreach (var dataset in datasets) { var tables = await context.GetFastTableSchemasAsync(dataset); var schema = new Schema() { DatasetName = dataset, GroupedMetaTableSchemas = tables, }; list.Add(schema); } return new SchemaBuilder(context, property, list.ToArray()); }
public SchemaBuilder(BigQueryContext context, DriverProperty property, Schema[] schemas) { this.context = context; this.Schemas = schemas; this.property = property; }