using Connected.Data.Schema; namespace Connected.ServiceModel.Client.Data.Schema; internal sealed class ExistingSchema : ISchema { public ExistingSchema() { Columns = new(); } public List Columns { get; } public string? Schema => null; public string? Name { get; set; } public string? Type { get; set; } public bool Ignore { get; set; } public async Task Load(SchemaExecutionContext context) { Name = context.Schema.Name; Type = context.Schema.Type; if (!await context.Remote.TableExists(context.Schema.Name)) return; var columns = await context.Remote.QueryColumns(context.Schema.Name); foreach (var column in columns) { Columns.Add(new SchemaColumn { Name = column.Name, //TODO:populate properties }); } } public bool Equals(ISchema? other) { throw new NotImplementedException(); } }