Uniface Repository
The Uniface Repository is a Unicode-enabled relational database used to store the definitions of Uniface Development Objects.
By default, a single-user SQLite database is
installed and configured as the Repository.
Uniface includes DBMS connectors that enable you to connect to supported databases. For information on configuring and using a specific database for the Repository, consult the Uniface Database Connector documentation for your database. For more information, see Database Connectors.
Definitions in the Repository are created, viewed, and maintained using the Uniface IDE.
The entity definitions for the Repository itself (known as the meta dictionary), are provided in a file called umeta.xml in the uniface\misc directory of your installation. This can be useful if you create your own tools for accessing Repository data.
Using a Shared Repository with the Enterprise Edition
When using the Uniface IDE, it is recommended that you use the sandbox approach to development, in which each developer's work is isolated from that of others in a local Repository, and only integrated with the work of others by means of a version control system.
However, it is possible to use a shared Repository in which multiple developers access the same database. Uniface locks data in the Repository to prevent multiple users from editing the same object simultaneously. Locking conflicts can occur when several developers edit the same main development object, such as a Modeled Entity, Component or Library, or one of its subobjects. This is because all data contained by a main development object, including all its subobjects, is treated as part of the same transaction. Thus, two users accessing the same Repository cannot simultaneously modify aspects of the same object.
To both minimize the length of time a main development object is locked and protect it during longer edits, the moment when data in the transaction is locked and unlocked varies with the type of data being edited:
- When you modify a simple property value (in
the Structure Editor or Object tab of the
Properties Inspector), the change is saved only when you press
Enter.
The data is locked when the save action is started (pressing Enter), and the lock is released when the data is committed and stored.
If another user simultaneously edits and saves the same object, the transaction may be rolled back and your change lost. A message is displayed that the object has been changed in the database. The object is then reloaded and you will have to apply the change again, if still applicable.
- When you modify an object's script or HTML
layout the data is saved when you switch focus to another object or property.
The data is locked when you first start typing, and the lock is released when one of the following events occurs:
- You switch focus to another development object, subobject, or a different property. This triggers a save and the transaction is committed and stored.
- The time specified by the logical
autoUnlock has elapsed. By default, this is 24 hours (
86400
seconds). You can set this logical in the ide.asn assignment file.Caution: The delay specified by this setting must not exceed the maximum time a lock can be held in your database. Consult your database documentation for details.
This ensures that when you are writing code or documentation, your changes cannot be lost or overwritten by someone else editing the same object.
- When you edit script or HTML layouts, the data
is also automatically saved when there is a pause in typing (the saved changes can be undone using
Ctrl+Z). After each save and commit, the object is again locked until the focus is moved
or the unlock delay expires.
You can control the length of the pause before an automatic save is performed by setting the autoSave logical in the ide.asn assignment file.