michaellperry / jinaga

Universal web back-end, offering an application-agnostic API, real-time collaboration, and conflict resolution.
http://jinaga.com
MIT License
35 stars 3 forks source link

Audit validation rules #33

Open michaellperry opened 5 years ago

michaellperry commented 5 years ago

Provide a mechanism for an administrator to execute a validation audit against a store using current validation rules.

The connection string to the store and the set of validation rules are both specified as options in JinagaServer.create. Provide a Node command line or JavaScript function that will execute a validation audit using the server instance.

Each fact is loaded and checked against the configured validation rule for its type. List the facts that are found to be invalid. This will catch facts that were saved under loose or missing validation rules that have since been tightened.

Provide a mechanism by which the administrator can examine the invalid facts. For example, format the results as JSON objects that can be pasted into an exploratory function.

Also provide a mechanism by which the administrator can back up and purge invalid facts. For example, format the results as SQL INSERT and DELETE scripts that can produce the backup and purge the database respectively.