RULEXDB_SEQ(3)

πŸ’– RULEXDB_SEQ(3) β€” Library Functions Manual πŸ’–

okay bestie, gather round, we're talking about rulexdb_seq β€” the girlies' guide to sequentially retrieving dictionary items from the rulex database πŸ¦‹βœ¨


🌸 NAME 🌸

rulexdb_seq β€” sequential retrieving dictionary items from the rulex database. it's giving "gimme the records one at a time" energy, no cap πŸ’…


✨ SYNOPSIS ✨

#include <rulexdb.h>

int rulexdb_search(RULEXDB *rulexdb, char *key, char *value, int item_type, int mode);
yes bestie, the synopsis literally says rulexdb_search up there. that's what the page says. i don't make the rules, i just report them πŸ’€ (fr fr, copy it exactly)

πŸ’œ DESCRIPTION πŸ’œ

so like, the rulexdb_seq() function sequentially fetches lexical records one by one. it does its thing all on its own β€” its operations are not disturbed by the key-based search. it's independent, it's unbothered, it's main character energy πŸ‘‘

the argument rulexdb references the rulex database. that's the whole vibe. 🫢

the arguments key and value must point to the buffers with enough space for retrieved data. not enough space? that's on you, babe. πŸ™ˆ

the argument item_type specifies the dictionary dataset from which data will be retrieved. it may accept one of the following values:

  • RULEXDB_LEXBASE β€” extract data from the Implicit dictionary. πŸ“
  • RULEXDB_EXCEPTION β€” extract data from the Explicit dictionary. 🌈
⚠️ note that the data type must be specified explicitly. the value RULEXDB_DEFAULT is not allowed here. periodt. πŸ’…

when fetching data from the Explicit dictionary the correction rules will be applied. and if you're like "bestie i do NOT want that", you can specify RULEXDB_EXCEPTION_RAW instead of RULEXDB_EXCEPTION to prevent this feature. iconique. ✨

the mode argument specifies direction of the dictionary scanning. allowed values are: DB_FIRST, DB_NEXT, DB_PREV, or DB_LAST β€” as defined for the underlying database library. iykyk 🧚


⭐ RETURN VALUE ⭐

the rulexdb_seq() function returns:

  • RULEXDB_SUCCESS which is zero upon success πŸ’–
  • a positive value RULEXDB_SPECIAL when no more records can be fetched 😭
  • or a negative error code if something is 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 ngl πŸ™ˆ
  • RULEXDB_EMALLOC β€” internal memory allocation error. the memory said no. 😭
  • RULEXDB_EPARM β€” invalid parameters are specified. check ur args bestie 🌸

🌟 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_remove_this_item(3), rulexdb_retrieve_item(3), rulexdb_search(3), rulexdb_subscribe_item(3), rulexdb_subscribe_rule(3)

the whole friend group, fr fr πŸ«‚βœ¨


πŸ‘‘ AUTHOR πŸ‘‘

Igor B. Poretsky <poretsky@mlbox.ru>.


and that's the whole page bestie!! πŸŽ€ this beauty is the RULEXDB_SEQ(3) page from the Library Functions Manual, dated February 20, 2012, and it ate. no crumbs. go forth and fetch ur records sequentially, you gorgeous little icon πŸ’–πŸ’…πŸŒˆ

πŸ“¦ where this page comes from