RULEXDB_REMOVE_THIS_ITEM(3)

πŸ’– RULEXDB_REMOVE_THIS_ITEM πŸ’–

okay bestie, welcome to the rulexdb_remove_this_item(3) page from the Library Functions Manual ✨ this one's a lil baddie that lets you yeet an item you just grabbed sequentially out of the rulex dictionary. no cap, it's giving cleanup crew energy πŸ§ΉπŸ’…


🌸 NAME 🌸

rulexdb_remove_this_item β€” remove the sequentially retrieved item from the rulex dictionary πŸ—‘οΈβœ¨


πŸŽ€ SYNOPSIS πŸŽ€

#include <rulexdb.h>

int rulexdb_remove_this_item(RULEXDB *rulexdb, int item_type);

πŸ¦‹ DESCRIPTION πŸ¦‹

so like, the rulexdb_remove_this_item() function removes the last item accessed via rulexdb_seq(3) from the dictionary dataset defined by the item_type argument. and item_type can be one of these two icons πŸ‘‘:

  • RULEXDB_LEXBASE β€” removes the item from the Implicit dictionary.
  • RULEXDB_EXCEPTION β€” removes the item from the Explicit dictionary.
⚠️ not me having to say this but: the data type must be specified explicitly, fr fr. RULEXDB_DEFAULT is not allowed here, periodt. don't try it πŸ™ˆ

and the rulexdb argument references the database you're dealing with, obviously πŸ’β€β™€οΈ


✨ RETURN VALUE ✨

here's the vibe check on what comes back:

  • RULEXDB_SUCCESS, which is zero, when the specified item was successfully removed πŸŽ‰
  • a positive value, RULEXDB_SPECIAL, when this record is already deleted (been there, done that, it's gone πŸ’€)
  • a negative error code in the case of other failure 😭

πŸ”₯ ERRORS πŸ”₯

  • RULEXDB_FAILURE β€” the referenced database has not been opened, the internal data structures are corrupted, or some other general failure has occurred. it's giving chaos πŸŒͺ️
  • RULEXDB_EPARM β€” the argument rulexdb or item_type has an invalid value. check ur args bestie 🫢
  • RULEXDB_EACCESS β€” the database is not opened for updating, or the dataset was never accessed sequentially yet. no sequential access, no removal, iykyk 🚫

🌈 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_rule(3), rulexdb_retrieve_item(3), rulexdb_search(3), rulexdb_seq(3), rulexdb_subscribe_item(3), rulexdb_subscribe_rule(3)


πŸ‘‘ AUTHOR πŸ‘‘

Igor B. Poretsky <poretsky@mlbox.ru> πŸ’œ


and that's the whole page, bestie!! this iconic lil manpage dropped on February 21, 2012 and it lives in section 3 (RULEXDB_REMOVE_THIS_ITEM(3)) of the Library Functions Manual. go forth and remove responsibly πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from