Basics | Plugins | Howtos | Applications

The checkdata plugin

The lino.modlib.checkdata plugin adds support for defining application-level data integrity tests.

Overview

This plugin provides a framework for managing and handling data problems.

data problem

A problem in the database that cannot be detected by the DBMS because finding it requires business intelligence.

Some data problems can be fixed automatically, others need human interaction.

The application developer defines the rules for detecting data problems by writing data checkers.

data checker

A piece of code that tests for data problems.

Also known as (soft) “integrity test”.

unbound data checker

Data checkers are usually attached to a given database model. If they are not attached to a model, they are called unbound. Data problem messages reported by an unbound data checker have an empty owner field.

Lino has different ways to run these checkers:

  • A button with the bell bell button (“Check data”) in the toolbar of a database row

  • The pm checkdata command is run daily on a production site.

When a data checker finds a problem, Lino creates a data problem message.

data problem message

A message that describes one or several data problems detected in a given database object.

Data problem messages are themselves database objects, but considered temporary data and may be updated automatically without user confirmation.

Each data problem message is assigned to a responsible user. This user can see their problems in the MyMessages table, which generates a welcome message if it contains data.