RULEXDB_LOAD_RULESET(3)
π RULEXDB_LOAD_RULESET π
okay bestie, welcome to the rulexdb_load_ruleset(3) page β yes it's a section 3 library function, from the Library Functions Manual, and yes it's about to eat. let's go β¨
π NAME π
rulexdb_load_ruleset β bestie, this is the one that loads up a specified ruleset from a rulex database. that's it. that's the whole job. π
πΈ SYNOPSIS πΈ
#include <rulexdb.h>
int rulexdb_load_ruleset(RULEXDB *rulexdb, int rule_type);
like, you include the header, you call the function, you get an int back. simple as. π¦
β¨ DESCRIPTION β¨
so here's the tea π β rulexdb_load_ruleset() preloads all the data for whichever ruleset you point at with the rule_type argument. and that argument is a choose-your-own-adventure, it accepts one of these iconic values:
RULEXDB_LEXCLASSβ loads the Classifiers ruleset.RULEXDB_PREFIXβ loads the Prefix detectors ruleset.RULEXDB_RULEβ loads the General ruleset.RULEXDB_CORRECTORβ loads the Correctors ruleset.
and the rulexdb argument? that one references the database you're dealing with. like, the actual db. the main character. π
β οΈ lowkey important: a loaded ruleset cannot be modified. once it's loaded, that's the vibe, it's locked in, periodt. π
π₯ RETURN VALUE π₯
rulexdb_load_ruleset() returns the number of loaded records when it's slaying π β or a negative error code when it's not. so if the number comes back spicy-negative, check the next section, no cap.
π ERRORS π
here's the vibe check on what can go wrong, bestie:
RULEXDB_FAILUREβ the referenced database has not been opened, or the internal data structures are corrupted, or honestly some other general failure has occurred. it's giving chaos. πRULEXDB_EPARMβ invalid arguments are specified. check ur inputs babes πRULEXDB_EACCESSβ the database cannot be initialized for loading. ngl that one hurts.
π SEE ALSO π
go read these too, iykyk π«Ά β they're all part of the same little rulexdb fam:
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_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)
π AUTHOR π
this absolute icon wrote it: Igor B. Poretsky <poretsky@mlbox.ru>. stan. π
and that's the whole page bestie!! this lil gem dropped on June 21, 2023, and it's living in the Library Functions Manual as RULEXDB_LOAD_RULESET(3) β go forth and load those rulesets, mwah π
β¨π
π¦ where this page comes from
- debian trixie: librulexdb-dev 3.8.6-1 Β· LGPL-2.1-or-later
- ubuntu questing: librulexdb-dev 3.8.6-1
- ubuntu resolute: librulexdb-dev 3.8.6-1build1 Β· LGPL-2.1-or-later
- ubuntu stonking: librulexdb-dev 3.8.6-1build1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms