cdb_successor(3)

πŸ“¦
version 0.34 Β· 3 versions
, in alpine 3.24, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu resolute, ubuntu stonking

✨ cdb_successor(3) ✨

okay so bestie, welcome to the cdb_successor(3) page from the Library Functions Manual β€” yes, we're in manual-page land and it's giving "find the next record" energy. πŸ¦‹

πŸ’– NAME πŸ’–

cdb_successor β€” find next record πŸ‘‘

🌸 SYNTAX 🌸

#include <libowfat/cdb.h>

int cdb_successor(struct cdb *c, char *key, size_t klen);

πŸŽ€ DESCRIPTION πŸŽ€

So cdb_successor finds the record that follows key. Literally the next one. If key is NULL, then cdb_successor finds the first record. No cap. ✨

🚨 NOTE! The database must not contain keys with more than one associated record, or this API will lead to infinite loops! Use cdb_firstkey and cdb_nextkey instead. This is not a drill, bestie β€” infinite loops are the opposite of slay. πŸ’€

You can use cdb_datapos or cdb_keypos to get position and cdb_datalen and cdb_keylen to get len. 🫢

πŸ”₯ SEE ALSO πŸ”₯


okay that's the whole vibe β€” cdb_successor(3) from the Library Functions Manual. The footer is just cdb_successor(3), and there's no source/version/date listed, so this is your cute sign-off: stay loop-free, use cdb_firstkey and cdb_nextkey when you need them, and go find those records. periodt. πŸ’…πŸŒˆ