RULEXDB_DISCARD_RULESET(3)
π RULEXDB_DISCARD_RULESET β the manual page, bestie edition π
okay so this is a page from the Library Functions Manual, and it's all about rulexdb_discard_ruleset β the function that literally just β¨yeetsβ¨ a whole ruleset out of your rulex database. it's giving "clean slate, fresh start, new me" energy and honestly? we love that for you. π
πΈ NAME πΈ
rulexdb_discard_ruleset β remove specified ruleset from a rulex database
π SYNOPSIS π
#include <rulexdb.h>
int rulexdb_discard_ruleset(RULEXDB *rulexdb, int rule_type);
π¦ DESCRIPTION π¦
so like. the rulexdb_discard_ruleset() function removes all data from the ruleset you point at with the rule_type argument. and that argument? it may accept one of these iconic values, no cap:
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.
and the rulexdb argument? that's the one that references the database you're dealing with. it's the main character, the ruleset is the side quest, and this function is the plot twist. π
β¨ RETURN VALUE β¨
rulexdb_discard_ruleset() returns the number of deleted records, or a negative error code if it's not vibing. (sad, but informative.)
π ERRORS π
RULEXDB_FAILUREβ Referenced database has not been opened, internal data structures are corrupted or some other general failure has occurred. (translation: everything is broken, not me though π )RULEXDB_EPARMβ Invalid arguments are specified.RULEXDB_EACCESSβ The database is not opened for updating.
bestie please open your database for updating before you try this, i am begging π
π SEE ALSO π
rulexdb_classify(3), rulexdb_close(3), rulexdb_dataset_name(3), rulexdb_discard_dictionary(3), rulexdb_fetch_rule(3), rulexdb_lexbase(3), rulexdb_load_ruleset(3), rulexdb_open(3), rulexdb_remove_item(3), rulexdb_remove_rule(3), rulexdb_remove_this_item(3), rulexdb_retrieve_item(3), rulexdb_search(3), rulexdb_seq(3), rulexdb_subscribe_item(3), rulexdb_subscribe_rule(3)
(the whole friend group, fr fr β go read them, iykyk π«Ά)
π AUTHOR π
Igor B. Poretsky <poretsky@mlbox.ru>. king behavior, we stan. π
and that's the whole page bestie!! this one dropped back on February 22, 2012 as part of the Library Functions Manual (yes it's a whole era, it ate and left no crumbs β). go forth, discard some rulesets, and slay responsibly. periodt. ππ¦πΈ
π¦ where this page comes from
- debian trixie: librulexdb-dev 3.8.6-1 Β· LGPL-2.1-or-later
- ubuntu questing: librulexdb-dev 3.8.6-1
- ubuntu resolute: librulexdb-dev 3.8.6-1build1 Β· LGPL-2.1-or-later
- ubuntu stonking: librulexdb-dev 3.8.6-1build1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms