RULEXDB_REMOVE_RULE(3)

✨ RULEXDB_REMOVE_RULE ✨

okay bestie, welcome to the rulexdb_remove_rule(3) page from the Library Functions Manual πŸ’– this one's short, it's sweet, and it does exactly one thing: it yeets a rule out of your rulex database. no cap.


🌸 NAME 🌸

rulexdb_remove_rule β€” remove specified rule from the rulex database πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <rulexdb.h>

int rulexdb_remove_rule(RULEXDB *rulexdb, int rule_type, int position);

like, that's it. three args, one int back. she's simple, she's effective πŸ‘‘


πŸ’– DESCRIPTION πŸ’–

so the rulexdb_remove_rule() function removes a rule identified by its type and position in the ruleset from the rulex database referenced by the rulexdb argument. that's the whole vibe. find the rule, pull it out, done πŸŽ€

the rule_type argument specifies the rule type. it may accept one of the following values:

  • RULEXDB_LEXCLASS β€” the rule is the word classifier and belongs to the Classifiers dataset ✨
  • RULEXDB_PREFIX β€” the requested rule should be removed from the Prefix detectors ruleset πŸ¦‹
  • RULEXDB_RULE β€” the requested rule should be removed from the General rules dataset 🌿
  • RULEXDB_CORRECTOR β€” the rule is a correction rule that belongs to the Correctors dataset πŸ”₯

and the position argument defines position of the requested rule in the ruleset. like, which one? that one. index-style, bestie πŸ“


⭐ RETURN VALUE ⭐

the rulexdb_remove_rule() function returns RULEXDB_SUCCESS which is zero when specified rule was successfully removed, positive value RULEXDB_SPECIAL when there is no rule with such number in specified ruleset, or negative error code otherwise.

so: 0 = slay, positive = that rule number literally doesn't exist, negative = something went wrong 😭


πŸ’€ ERRORS πŸ’€

  • RULEXDB_FAILURE β€” referenced database has not been opened, internal data structures are corrupted or some other general failure has occurred. it's giving chaos πŸ™ˆ
  • RULEXDB_EPARM β€” the argument rulexdb or rule_type has an invalid value. one of your inputs is not it πŸ’…
  • RULEXDB_EACCESS β€” the database is not opened for updating. read-only energy, and not in a cute way 🚫

🌈 SEE ALSO 🌈

rulexdb_classify(3), rulexdb_close(3), rulexdb_dataset_name(3), rulexdb_discard_dictionary(3), rulexdb_discard_ruleset(3), rulexdb_fetch_rule(3), rulexdb_lexbase(3), rulexdb_load_ruleset(3), rulexdb_open(3), rulexdb_remove_item(3), rulexdb_remove_this_item(3), rulexdb_retrieve_item(3), rulexdb_search(3), rulexdb_seq(3), rulexdb_subscribe_item(3), rulexdb_subscribe_rule(3)

go read the whole friend group, iykyk 🫢


πŸ‘‘ AUTHOR πŸ‘‘

Igor B. Poretsky <poretsky@mlbox.ru>. king behavior, honestly πŸ’œ


and that's the page!! this iconic lil number dropped February 19, 2012 as part of the Library Functions Manual for rulexdb. take care of her, she just deletes rules and minds her own business 🧚⭐

πŸ“¦ where this page comes from