dbh_create(3)
π NAME π
ok so bestie, meet the girlies: dbh_open, dbh_openR, and dbh_create β they open a DBHashTable or make a brand new one, no cap π
β¨ SYNOPSIS β¨
#include <dbh.h>
DBHashTable *dbh_open(constchar*path);
DBHashTable *dbh_openR(constchar*path);
DBHashTable *dbh_create (const char *path, unsigned char key_length);
πΈ DESCRIPTION πΈ
okay so here's the tea π« β you've got three functions and they each have main character energy in their own way:
dbh_open()β opens an existing DBHashTable atpathin read/write mode. She's got range, she can do both.dbh_openR()β samepath, but opens in read-only mode. Look but don't touch, periodt. πdbh_create()β the icon herself β¨ she creates, initializes and opens a new DBHashTable in read/write mode.
and about key_length: it's the fixed length of the record access key, and it must be less than 256. it's giving very specific, very demure. π
ngl the important bit: you only gotta specify key_length when the DBHashTable is being created and initialized. after that, she already knows who she is. π
π¦ RETURN VALUE π¦
when it slays (success π): you get back a pointer to a newly initialized and open DBHashTable. iconic.
when it doesn't: you get NULL π and errno gets set appropriately, so go check on her.
π NOTES π
β οΈ WARNING bestie, this is the serious one β οΈ dbh_create() will overwrite any file with the specified path β and that includes any previous DBH file. like, gone gone. no undo. π so pls be sure before you commit.
also, lowkey a flex: Cuantified keys assure that large DBHashes are spread out optimally. she's optimized, she's balanced, she's thriving πβ
π SEE ALSO π
dbh(0)dbh_open(3)dbh_openR(3)dbh_close(3)dbh_destroy(3)dbh_genkey(3)
π· Author π·
Edscott Wilson Garcia <edscott@xfce.org> β the original main character, we stan π«Ά
k bye bestie, that's the whole DBHashTables Programmers' Manual page for dbh_create(3), version DBH π go forth and hash responsibly, mwah π
β¨
π¦ where this page comes from
- fedora 43: dbh-devel 1:5.0.16-24.fc43 Β· GPL-3.0-or-later
- fedora 43: dbh-devel 1:5.0.16-24.fc43 Β· GPL-3.0-or-later
- fedora 43: dbh-devel 1:5.0.22-1.fc43 Β· GPL-3.0-or-later
- fedora 43: dbh-devel 1:5.0.22-1.fc43 Β· GPL-3.0-or-later
- fedora 44: dbh-devel 1:5.0.22-3.fc44 Β· GPL-3.0-or-later
- fedora 44: dbh-devel 1:5.0.22-3.fc44 Β· GPL-3.0-or-later
- Copyright (c) 2010 Edscott Wilson Garcia (edscott@xfce.org)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms