MUIbase Support This Project
programmable relational database
with graphical user interface
This page is also available in deutsch english


La documentation ci-dessous fait partie de la distribution de MUIbase. Elle est également disponible sous forme de PDF.

[ << ] [ >> ]           [Sommaire] [Table des matières] [Index] [ ? ]

8. Journal

Dans ce chapitre vous trouverez :

8.1 Table journal

For logging changes to a project, MUIbase uses an internal table named `_Log'. Note the underscore as the first character which indicates that this table is a system table managed by MUIbase that cannot be changed. The table contains the following attributes which are all of type string:


Name               Description

`_Label'           a field that can be set by menu item `Journal - Définir le tag'
                   or computed by a trigger function with name logLabel
                   (voir  Définir le tag).
`_Date'            date of log entry.
`_Time'            time of log entry.
`_Action'          one of `New record', `Delete record' or `Change value'.
`_Table'           name of the table where action occurred.
`_Record'          number of the record where action occurred at the time 
                   of the action.  Note that the record number may change 
                   when adding or deleting records, or when re-ordering records 
                   of a table.
`_Description'     description of record where the action occurred.
                   The record description can be specified in the table object 
                   (voir  Table object editor).
`_Attribute'       If the action is `Change value' then this field
                   holds the name of the attribute were the change occurred.
`_OldValue'        Old value of attribute (for action `Change value').
`_NewValue'        New value of attribute (for action `Change value').

The `_Log' table can be accessed like any other table of a project. For example, a select-from-where query

SELECT * from _Log

can be run in the query editor for obtaining a list of all changes (voir Select-from-where queries and Query editor).

8.2 Activer la journalisation

By default, logging is not enabled in a project. In order to start logging changes, select menu item `Journal - Activer la journalisation'. The state of this menu item is stored in the project file, thus, once activated and saved, changes will be kept logging when re-opening the project. De-activate the menu item to stop logging changes.

Note that only for those tables and attributes, that have the `Log changes' property set, will changes be logged (voir Creating tables and Creating attributes). The changes that are logged are adding a new record, deleting a record, or changing a field in a record. For each such action, a new log entry is created and added to the `_Log' table.

8.3 Définir le tag

The `_Log' table has an attribute named `_Label' that can be freely set by the project. Choosing menu item `journal - Définir le tag' opens a dialog for entering the label text.

It is also possible to provide the label through a program function. The function should have the name logLabel and is called for each new log entry. The function does not have any arguments and the returned expression, converted to a string, is used as the label text. For more information about this trigger function, voir logLabel.

Note that when the function logLabel exists, menu item `Log - Set log label' is disabled.

8.4 Importer un journal

It is possible to import log entries from an external file. This can be useful when older log entries have been deleted from the log. After selecting menu item `Journal - Importer le journal' a window is opened that allows importing records for the `_Log' table. Voir Importing records, for a description on all import options.

8.5 Exporter le journal

When the `_Log' table becomes large, it can be useful to export older log entries to an external file. To do this, choose menu item `Journal - Exporter le journal'. This opens a window for exporting the records of the `_Log' table to a file. Voir Exporting records, for a description on all export options.

8.6 Vider le journal

For clearing all entries of the log, choose menu item `Log - Clear log'. A typical case for clearing all log entries is when the `_Log' table becomes large. Make sure to export all entries to an external file prior to clearing the log.

8.7 Afficher le journal

By choosing menu item `Journal - Afficher le journal' the query editor is opened with a pre-defined query that lists all log entries. You can modify the query and its title, and MUIbase will remember the query. For more information, voir Query editor.

[ << ] [ >> ]           [Sommaire] [Table des matières] [Index] [ ? ]

Ce document a été généré le 11 Septembre 2016 par texi2html