GetViewParents()

Summary

Gets the parentage of a view.

Syntax

info_array = GetViewParents(string view_name)

Argument Contents
view_name Name of a view

Returns

An array of two elements, or null if the input view corresponds to a raw table (disk file).

Element Type Contents
1 Array An array of view names sorted such that no view is composed of views previous to it
2 Array An array with the hierarchical structure of the view.

Notes

  • The views can be closed safely by CloseView() in the order of the first returned array.

  • For example, if E is composed of A+B joined to C+D, then a possible return value is { {C+D,A+B,C,D,A,B}, {{A,B},{C,D}} }; another possibility is { {C+D,C,D,A+B,A,B}, {{A,B},{C,D}} }.

  • The second returned array will contain the names of the raw tables only.

Error Codes

Error Type Meaning
NotFound The named view does not exist, or the input view_name is null and there is no current view

See Also

Function Summary
GetViewJoinInfo() Gets the join information for a view
GetViewTableInfo() Gets information about a table