Beispiel #1
0
        public void Report(Output output)
        {
            var report = Tables.AsReport(rep => rep
                                         .Title($"[{Name}].[{Schema}]")
                                         .RemoveBufferLimit()
                                         .AddColumn(t => t.Name, cc => cc.Heading("Table Name"))
                                         .AddChild(t => t.Columns,
                                                   trep => trep
                                                   .RemoveBufferLimit()
                                                   .AddColumn(c => c.Name)
                                                   .AddColumn(c => c.InPrimaryKey)
                                                   )
                                         .AddChild(c => c.References, refs => refs.RemoveBufferLimit()
                                                   .AddColumn(r => string.Join(", ", r.ReferencingColumnNames.Select(c => $"[{c}]")), cc => cc.Heading("Referencing Columns"))
                                                   .AddColumn(r => $"[{r.ReferencedSchema}].[{r.ReferencedTable}]", cc => cc.Heading("Table"))
                                                   .AddColumn(r => string.Join(", ", r.ReferencedColumnNames.Select(c => $"[{c}]")), cc => cc.Heading("Referenced Columns"))
                                                   )

                                         );

            output.FormatTable(report);
        }