ObjectGears Help

Forum   ObjectGears (Version:

Creation of API view

This form provides functionality for a fast creation of database view for easy creation of queries to classes and queries. Names of the view and its columns are derived from model code, class (query) code and column code, which is more transparent and user-friendly than internal names of the ObjectGears system.

At the same time these views make you independent on unportable names of database tables and columns corresponding to classes and columns of ObjectGears system. Those are in fact dependent on a particular ObjectGears system instance. Names of database classes contain class ID which can change. Name of the database column are derived incrementaly from order number of the given column in the class. Whereas codes of ObjectGears classes and columns are fully in your competence and can be same in more ObjectGears system instances (development, test, production...).

Therefore, if you create functionality in the database over database tables of the system, use these views.

Form description

There is selection control in the toolbar, where you select required model. After that all the definable database views for the given model (corresponding to classes and queries in the model) are displayed.

There is name of the class or query in the first column of the list. In the second column there is name of the view, how it is (will be) called in the database. Already created views have in the column Status infomation wheather it is up to date or not.

In the last three columns there are icons for creation, update and deletion of the view. You can start the operation by double clicking on respective icon.

By changing model, class or query code database view will not be regenerated. This has to be done manually. This protects you from unintentional change of the view, because your added functionality would be violated.

Also at creation or deletion of an existing column view is not changed. Whereas adding a new column does not represent any issue, its deletion causes an error at the time of reading view. In this case it is necessary to update the corresponding view and your added functionality immediately after deleting the column.

Names of view

Name of the database view is created in the following format and cannot be changed:

For classes: API_vc_MODEL_CLASS

For queries: API_vq_MODEL_QUERY

Where MODEL is model code, CLASS is class code and QUERY is query code.

This website is using cookies files to provide services and analyse visits. You agree with that by using this website.     Further information