QB_HDB_HANDLE_CREATE(3)
π QB_HDB_HANDLE_CREATE(3) π
okay so bestie, welcome to the libqb Programmer's Manual β this is the page for qb_hdb_handle_create, and yes we're gonna get into it. grab a boba, we're learning today π§β¨
πΈ NAME πΈ
qb_hdb_handle_create β Create a new handle.
like. the name literally says it. we love a self-explanatory icon π
β¨ SYNOPSIS β¨
#include <qb/qbhdb.h>
int32_t qb_hdb_handle_create(
struct qb_hdb *hdb, /* the database instance */
int32_t instance_size, /* size of the object to malloc */
qb_handle_t *handle_id_out /* new handle */
);
so you pull in the header, and you call this thing with three args. that's the whole vibe. π¦
π PARAMS π
hdbβ the database instance. the main character of the whole situation, no cap.instance_sizeβ size of the object to malloc. that's how much room we're asking for πhandle_id_outβ new handle. this is where the shiny new handle goes when it's done, okay? π«Ά
π DESCRIPTION π
(no prose here bestie β the structs are right below and they're doing all the talking π)
π§ STRUCTURES π§
okay so here's the struct, look at her:
struct qb_hdb {
uint32_t handle_count;
qb_array_t handles;
uint32_t iterator;
void (*destructor)(void *);
uint32_t first_run;
};
literally every field accounted for. handle_count, handles, iterator, destructor, first_run β all of them, we don't skip anybody in this house π
β RETURN VALUE β
(0 == ok, -errno failure)
so like: 0 means ok, we ate. anything -errno shaped means failure, and honestly? the -errno part tells you why, which is giving thoughtful β¨
π SEE ALSO π
squad, the whole group chat, all of them linked below:
qb_hdb_handle_get(3)qb_hdb_iterator_reset(3)qb_hdb_handle_destroy(3)qb_hdb_handle_refcount_get(3)qb_hdb_iterator_next(3)qb_hdb_nocheck_convert(3)qb_hdb_create(3)qb_hdb_destroy(3)qb_hdb_base_convert(3)qb_hdb_handle_get_always(3)qb_hdb_handle_put(3)
go read them. they're all important. iykyk π
π COPYRIGHT π
Copyright (C) 2010-2020 Red Hat, Inc.
a moment of appreciation for the legal girlies, fr fr β they keep the whole thing legit π
and that's the page!! π this was LIBQB, dated 2025-09-16, and you just read QB_HDB_HANDLE_CREATE(3) front to back like a scholar. so proud of you. go make some handles bestie ππΈβ¨
π¦ where this page comes from
- fedora 44: libqb-devel 2.0.9-2.fc44 Β· LGPL-2.1-or-later
- fedora 44: libqb-devel 2.0.9-2.fc44 Β· LGPL-2.1-or-later
- ubuntu resolute: libqb-dev 2.0.9-1ubuntu1 Β· LGPL-2.1-or-later
- ubuntu stonking: libqb-dev 2.0.9-1ubuntu1 Β· 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