Views
Standard Object Views
Normal Vine end-users are granted roles having the SELECT privilege on object views only. Each standard or custom object included in the server database has a corresponding view. The structure of the views can be seen using the VY_COMPANY_view example:
select id, createdate, createuser, changedate, changeuser,status,
decode(showgroup, VintageUtilAPI.userID, -1, showgroup) showgroup,
decode(editgroup,VintageUtilAPI.userID, -1,
decode(VintageUtilAPI.IsUserInGroup(editgroup, changeUser), 1,
editgroup, -2), editgroup,-2) editgroup,
name,realname,location,phone,fax,email,WWWPage,address,zip,city,state,
streetAddress,country,Description
from VY_COMPANY where
showGroup is null or
showGroup = 0 or
VintageUtilAPI.IsUserInGroup(showGroup, changeUser) = 1
A standard object view directly selects values of all the fields (except the protection fields) from an object if the user is authorized to see it. For details on using the SHOWGROUP and EDITGROUP fields, see the Protection Fields section, earlier in this chapter.
Note that in standard object views the names of output columns (fields) are exactly the same as the names of the original table columns (fields).
Database Structure Views
There are three main views that make possible for a user having the SELECT on VIEWS privilege to get information about the database structure.
These views have a similar structure. All of them first query the VY_PACKAGE_VERSION table for the latest object set, then, in standard manner (as in standard object views), they check whether the latest set is available for the user. If it is available then the view selects the entries assigned to the latest set.
Table 8. Database structure views
View Name | Description |
The view selects from the VY_CLIENTSQL table the entries which are assigned to the latest structure object set together with any entries that have the 'R' (required) status. | |
The view selects all the major fields from the VY_OBJECT table and, using the TABLEID field, selects the corresponding fields from VY_TABLE. The names of the view fields are made of the names of source tables and original fields, e.g. fields from the VY_OBJECT table have the "object_"prefix, while fields from VY_TABLE have the "table_" prefix. This view is used to hide objects from the New Object menu using the vy_table_menu_hidden table. | |
The view is a lighter version of the VY_OBJECT_TABLE_VIEW. It skips all generic fields of VY_TABLE (status, createdate, etc.) and the vy_package_version fields. | |
The view selects the major fields from the VY_OBJECT_FIELD table and, using the TABLEFIELDID and OBJECTID fields, selects the corresponding fields from VY_TABLE_FIELD and VY_OBJECT. Using the TABLEID field of the VY_TABLE_FIELD table it adds a couple of fields from VY_TABLE. | |
The view is a lighter version of the VY_OBJECT_TABLE_FIELD_VIEW. |
Additional Object Views
View Name | Description |
The view selects all the COMPANY-PERSON connected pairs. | |
The view shows the data of protected events. It substitutes the event's name with the string - 'Protected' and the event's description with an empty string "", other fields are substituted with NULL. Only the startdate/enddate fields and generic fields: ID, createdate, createuser, changedate, changeuser are shown to the user. | |
The view selects entire rows from the VY_WINDOW table without any protection checks. | |
The view selects entire rows from the VY_ICON table without any protection checks. | |
The view selects entire rows from the VY_PLUGIN table. User authorization is checked as in a standard object view. | |
The view works as a standard object view. See Standard Object Views | |
From the groups that can be shown in a client application, the view shows only those which the current user is a member of. | |
The view selects entire rows without any protection checks. | |
The view selects entire rows without any protection checks. | |
The view selects entire rows without any protection checks. | |
The view selects entire rows without any protection checks. |
Comments
0 comments
Please sign in to leave a comment.