public GetColumns ( IDbObject parent ) : IList |
||
parent | IDbObject | |
return | IList |
public IList<Column> GetColumns(IDbObject parent)
{
IList<Column> result = null;
if (parent is Table)
{
result = this.queryForTableColumns(parent as Table);
}
if (parent is View)
{
result = this.queryForViewColumns(parent as View);
}
if (parent is TableFunction)
{
result = this.queryForFunctionColumns(parent as TableFunction);
}
if (result != null && result.Count > 0)
{
for (int i = 0; i < result.Count; i++)
{
result[i].Parent = parent;
}
}
return result;
}
public IList <View> GetViews(Schema schema) { IList <View> viewList = this.getViewsForSchema(schema); if (viewList != null && viewList.Count > 0) { var columnInspector = new ColumnInspector(this.peta); var indexInspector = new IndexInspector(this.peta); for (int v = 0; v < viewList.Count; v++) { var view = viewList[v]; view.Columns = columnInspector.GetColumns(view); view.Indexes = indexInspector.GetIndexes(view); view.Parent = schema; } } return(viewList); }