RULEXDB_DI...DICTIONARY(3)

✨ RULEXDB_DI...DICTIONARY ✨

okay bestie, welcome to rulexdb.h's little corner of the manual β€” this is the page for the RULEXDB_DI...DICTIONARY entry in the Library Functions Manual, and honestly? it's giving "one job, does it well" πŸ’…


🌸 NAME 🌸

rulexdb_discard_dictionary β€” remove specified dictionary dataset from a rulex database


πŸŽ€ SYNOPSIS πŸŽ€

#include <rulexdb.h>

int rulexdb_discard_dictionary(RULEXDB *rulexdb, int item_type);

πŸ¦‹ DESCRIPTION πŸ¦‹

so like. the rulexdb_discard_dictionary() function removes all data from the dictionary dataset that you point at with the item_type argument, and that argument can be one of these two cuties:

  • RULEXDB_LEXBASE β€” Discard the Implicit dictionary. bye bestie πŸ‘‹
  • RULEXDB_EXCEPTION β€” Discard the Explicit dictionary. also bye πŸ‘‹
not me about to say it again: the data type must be specified explicitly, no cap. the value RULEXDB_DEFAULT is not allowed here. periodt. 🚫

and the rulexdb argument references the database to deal with. that's the one you're messing with. 🫢


πŸ’– RETURN VALUE πŸ’–

rulexdb_discard_dictionary() returns the number of deleted records, or a negative error code if things went sideways. so like, a positive-ish number = slay, negative = 😭.


πŸ’€ ERRORS πŸ’€

  • RULEXDB_FAILURE β€” Referenced database has not been opened, internal data structures are corrupted, or some other general failure has occurred. like... something is deeply wrong, iconic of a general failure honestly.
  • RULEXDB_EPARM β€” Invalid arguments are specified. you gave it something it can't work with, bestie.
  • RULEXDB_EACCESS β€” The database is not opened for updating. so it's read-only vibes only and you're trying to write. not gonna happen. πŸ™ˆ

🌈 SEE ALSO 🌈

rulexdb_classify(3), rulexdb_close(3), rulexdb_dataset_name(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_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)

go read those too, iykyk πŸ’œ


πŸ‘‘ AUTHOR πŸ‘‘

Igor B. Poretsky <poretsky@mlbox.ru>. we stan. ✨


and that's the whole page, bestie β€” this one's from the Library Functions Manual, dated February 22, 2012, so it's lowkey vintage but highkey still valid. πŸŽ€πŸ¦‹ go forth and discard those dictionaries responsibly. mwah πŸ’‹

πŸ“¦ where this page comes from