Skip to content
Permalink
Browse files

Expose DBD comments in header request

  • Loading branch information...
Marlamin committed Dec 1, 2019
1 parent 95ca201 commit 9ba83586126492f71487daf3fa8e1a8795756de8
Showing with 17 additions and 0 deletions.
  1. +17 −0 DBCDumpHost/Controllers/HeaderController.cs
@@ -17,6 +17,7 @@ public struct HeaderResult
{
public List<string> headers;
public Dictionary<string, string> fks;
public Dictionary<string, string> comments;
public string error;
}

@@ -55,6 +56,7 @@ public HeaderResult Get(string name, string build)

result.headers = new List<string>();
result.fks = new Dictionary<string, string>();
result.comments = new Dictionary<string, string>();

if (!storage.Values.Any())
{
@@ -69,6 +71,11 @@ public HeaderResult Get(string name, string build)
{
result.fks.Add(fieldName, columnDef.foreignTable + "::" + columnDef.foreignColumn);
}

if (columnDef.comment != null)
{
result.comments.Add(fieldName, columnDef.comment);
}
}
}
}
@@ -93,6 +100,11 @@ public HeaderResult Get(string name, string build)
{
result.fks.Add($"{fieldName}[{i}]", columnDef.foreignTable + "::" + columnDef.foreignColumn);
}

if (columnDef.comment != null)
{
result.comments.Add(fieldName, columnDef.comment);
}
}
}
}
@@ -106,6 +118,11 @@ public HeaderResult Get(string name, string build)
{
result.fks.Add(fieldName, columnDef.foreignTable + "::" + columnDef.foreignColumn);
}

if (columnDef.comment != null)
{
result.comments.Add(fieldName, columnDef.comment);
}
}
}
}

0 comments on commit 9ba8358

Please sign in to comment.
You can’t perform that action at this time.