rulexdb_discard_ruleset(3)

rulexdb_discard_ruleset3

Remove specified ruleset from a rulex database

Usage

#include <rulexdb.h>

int rulexdb_discard_ruleset(RULEXDB *rulexdb, int rule_type);

Overview

The rulexdb_discard_ruleset() function removes all data from the ruleset specified by rule_type argument that may accept one of the following values:

RULEXDB_LEXCLASS

Discard the Classifiers ruleset.

RULEXDB_PREFIX

Discard the Prefix detectors ruleset.

RULEXDB_RULE

Discard the General ruleset.

RULEXDB_CORRECTOR

Discard the Correctors ruleset.

The argument rulexdb references the database to deal with.

Return value

The rulexdb_discard_ruleset() function returns number of deleted records or negative error code.

Errors

RULEXDB_FAILURE

Referenced database has not been opened, internal data structures are corrupted or some other general failure has occurred.

RULEXDB_EPARM

Invalid arguments are specified.

RULEXDB_EACCESS

The database is not opened for updating.

Author

Igor B. Poretsky <[email protected]>.

From librulexdb-dev 3.8.6-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.