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