TDB_DELETE(3)
π TDB_DELETE π
okay bestie, welcome to tdb_delete β it's from the Linux Programmer's Manual (section 3, we're fancy like that π
), and it's the part where we yeet a record straight out of a tdb database. no takebacks, no receipts.
β¨ NAME β¨
tdb_delete β delete a record from a tdb database. that's it. that's the whole job. she's a one-task queen π
πΈ SYNOPSIS πΈ
#include <tdb.h>
int tdb_delete(TDB_CONTEXT *tdb, TDB_DATA key);
like⦠two args, one int back. lowkey elegant, highkey iconic.
π¦ DESCRIPTION π¦
so here's the vibe: you hand her a key, she finds the record in the tdb database whose key matches it, and she deletes it. gone. bye. π«Ά
and what even is a key? it's a lump of data that is used as the index into the database. that's the whole concept β a blob of bytes doing the job of a lookup tag. no cap.
the TDB_DATA structure is defined as:
typedef struct {
char *dptr;
size_t dsize;
} TDB_DATA;
so dptr is your pointer to the data and dsize is how big it is. pointer plus length, the classic duo, the main character energy pairing of C π
β RETURN VALUE β
0β success, we ate, the record is deleted π-1β failure, it's giving sad girl hours π
that's the entire scale. binary. no in-between. periodt.
π AUTHORS π
- Software: Andrew Tridgell
<tridge@linuxcare.com>and Luke Kenneth Casson Leighton - Man page: Ben Woodard
<ben@valinux.com>
shoutout to the devs, absolute legends, we stan π
π₯ SEE ALSO π₯
go read those next, iykyk π
and that's the whole page bestie β brought to you by Samba, dated Aug 16, 2000, and it was TDB_DELETE(3) all along. mwah πβ¨
π¦ where this page comes from
- debian trixie: libtdb-dev 2:1.4.13+samba4.22.10+dfsg-0+deb13u2 Β· GPL-3.0-or-later
- debian trixie: libtdb-dev 2:1.4.13+samba4.22.11+dfsg-0+deb13u1 Β· GPL-3.0-or-later
- ubuntu questing: libtdb-dev 2:1.4.13+samba4.22.3+dfsg-4ubuntu2
- ubuntu questing: libtdb-dev 2:1.4.13+samba4.22.3+dfsg-4ubuntu2.4
- ubuntu resolute: libtdb-dev 2:1.4.14+samba4.23.6+dfsg-1ubuntu2 Β· GPL-3.0-or-later
- ubuntu resolute: libtdb-dev 2:1.4.14+samba4.23.6+dfsg-1ubuntu2.2 Β· GPL-3.0-or-later
- ubuntu stonking: libtdb-dev 2:1.4.15+samba4.24.7+dfsg-1ubuntu1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms